Date: Tue, 6 Apr 2021 21:11:40 +1000 From: Aleksa Sarai <cyphar@...har.com> To: oss-security@...ts.openwall.com Cc: dev@...ncontainers.org Subject: CVE-2021-29136: umoci: malicious layer with symlink entry for "/" allows overwriting of host files umoci 0.4.7 has been released, which contains a patch for this vulnerability. See  for more details about this vulnerability. --- umoci 0.4.6 and earlier can be tricked into modifying host files by creating a malicious layer that has a symlink with the name "." (or "/"). Because umoci deletes inodes if they change types, this results in the rootfs directory being replaced with an attacker-controlled symlink. Subsequent image layers will then be applied on top of the target of the symlink (which could be any directory on the host filesystem the user running umoci has access to). While umoci does have defences against symlink-based attacks, they are all implemented by resolving things relative to the rootfs directory -- if the rootfs itself is a symlink, umoci resolves it first. This vulnerability affects both "umoci unpack" and "umoci raw unpack". Note that if you use umoci as an unprivileged user (using the --rootless flag) then umoci will not be able to overwrite any files that your user doesn't have access to. Other possible mitigations are to run umoci under an LSM profile such as AppArmor or SELinux to restrict the level of access it has outside of container image directories. Thanks to Robin Peraglie from Cure53 for discovering and reporting this vulnerability. : https://github.com/opencontainers/umoci/releases/tag/v0.4.7 : https://github.com/opencontainers/umoci/commit/d9efc31daf2206f7d3fdb839863cf7a576a2eb57 : https://github.com/opencontainers/umoci/security/advisories/GHSA-9m95-8hx6-7p9v -- Aleksa Sarai Senior Software Engineer (Containers) SUSE Linux GmbH <https://www.cyphar.com/> Download attachment "signature.asc" of type "application/pgp-signature" (229 bytes)
Powered by blists - more mailing lists
Please check out the Open Source Software Security Wiki, which is counterpart to this mailing list.
Confused about mailing lists and their use? Read about mailing lists on Wikipedia and check out these guidelines on proper formatting of your messages.