Bug 1594090 (CVE-2018-13346)

Summary: CVE-2018-13346 mercurial: Missing check for fragment start position in mpatch.c:mpatch_apply()
Product: [Other] Security Response Reporter: Sam Fowler <sfowler>
Component: vulnerabilityAssignee: Red Hat Product Security <security-response-team>
Status: CLOSED ERRATA QA Contact:
Severity: low Docs Contact:
Priority: low    
Version: unspecifiedCC: jlaska, katzj, mads, ndbecker2, pcahyna
Target Milestone: ---Keywords: Security
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: mercurial 4.6.1 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2019-08-06 19:19:06 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: 1594088, 1594089, 1613129    
Bug Blocks: 1594086    

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:

https://www.mercurial-scm.org/wiki/WhatsNew#Mercurial_4.6.1_.282018-06-06.29


Upstream Patch:

https://www.mercurial-scm.org/repo/hg/rev/faa924469635

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):

https://access.redhat.com/security/cve/cve-2018-13346