Bug 1781960 (CVE-2019-1351)

Summary: CVE-2019-1351 git: Git mistakes some paths for relative paths allowing writing outside of the worktree while cloning
Product: [Other] Security Response Reporter: Pedro Sampaio <psampaio>
Component: vulnerabilityAssignee: Red Hat Product Security <security-response-team>
Status: CLOSED NOTABUG QA Contact:
Severity: medium Docs Contact:
Priority: medium    
Version: unspecifiedCC: amahdal, besser82, c.david86, chrisw, hhorak, jorton, opohorel, pcahyna, pstodulk, sebastian.kisela, tmz
Target Milestone: ---Keywords: Security
Target Release: ---   
Hardware: All   
OS: Linux   
Fixed In Version: git 2.24.1, git 2.23.1, git 2.22.2, git 2.21.1, git 2.20.2, git 2.19.3, git 2.18.2, git 2.17.3, git 2.16.6, git 2.15.4, git 2.14.6 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2019-12-17 18:05:48 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Bug Depends On: 1781961    
Bug Blocks: 1781145    

Description Pedro Sampaio 2019-12-11 00:16:06 UTC
While the only permitted drive letters for physical drives on Windows are letters of the US-English alphabet, this restriction does not apply to virtual drives assigned via subst <letter>:<path>. Git mistook such paths for relative paths, allowing writing outside of the worktree while cloning.



Comment 1 Pedro Sampaio 2019-12-11 00:16:51 UTC
Created git tracking bugs for this issue:

Affects: fedora-all [bug 1781961]

Comment 2 Pavel Cahyna 2019-12-12 09:27:01 UTC
Does this bug apply to Fedora (or RHEL)? The commit (https://git.kernel.org/pub/scm/git/git.git/commit/?id=f82a97eb9197c1e3768e72648f37ce0ca3233734) explicitly mentions mingw.

Comment 3 Riccardo Schirone 2019-12-13 16:41:15 UTC
oss-security mailing list reference:

Comment 4 Riccardo Schirone 2019-12-13 16:42:31 UTC
External References:


Comment 5 Riccardo Schirone 2019-12-17 18:00:14 UTC
Upstream fix:

Comment 6 Riccardo Schirone 2019-12-17 18:05:51 UTC

This issue did not affect the versions of git as shipped with Red Hat Enterprise Linux 6, 7, and 8 as this is a Windows only issue and it does not affect the Linux versions of git.