Bug 1594090 (CVE-2018-13346) - CVE-2018-13346 mercurial: Missing check for fragment start position in mpatch.c:mpatch_apply()
Summary: CVE-2018-13346 mercurial: Missing check for fragment start position in mpatch...
Alias: CVE-2018-13346
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:49 UTC by Sam Fowler
Modified: 2020-04-21 06:48 UTC (History)
5 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:06 UTC

Attachments (Terms of Use)

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

Description Sam Fowler 2018-06-22 04:49:21 UTC
Mercurial before version 4.6.1 has a missing check for fragment start position in mpatch.c:mpatch_apply()

Upstream Changelog:


Upstream Patch:


Comment 1 Doran Moppert 2018-07-27 04:52:14 UTC
This is related to CVE-2018-13347: this issue is reading past the end of input where the other writes before the output buffer.  In mercurial 2.6.2, it is present in the apply() function.

Comment 2 Doran Moppert 2018-08-07 05:08:19 UTC
Created mercurial tracking bugs for this issue:

Affects: fedora-all [bug 1594088]

Comment 4 errata-xmlrpc 2019-08-06 12:34:51 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 5 Product Security DevOps Team 2019-08-06 19:19:06 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.