Описание
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.
A flaw was found in BuildKit. A local user with build permissions can trigger a Denial of Service (DoS) by submitting a build context containing an oversized Dockerfile or .dockerignore file. Because the Dockerfile frontend loads these files directly into memory without enforcing a size limit, an excessively large file can exhaust system memory and terminate the build daemon. This termination halts all other active build processes running on the same instance.
Отчет
A flaw was found in BuildKit's Dockerfile frontend when processing build contexts. The frontend loads Dockerfile and .dockerignore files directly into memory without enforcing an upper size limit. An authenticated user authorized to submit builds can provide an excessively large Dockerfile or .dockerignore file, forcing the buildkitd daemon to allocate memory proportional to the file size. This unbounded allocation can exhaust host or container memory limits and trigger an out-of-memory termination of the daemon process, crashing active builds running on shared instances.
Меры по смягчению последствий
Enforce file size limits in source control or CI/CD pre-commit hooks to reject Dockerfile and .dockerignore files exceeding 16 MiB prior to build submission, and restrict build execution privileges to trusted users.
Затронутые пакеты
| Платформа | Пакет | Состояние | Рекомендация | Релиз |
|---|---|---|---|---|
| Red Hat Hardened Images | buildah | Not affected | ||
| Red Hat Hardened Images | podman | Not affected | ||
| Red Hat Hardened Images | trivy | Not affected | ||
| Red Hat Quay 3 | quay/quay-builder-rhel8 | Fix deferred | ||
| Red Hat Quay 3 | quay/quay-builder-rhel9 | Fix deferred |
Показывать по
Дополнительная информация
Статус:
EPSS
5.5 Medium
CVSS3
Связанные уязвимости
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.
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.
The Dockerfile frontend loaded the Dockerfile and .dockerignore files ...
EPSS
5.5 Medium
CVSS3