mirror of
https://github.com/moby/buildkit.git
synced 2026-08-09 17:18:11 +00:00
Resolving a username to uid/gid read /etc/passwd and /etc/group via os.Open with no upper bound, letting a crafted image force unbounded memory use during user resolution. Cap reads at 10MiB and reject non-regular files in both the OCI executor and the chown user resolver. Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com> (cherry picked from commit 83cfc1e0ea1dcf8816f259ee6720b8694ab874e5)