Bug 2024245 (CVE-2021-23177)

Summary: CVE-2021-23177 libarchive: extracting a symlink with ACLs modifies ACLs of target
Product: [Other] Security Response Reporter: Guilherme de Almeida Suckevicz <gsuckevi>
Component: vulnerabilityAssignee: Red Hat Product Security <security-response-team>
Status: CLOSED ERRATA QA Contact:
Severity: medium Docs Contact:
Priority: medium    
Version: unspecifiedCC: bdettelb, caswilli, databases-maint, dkuc, fjansen, jburrell, jwong, kaycoth, mike, ndevos, odubaj, panovotn, pkubat, praiskup, psegedy, sbiarozk, tcullum, vkumar, vmugicag
Target Milestone: ---Keywords: Security
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: libarchive 3.5.2 Doc Type: If docs needed, set a value
Doc Text:
An improper link resolution flaw while extracting an archive can lead to changing the access control list (ACL) of the target of the link. An attacker may provide a malicious archive to a victim user, who would trigger this flaw when trying to extract the archive. A local attacker may use this flaw to change the ACL of a file on the system and gain more privileges.
Story Points: ---
Clone Of: Environment:
Last Closed: 2022-03-15 15:46:44 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: 2024246, 2024247, 2026075, 2026078, 2026830, 2026831, 2028037    
Bug Blocks: 2024258, 2054464    

Description Guilherme de Almeida Suckevicz 2021-11-17 16:52:25 UTC
In libarchive before 3.5.2, when an archive entry contains a symbolic link that has defined ACLs on Linux, on extraction the ACLs of the link target are modified. This is because the function acl_set_file() is used without a prior check if the file is not a symbolic link. On Linux ACLs on symbolic links are not supported.

Reference:
https://github.com/libarchive/libarchive/issues/1565

Upstream patch:
https://github.com/libarchive/libarchive/commit/fba4f123cc456d2b2538f811bb831483bf336bad

Comment 1 Guilherme de Almeida Suckevicz 2021-11-17 16:52:46 UTC
Created libarchive tracking bugs for this issue:

Affects: fedora-all [bug 2024246]


Created mingw-libarchive tracking bugs for this issue:

Affects: fedora-all [bug 2024247]

Comment 11 Todd Cullum 2022-02-15 19:16:49 UTC
*** Bug 2054465 has been marked as a duplicate of this bug. ***

Comment 13 errata-xmlrpc 2022-03-15 10:20:11 UTC
This issue has been addressed in the following products:

  Red Hat Enterprise Linux 8

Via RHSA-2022:0892 https://access.redhat.com/errata/RHSA-2022:0892

Comment 14 Product Security DevOps Team 2022-03-15 15:46:41 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-2021-23177