Bug 1322264 (CVE-2016-3630) - CVE-2016-3630 mercurial: remote code execution in binary delta decoding
Summary: CVE-2016-3630 mercurial: remote code execution in binary delta decoding
Status: CLOSED NOTABUG
Alias: CVE-2016-3630
Product: Security Response
Classification: Other
Component: vulnerability
Version: unspecified
Hardware: All
OS: Linux
high
high
Target Milestone: ---
Assignee: Red Hat Product Security
QA Contact:
URL:
Whiteboard: impact=important,public=20160329,repo...
Keywords: Security
Depends On: 1322268
Blocks: 1322269
TreeView+ depends on / blocked
 
Reported: 2016-03-30 07:33 UTC by Andrej Nemec
Modified: 2019-06-08 21:05 UTC (History)
3 users (show)

(edit)
Clone Of:
(edit)
Last Closed: 2016-04-13 21:26:48 UTC


Attachments (Terms of Use)

Description Andrej Nemec 2016-03-30 07:33:17 UTC
Mercurial prior to 3.7.3 contained two bounds-checking errors in its binary delta decoder that may be exploitable via clone, push, or pull.

External references:

https://www.mercurial-scm.org/wiki/WhatsNew#Mercurial_3.7.3_.282016-3-29.29

Upstream fixes:

https://selenic.com/repo/hg-stable/rev/b6ed2505d6cf
https://selenic.com/repo/hg-stable/rev/b9714d958e89

Comment 1 Andrej Nemec 2016-03-30 07:43:33 UTC
Created mercurial tracking bugs for this issue:

Affects: fedora-all [bug 1322268]

Comment 2 Fedora Update System 2016-04-07 15:48:03 UTC
mercurial-3.5.2-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-04-07 15:50:25 UTC
mercurial-3.5.2-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 Tomas Hoger 2016-04-13 21:26:48 UTC
There are two problems in the decode() function, each addressed by one of the patches above:

- frag list array l may be allocated to size that is 1 less than the number of items that will be written to
- negative frag data length values are not handled correctly, leading to incorrect update of pointer to the parsed data buffer

Both of these issue lead to buffer overflow.

These problems were introduced in this commit:

https://selenic.com/repo/hg-stable/rev/09e41ac6289d

The mercurial versions in Red Hat Enterprise Linux 6 and 7 do not include that change and hence are not affected by this issue.


Note You need to log in before you can comment on or make changes to this bug.