Bug 2168256 (CVE-2023-0778)

Summary: CVE-2023-0778 podman: symlink exchange attack in podman export volume
Product: [Other] Security Response Reporter: Avinash Hanwate <ahanwate>
Component: vulnerabilityAssignee: Red Hat Product Security <security-response-team>
Status: CLOSED ERRATA QA Contact:
Severity: medium Docs Contact:
Priority: medium    
Version: unspecifiedCC: arajan, bbaude, dan.cermak, dfreiber, dwalsh, jburrell, jligon, jnovy, lsm5, mboddu, mheon, pthomas, rogbas, security-response-team, tsweeney, umohnani, vkumar
Target Milestone: ---Keywords: Security
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: podman 4.4.2 Doc Type: If docs needed, set a value
Doc Text:
A Time-of-check Time-of-use (TOCTOU) flaw was found in podman. This issue may allow a malicious user to replace a normal file in a volume with a symlink while exporting the volume, allowing for access to arbitrary files on the host file system.
Story Points: ---
Clone Of: Environment:
Last Closed: 2023-05-18 06:33:32 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On: 2169616, 2169617, 2169618, 2169619, 2170631    
Bug Blocks: 2166758    

Description Avinash Hanwate 2023-02-08 15:20:51 UTC
An attacker who has control on a container using a Volume can traverse arbitrary files on the host filesystem (which essentially is an escape)
when an administrator tries to export this Volume, by exploiting a TOCTTOU vulnerability to replace a normal file in the Volume as a symlink.

The container-based platform can use Podman as the container engine and provide interfaces that encapsulate common commands (e.g., run, cp, volume
create, etc.) for its users to manage the container. We assume that the adversary in the container-based platform can control multiple containers
and attempt to escape from the containers, and can also request the platforms via legitimate interfaces to create volumes, start-up containers
connected to the volume, migrate (or extract) the volume (by the 'volume export' and 'volume import'), and so on. When the platform performs 'volume
export', the adversary can exploit this vulnerability to steal the sensitive file on the host and get it from the exported tarball or the migrated volume.

Comment 4 Anten Skrabec 2023-02-16 20:26:53 UTC
Created podman tracking bugs for this issue:

Affects: fedora-all [bug 2170631]

Comment 7 errata-xmlrpc 2023-05-16 08:09:52 UTC
This issue has been addressed in the following products:

  Red Hat Enterprise Linux 8

Via RHSA-2023:2758 https://access.redhat.com/errata/RHSA-2023:2758

Comment 8 errata-xmlrpc 2023-05-16 08:14:29 UTC
This issue has been addressed in the following products:

  Red Hat Enterprise Linux 8

Via RHSA-2023:2802 https://access.redhat.com/errata/RHSA-2023:2802

Comment 9 errata-xmlrpc 2023-05-17 22:53:42 UTC
This issue has been addressed in the following products:

  Red Hat OpenShift Container Platform 4.13

Via RHSA-2023:1325 https://access.redhat.com/errata/RHSA-2023:1325

Comment 10 Product Security DevOps Team 2023-05-18 06:33:30 UTC
This bug is now closed. Further updates for individual products will be reflected on the CVE page(s):

https://access.redhat.com/security/cve/cve-2023-0778