Bug 1594087 (CVE-2018-13347) - CVE-2018-13347 mercurial: Buffer underflow in mpatch.c:mpatch_apply()
Summary: CVE-2018-13347 mercurial: Buffer underflow in mpatch.c:mpatch_apply()
Alias: CVE-2018-13347
Product: Security Response
Classification: Other
Component: vulnerability
Version: unspecified
Hardware: All
OS: Linux
Target Milestone: ---
Assignee: Red Hat Product Security
QA Contact:
Depends On: 1594088 1594089 1613129
Blocks: 1594086
TreeView+ depends on / blocked
Reported: 2018-06-22 04:43 UTC by Sam Fowler
Modified: 2019-09-29 14:42 UTC (History)
6 users (show)

Fixed In Version: mercurial 4.6.1
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Last Closed: 2019-08-06 19:19:04 UTC

Attachments (Terms of Use)

System ID Priority Status Summary Last Updated
Red Hat Product Errata RHSA-2019:2276 None None None 2019-08-06 12:35:12 UTC

Description Sam Fowler 2018-06-22 04:43:57 UTC
Mercurial before version 4.6.1 is vulnerable to a buffer underflow in mpatch.c:mpatch_apply().

Upstream Changelog:


Upstream Patch:


Comment 1 Sam Fowler 2018-06-22 04:44:24 UTC
Created mercurial tracking bugs for this issue:

Affects: fedora-all [bug 1594088]

Comment 3 Doran Moppert 2018-07-27 04:51:23 UTC
This is related to CVE-2018-13346: this issue is writing before the output buffer, where the other reads past the end of input.  In mercurial 2.6.2, it is present in the apply() function.

Comment 5 errata-xmlrpc 2019-08-06 12:34:49 UTC
This issue has been addressed in the following products:

  Red Hat Enterprise Linux 7

Via RHSA-2019:2276 https://access.redhat.com/errata/RHSA-2019:2276

Comment 6 Product Security DevOps Team 2019-08-06 19:19:04 UTC
This bug is now closed. Further updates for individual products will be reflected on the CVE page(s):


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