Bug 1615585 (CVE-2018-15501)

Summary: CVE-2018-15501 libgit2: out-of-bounds reads when processing smart-protocol ng packets
Product: [Other] Security Response Reporter: Laura Pardo <lpardo>
Component: vulnerabilityAssignee: Red Hat Product Security <security-response-team>
Status: CLOSED NOTABUG QA Contact:
Severity: low Docs Contact:
Priority: low    
Version: unspecifiedCC: i, icq, torsava, veeti.paananen, walter.pete
Target Milestone: ---Keywords: Reopened, Security
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: libgit2 0.26.6, libgit2 0.27.4 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2019-07-12 13:05:54 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: 1615587, 1615588, 1615589    
Bug Blocks:    

Description Laura Pardo 2018-08-13 18:53:54 UTC
A flaw was found in libgit2, an out of bounds read when parsing an "ng" packet. libgit2 keeps track of both the current position as well as the remaining length of the packet itself. But instead of taking care not to exceed the length, libgit2 passs the current pointer's position to strchr, which will search for a certain character until hitting NUL. It is thus possible to create a crafted packet which doesn't contain a NUL byte to trigger an out-of-bounds read. 


References:
https://bugs.gentoo.org/662994

Upstream fix:
https://github.com/libgit2/libgit2/commit/1f9a8510e1d2f20ed7334eeeddb92c4dd8e7c649

Comment 1 Laura Pardo 2018-08-13 18:54:31 UTC
Created libgit2 tracking bugs for this issue:

Affects: epel-all [bug 1615589]
Affects: fedora-all [bug 1615587]

Comment 3 Product Security DevOps Team 2019-07-12 13:05:54 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-2018-15501