Bug 1298860 (CVE-2016-1901)

Summary: CVE-2016-1901 cgit: Integer Overflow resulting in Buffer Overflow
Product: [Other] Security Response Reporter: Adam Mariš <amaris>
Component: vulnerabilityAssignee: Red Hat Product Security <security-response-team>
Status: CLOSED UPSTREAM QA Contact:
Severity: medium Docs Contact:
Priority: medium    
Version: unspecifiedCC: carnil, kevin, praiskup, tmz
Target Milestone: ---Keywords: Security
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: cgit 0.12 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2019-06-08 02:47:28 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: 1298862, 1298863    
Bug Blocks:    

Description Adam Mariš 2016-01-15 09:42:48 UTC
A buffer overflow vulnerability in cgit was found. ctx.env.content_length is an unsigned int, coming from the CONTENT_LENGTH environment variable, which is parsed by strtoul. The HTTP/1.1 spec says that "any Content-Length greater than or equal to zero is a valid value." By storing this unsigned int into an int, we potentially overflow it, resulting in the following bounding check failing, leading to a buffer overflow.

Upstream patch:

http://git.zx2c4.com/cgit/commit/?id=4458abf64172a62b92810c2293450106e6dfc763

CVe assignment:

http://openwall.com/lists/oss-security/2016/01/14/6

Comment 1 Adam Mariš 2016-01-15 09:43:24 UTC
Created cgit tracking bugs for this issue:

Affects: fedora-all [bug 1298862]
Affects: epel-all [bug 1298863]

Comment 2 Fedora Update System 2016-01-26 03:19:10 UTC
cgit-0.12-1.fc22 has been pushed to the Fedora 22 stable repository. If problems still persist, please make note of it in this bug report.

Comment 3 Fedora Update System 2016-01-26 18:26:28 UTC
cgit-0.12-1.fc23 has been pushed to the Fedora 23 stable repository. If problems still persist, please make note of it in this bug report.

Comment 4 Fedora Update System 2016-02-01 22:54:47 UTC
cgit-0.12-1.el7 has been pushed to the Fedora EPEL 7 stable repository. If problems still persist, please make note of it in this bug report.

Comment 5 Fedora Update System 2016-02-01 23:24:51 UTC
cgit-0.12-1.el6 has been pushed to the Fedora EPEL 6 stable repository. If problems still persist, please make note of it in this bug report.

Comment 6 Product Security DevOps Team 2019-06-08 02:47:28 UTC
This CVE Bugzilla entry is for community support informational purposes only as it does not affect a package in a commercially supported Red Hat product. Refer to the dependent bugs for status of those individual community products.