Podman: podman: quadlet install --replace non-truncating write retains removed host-access directives
- Published
- Last modified
- Where the record stands: published, rejected by its publisher, or superseded by another id.What do these mean? →
- published
- Whether CISA lists it in its Known Exploited Vulnerabilities catalog: proof that attackers are using it.What do these mean? →
- Not listed in CISA KEV
- Fix
- Fixed in 5.8.6
- Whether working attack code is public (Exploit-DB, Metasploit, Nuclei or GitHub). Public code makes attacks easier.What do these mean? →
- None on Exploit-DB, Metasploit or GitHub
- Exploitation: poc
- Automatable: no
- Technical impact: partial
Summary
The 'podman quadlet install --replace' command opens the existing destination file with O_CREATE|O_WRONLY but omits O_TRUNC. When the initial reflink copy attempt fails (common on non-reflink-capable filesystems including many RHEL default XFS configurations), the fallback in ReflinkOrCopy uses io.Copy which performs a non-truncating write. If the original Quadlet is larger than the new Quadlet, the file is not truncated and content from the original is preserved. The command completes with no warning. There is no risk of information leakage as the user already had access to the Quadlet in order to replace it, and in most cases, this would only lead to invalid Quadlet files. However, security-related options from the end of the old Quadlet could be included in the new Quadlet, and if the truncation resulted in a valid Quadlet file, this could result in undesirable behavior. For example, running podman quadlet install --replace to remove a single line from the end of a Quadlet - including security-sensitive content, like AddCapability - will fail, and the option will continue to be used. Further, with Volume Quadlets, this can include additional mounts which can cause content to be unintentionally exposed into containers. If, later, the image is updated then compromised content might be leaked to an attacker. The vulnerable code paths are in pkg/domain/infra/abi/quadlet.go (lines 338-360, O_CREATE|O_WRONLY without O_TRUNC) and vendor/go.podman.io/storage/pkg/fileutils/reflink_linux.go (lines 12-19, non-truncating io.Copy fallback).
Timeline
- CVE published
- CISA SSVC assessment
Exploitation: poc · Automatable: no · Technical impact: partial
- Record last updated
Affected versions
- podman
Version range not reported
- podman
Version range not reported
- ansible-automation-platform-24/eda-controller-rhel8
Version range not reported
- ansible-automation-platform-25/eda-controller-rhel8
Version range not reported
- ansible-automation-platform-26/eda-controller-rhel9
Version range not reported
- ansible-automation-platform-27/eda-controller-rhel9
Version range not reported
- container-tools:rhel8/podman
Version range not reported
- podman
Version range not reported
- podman
Version range not reported
- podman
Version range not reported
- devspaces/udi-base-rhel10
Version range not reported
- devspaces/udi-base-rhel9
Version range not reported
- devspaces/udi-rhel9
Version range not reported
- container-native-virtualization/ocp-virt-validation-checkup-rhel9
Version range not reported
- quay/quay-builder-rhel8
Version range not reported
- quay/quay-builder-rhel9
Version range not reported
- github.com/containers/podman/v5Go
From 5.7.0 · fixed in 5.8.6
- github.com/containers/podmanGo
All versions
- github.com/containers/podman/v2Go
All versions
- github.com/containers/podman/v3Go
All versions
- github.com/containers/podman/v4Go
All versions