CVE-2023-25809: rootless: `/sys/fs/cgroup` is writable when cgroupns isn't unshared in runc
Last updated 24 July 2024
Other sources
runc is a CLI tool for spawning and running containers according to the OCI specification. In affected versions it was found that rootless runc makes /sys/fs/cgroup writable in certain conditions.
References:
https://github.com/opencontainers/runc/security/advisories/GHSA-m8cg-xc2p-r3fc https://github.com/opencontainers/runc/commit/0d62b950e60f6980b54fe3bafd9a9c608dc1df17
— Red Hat
runc is a CLI tool for spawning and running containers according to the OCI specification. In affected versions it was found that rootless runc makes /sys/fs/cgroup writable in following conditons: 1. when runc is executed inside the user namespace, and the config.json does not specify the cgroup namespace to be unshared (e.g.., (docker|podman|nerdctl) run --cgroupns=host, with Rootless Docker/Podman/nerdctl) or 2. when runc is executed outside the user namespace, and /sys is mounted with rbind, ro (e.g., runc spec --rootless; this condition is very rare). A container may gain the write access to user-owned cgroup hierarchy /sys/fs/cgroup/user.slice/... on the host . Other users's cgroup hierarchies are not affected. Users are advised to upgrade to version 1.1.5. Users unable to upgrade may unshare the cgroup namespace ((docker|podman|nerdctl) run --cgroupns=private). This is the default behavior of Docker/Podman/nerdctl on cgroup v2 hosts. or add /sys/fs/cgroup to maskedPaths.
— Launchpad
Affected Software
Remediation
Event History
Frequently Asked Questions
What is CVE-2023-25809?
CVE-2023-25809 is a vulnerability in the runc CLI tool that allows rootless runc to make /sys/fs/cgroup writable under certain conditions.
How does CVE-2023-25809 affect runc?
CVE-2023-25809 affects runc by making /sys/fs/cgroup writable when runc is executed inside the user namespace and the config.json does not specify the cgroup.
What is the severity of CVE-2023-25809?
CVE-2023-25809 has a severity rating of medium.
How can I fix CVE-2023-25809 on Red Hat?
To fix CVE-2023-25809 on Red Hat, update runc to version 1.1.5 or newer.
How can I fix CVE-2023-25809 on Ubuntu 18.04?
To fix CVE-2023-25809 on Ubuntu 18.04, update runc to version 1.1.4-0ubuntu1~18.04.2 or newer.