Bug 2262224 (CVE-2024-23651) - CVE-2024-23651 moby/buildkit: possible race condition with accessing subpaths from cache mounts
Summary: CVE-2024-23651 moby/buildkit: possible race condition with accessing subpaths...
Keywords:
Status: NEW
Alias: CVE-2024-23651
Product: Security Response
Classification: Other
Component: vulnerability
Version: unspecified
Hardware: All
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Product Security
QA Contact:
URL:
Whiteboard:
Depends On:
Blocks: 2258742
TreeView+ depends on / blocked
 
Reported: 2024-02-01 09:56 UTC by TEJ RATHI
Modified: 2024-04-04 12:22 UTC (History)
41 users (show)

Fixed In Version: buildkit 0.12.5
Doc Type: If docs needed, set a value
Doc Text:
A race condition issue was found in the Moby Builder Toolkit, stemming from a time-of-check/time-of-use (TOCTOU) vulnerability during cache volume mounting at container build time. Concurrent execution of two malicious build steps, sharing the same cache mounts with subpaths, may result in files from the host system being accessible to the build container. Successful exploitation could lead to a container escape to the underlying host OS when building an image using a malicious Dockerfile or upstream image (for example, when using FROM).
Clone Of:
Environment:
Last Closed:
Embargoed:


Attachments (Terms of Use)

Description TEJ RATHI 2024-02-01 09:56:25 UTC
Docker Buildkit <=v0.12.4, as used by the Docker engine. The exploitation of this issue can result in container escape to the underlying host OS when building an image using a malicious Dockerfile or upstream image (i.e. when using FROM)

https://snyk.io/blog/cve-2024-23651-docker-buildkit-mount-cache-race/
https://www.openwall.com/lists/oss-security/2019/05/28/1
https://github.com/moby/buildkit/security/advisories/GHSA-m3r6-h7wv-7xxv
https://github.com/moby/buildkit/pull/4604


Note You need to log in before you can comment on or make changes to this bug.