Advisory

GHSA-m8cg-xc2p-r3fc

Also known as: CVE-2023-25809, GO-2023-1682

Summary

rootless: /sys/fs/cgroup is writable when cgroupns isn't unshared in runc

Details

Impact
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)
  2. or, 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.

Patches
v1.1.5 (planned)

Workarounds

  • Condition 1: Unshare the cgroup namespace ((docker|podman|nerdctl) run --cgroupns=private). This is the default behavior of Docker/Podman/nerdctl on cgroup v2 hosts.
  • Condition 2 (very rare): add /sys/fs/cgroup to maskedPaths

Severity

Low Basis: The source's own band: LOW

Dates

Published
2023-03-30 20:17 UTC
Modified
2026-09-10 03:49 UTC

Affected packages and fixes

github.com/opencontainers/runc

Go · All systems

Affected

  • introduced 0, fixed 1.1.5 (semver)

Fixed versions

1.1.5

Fix

Fix commands are the export's own generic commands. Ojuju never runs them. Check them against your setup first.

Check your own computer: guard packages check

View this record on OSV.dev

Source

Source: GitHub Advisory Database (reviewed advisories) · CC BY 4.0

Sources & licences