Oversized Dockerfile or .dockerignore can exhaust buildkitd memory
moby BuildKit
Affected versions
| Product | Affected | Fixed in |
|---|---|---|
| moby BuildKit |
| No fix yet |
Original description
The Dockerfile frontend loaded the Dockerfile and .dockerignore files of a build context into memory without a size limit. A build context containing an oversized file could make buildkitd allocate memory proportional to that file, potentially exhausting memory and terminating the daemon, which interrupts other builds on the same instance. Fixed by rejecting such files above 16 MiB.
From the CVE record · Docker