- 10 Apr, 2019 6 commits
-
-
Christian Brauner authored
Signed-off-by:Christian Brauner <christian.brauner@ubuntu.com>
-
Fabrice Fontaine authored
Compiler based hardening (including -fstack-protector-strong) are enabled since version 3.0.3 and https://github.com/lxc/lxc/commit/2268c27754152aa538db2c9e3753d72d19bcd17a However, some compilers could missed the needed library (-lssp or -lssp_nonshared) at linking step so use ax_check_link_flag instead of ax_check_compile_flag Fixes: - http://autobuild.buildroot.org/results/0b90e7dca2984652842832a41abad93ac49a9b86Signed-off-by:
Fabrice Fontaine <fontaine.fabrice@gmail.com>
-
Fabrice Fontaine authored
Fixes: - http://autobuild.buildroot.org/results/0b90e7dca2984652842832a41abad93ac49a9b86Signed-off-by:
Fabrice Fontaine <fontaine.fabrice@gmail.com>
-
Adam Kasztenny authored
Copied from the [manpage](https://github.com/lxc/lxc/blob/9e42c1e3f102be48be9014e1ecbacc2a57446e20/doc/lxc-create.sgml.in#L175). Signed-off-by:
Adam Kasztenny <adamkasztenny@gmail.com>
-
2xsec authored
Signed-off-by:2xsec <dh48.jeong@samsung.com>
-
Cameron Nemo authored
* Place NULL bytes at the end of strings so that lxc_safe_ulong() can parse them correctly * Only free the newly created id_map on error, to avoid passing garbage to lxc_map_ids() Signed-off-by:Cameron Nemo <camerontnorman@gmail.com>
-
- 18 Feb, 2019 1 commit
-
-
Christian Brauner authored
Signed-off-by:Christian Brauner <christian.brauner@ubuntu.com>
-
- 12 Feb, 2019 1 commit
-
-
Christian Brauner authored
Signed-off-by:Christian Brauner <christian.brauner@ubuntu.com>
-
- 11 Feb, 2019 1 commit
-
-
Christian Brauner authored
Adam Iwaniuk and Borys Popławski discovered that an attacker can compromise the runC host binary from inside a privileged runC container. As a result, this could be exploited to gain root access on the host. runC is used as the default runtime for containers with Docker, containerd, Podman, and CRI-O. The attack can be made when attaching to a running container or when starting a container running a specially crafted image. For example, when runC attaches to a container the attacker can trick it into executing itself. This could be done by replacing the target binary inside the container with a custom binary pointing back at the runC binary itself. As an example, if the target binary was /bin/bash, this could be replaced with an executable script specifying the interpreter path #!/proc/self/exe (/proc/self/exec is a symbolic link created by the kernel for every process which points to the binary that was executed for that process). As such when /bin/bash is executed inside the container, instead the target of /proc/self/exe will be executed - which will point to the runc binary on the host. The attacker can then proceed to write to the target of /proc/self/exe to try and overwrite the runC binary on the host. However in general, this will not succeed as the kernel will not permit it to be overwritten whilst runC is executing. To overcome this, the attacker can instead open a file descriptor to /proc/self/exe using the O_PATH flag and then proceed to reopen the binary as O_WRONLY through /proc/self/fd/<nr> and try to write to it in a busy loop from a separate process. Ultimately it will succeed when the runC binary exits. After this the runC binary is compromised and can be used to attack other containers or the host itself. This attack is only possible with privileged containers since it requires root privilege on the host to overwrite the runC binary. Unprivileged containers with a non-identity ID mapping do not have the permission to write to the host binary and therefore are unaffected by this attack. LXC is also impacted in a similar manner by this vulnerability, however as the LXC project considers privileged containers to be unsafe no CVE has been assigned for this issue for LXC. Quoting from the https://linuxcontainers.org/lxc/security/ project's Security information page: "As privileged containers are considered unsafe, we typically will not consider new container escape exploits to be security issues worthy of a CVE and quick fix. We will however try to mitigate those issues so that accidental damage to the host is prevented." To prevent this attack, LXC has been patched to create a temporary copy of the calling binary itself when it starts or attaches to containers. To do this LXC creates an anonymous, in-memory file using the memfd_create() system call and copies itself into the temporary in-memory file, which is then sealed to prevent further modifications. LXC then executes this sealed, in-memory file instead of the original on-disk binary. Any compromising write operations from a privileged container to the host LXC binary will then write to the temporary in-memory binary and not to the host binary on-disk, preserving the integrity of the host LXC binary. Also as the temporary, in-memory LXC binary is sealed, writes to this will also fail. Note: memfd_create() was added to the Linux kernel in the 3.17 release. Signed-off-by:
Christian Brauner <christian.brauner@ubuntu.com> Co-Developed-by:
Aleksa Sarai <asarai@suse.de> Acked-by:
Serge Hallyn <serge@hallyn.com>
-
- 09 Feb, 2019 1 commit
-
-
Stéphane Graber authored
caps: check uid and euid
-
- 08 Feb, 2019 1 commit
-
-
Christian Brauner authored
When we are running inside of a user namespace getuid() will return a non-zero uid. So let's check euid as well to make sure we correctly drop capabilities Signed-off-by:Christian Brauner <christian.brauner@ubuntu.com>
-
- 07 Jan, 2019 2 commits
-
-
Stéphane Graber authored
cgfsng: do not free container_full_path on error
-
Christian Brauner authored
Closes #2741. Signed-off-by:Christian Brauner <christian.brauner@ubuntu.com>
-
- 17 Dec, 2018 2 commits
-
-
Christian Brauner authored
apparmor: allow various remount,bind options
-
Wolfgang Bumiller authored
RW bind mounts need to be restricted for some paths in order to avoid MAC restriction bypasses, but read-only bind mounts shouldn't have that problem. Additionally, combinations of 'nosuid', 'nodev' and 'noexec' flags shouldn't be a problem either and are required with newer systemd versions, so let's allow those as long as they're combined with 'ro,remount,bind'. Signed-off-by:
Wolfgang Bumiller <w.bumiller@proxmox.com> (cherry picked from commit e6ec0a9e)
-
- 22 Nov, 2018 25 commits
-
-
Stéphane Graber authored
Signed-off-by:Stéphane Graber <stgraber@ubuntu.com>
-
Stéphane Graber authored
start: don't call cgroup_exit() twice
-
Christian Brauner authored
Signed-off-by:Christian Brauner <christian.brauner@ubuntu.com>
-
Christian Brauner authored
The freezer controller has been made optional in all other codepaths so don't require it. Signed-off-by:Christian Brauner <christian.brauner@ubuntu.com>
-
Radostin Stoyanov authored
After commit 2b670dfe lxc-create and lxc-copy fails with "undefined symbol: get_fssize". Closes #2730 Signed-off-by:
Radostin Stoyanov <rstoyanov1@gmail.com>
-
Christian Brauner authored
Signed-off-by:Christian Brauner <christian.brauner@ubuntu.com>
-
tomponline authored
Adds -qq flags to lvcreate commands to avoid answer 'no' to ant questions the LVM subsystem asks to avoid hanging lxc-create command Signed-off-by:tomponline <tomp@tomp.uk>
-
2xsec authored
Signed-off-by:2xsec <dh48.jeong@samsung.com>
-
2xsec authored
Signed-off-by:2xsec <dh48.jeong@samsung.com>
-
2xsec authored
Signed-off-by:2xsec <dh48.jeong@samsung.com>
-
2xsec authored
Signed-off-by:2xsec <dh48.jeong@samsung.com>
-
2xsec authored
Signed-off-by:2xsec <dh48.jeong@samsung.com>
-
Christian Brauner authored
Signed-off-by:Christian Brauner <christian.brauner@ubuntu.com>
-
2xsec authored
Signed-off-by:2xsec <dh48.jeong@samsung.com>
-
2xsec authored
Signed-off-by:2xsec <dh48.jeong@samsung.com>
-
2xsec authored
Signed-off-by:2xsec <dh48.jeong@samsung.com>
-
Jungsub authored
Signed-off-by: Jungsub Shin supsup5642@tmax.co.kr
-
Christian Brauner authored
Signed-off-by:Christian Brauner <christian.brauner@ubuntu.com>
-
Christian Brauner authored
Signed-off-by:Christian Brauner <christian.brauner@ubuntu.com>
-
2xsec authored
Signed-off-by:2xsec <dh48.jeong@samsung.com>
-
2xsec authored
Signed-off-by:2xsec <dh48.jeong@samsung.com>
-
2xsec authored
Signed-off-by:2xsec <dh48.jeong@samsung.com>
-
Josh Soref authored
Signed-off-by:Josh Soref <jsoref@gmail.com>
-
Josh Soref authored
Signed-off-by:Josh Soref <jsoref@gmail.com>
-
Josh Soref authored
Signed-off-by:Josh Soref <jsoref@gmail.com>
-