Toutes les vulnérabilités
HIGHInfra

CONTAINER-LEAKY-VESSELS-2024

Container · runc (OCI container runtime)

Résumé

Leaky Vessels was a set of container-escape vulnerabilities disclosed on 31 January 2024 by Rory McNamara of Snyk Security Labs, the headline flaw being CVE-2024-21626 (CVSS 8.6, runc 1.1.11 and earlier). It was an order-of-operations file-descriptor leak in runc's handling of the process working directory (WORKDIR / process.cwd). During container setup runc left an internal file descriptor referencing the host filesystem namespace open before all privileged descriptors were closed, so a malicious image or a build using a malicious Dockerfile or upstream FROM could set the working directory to that leaked descriptor via a path like /proc/self/fd/7. Because chdir occurred before the descriptor was closed, the container process gained a working directory in the host filesystem and could read and write host files, breaking container isolation and escaping to the underlying host. Related Docker BuildKit issues were disclosed alongside it: CVE-2024-23651 (mount cache race), CVE-2024-23652 (build-time arbitrary delete), and CVE-2024-23653 (GRPC SecurityMode privilege check bypass). The flaw was fixed in runc 1.1.12.

Comment l’éviter dans votre code

  • Patch runc to 1.1.12 or later and update Docker/BuildKit to versions bundling the fix.
  • Only build from and run trusted base images; treat untrusted images and Dockerfiles as hostile.
  • Run containers unprivileged with dropped capabilities and a read-only root filesystem.
  • Apply seccomp, AppArmor, or SELinux profiles and use user namespaces to harden isolation.
  • Scan images for known-vulnerable runtimes and monitor for unexpected host-filesystem access.

Références

Vulnérabilités liées

Tout Infra →