Bug 1829397 (CVE-2020-12278)

Summary: CVE-2020-12278 libgit2: files inside the .git directory may be overwritten during cloning via NTFS Alternate Data Streams
Product: [Other] Security Response Reporter: Riccardo Schirone <rschiron>
Component: vulnerabilityAssignee: Red Hat Product Security <security-response-team>
Status: CLOSED WONTFIX QA Contact:
Severity: low Docs Contact:
Priority: low    
Version: unspecifiedCC: bcl, i, icq, igor.raits, walter.pete
Target Milestone: ---Keywords: Security
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: libgit2 0.28.4, libgit2 0.99.0 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2021-10-28 09:48:08 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: 1829422, 1829424, 1829426, 1829428, 1829431, 1829434, 1829435    
Bug Blocks: 1829386    

Description Riccardo Schirone 2020-04-29 13:53:49 UTC
An issue was discovered in libgit2 where path.c mishandles equivalent filenames that exist because of NTFS Alternate Data Streams. This may allow remote code execution when cloning a repository. This issue is the libgit2 variant of CVE-2019-1352.

References:
https://github.com/git/git/security/advisories/GHSA-5wph-8frv-58vj
https://github.com/libgit2/libgit2/commit/3f7851eadca36a99627ad78cbe56a40d3776ed01
https://github.com/libgit2/libgit2/commit/e1832eb20a7089f6383cfce474f213157f5300cb
https://github.com/libgit2/libgit2/releases/tag/v0.28.4
https://github.com/libgit2/libgit2/releases/tag/v0.99.0

Comment 1 Riccardo Schirone 2020-04-29 14:16:03 UTC
Statement:

Even if the code in the versions of libgit2 as shipped with Red Hat Enterprise Linux 7, and 8 are affected by this flaw, Red Hat does not support the NTFS filesystem. For this reason, the flaw has a Low Impact.

Comment 2 Riccardo Schirone 2020-04-29 14:24:31 UTC
Created libgit2 tracking bugs for this issue:

Affects: epel-all [bug 1829422]
Affects: fedora-all [bug 1829424]


Created libgit2:0.26/libgit2 tracking bugs for this issue:

Affects: fedora-all [bug 1829426]


Created libgit2:0.27/libgit2 tracking bugs for this issue:

Affects: fedora-all [bug 1829428]


Created libgit2:0.28/libgit2 tracking bugs for this issue:

Affects: fedora-all [bug 1829431]