Bug 1452549 (CVE-2017-9048)

Summary: CVE-2017-9048 libxml2: Stack-based buffer overflow in function xmlSnprintfElementContent
Product: [Other] Security Response Reporter: Andrej Nemec <anemec>
Component: vulnerabilityAssignee: Red Hat Product Security <security-response-team>
Status: CLOSED WONTFIX QA Contact:
Severity: low Docs Contact:
Priority: low    
Version: unspecifiedCC: athmanem, c.david86, csutherl, dmoppert, erik-fedora, fedora-mingw, gzaronik, jclere, ktietz, lgao, mbabacek, mturk, myarboro, ohudlick, rh-spice-bugs, rjones, sardella, slawomir, twalsh, veillard, weli
Target Milestone: ---Keywords: Security
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: libxml2 2.9.5 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2018-02-26 05:10:17 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: 1452550, 1452551, 1548942, 1695415    
Bug Blocks: 1452558    

Description Andrej Nemec 2017-05-19 07:54:30 UTC
libxml2 is vulnerable to a stack-based buffer overflow. The function xmlSnprintfElementContent in valid.c is supposed to recursively dump the element content definition into a char buffer 'buf' of size 'size'. At the end of the routine, the function may strcat two more characters without checking whether the current strlen(buf) + 2 < size. This vulnerability causes programs that use libxml2 to crash. 

References:

http://seclists.org/oss-sec/2017/q2/258

Comment 1 Andrej Nemec 2017-05-19 07:55:03 UTC
Created libxml2 tracking bugs for this issue:

Affects: fedora-all [bug 1452550]


Created mingw-libxml2 tracking bugs for this issue:

Affects: fedora-all [bug 1452551]

Comment 3 Doran Moppert 2018-02-26 04:48:53 UTC
Statement:

This vulnerability exists in the DTD validation functionality of libxml2.  Applications that do not attempt to validate untrusted documents are not impacted.

Comment 7 Doran Moppert 2019-04-03 03:04:50 UTC
Upstream patch:

https://gitlab.gnome.org/GNOME/libxml2/commit/932cc9896ab