Bug 2083365 (CVE-2022-27114)

Summary: CVE-2022-27114 htmldoc: image_load_jpeg can cause integer overflow
Product: [Other] Security Response Reporter: Anten Skrabec <askrabec>
Component: vulnerabilityAssignee: Red Hat Product Security <security-response-team>
Status: CLOSED UPSTREAM QA Contact:
Severity: medium Docs Contact:
Priority: medium    
Version: unspecifiedCC: extras-orphan, rdieter
Target Milestone: ---Keywords: Security
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2022-05-10 00:14:55 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: 2083367, 2083366, 2083368    
Bug Blocks: 2083369    

Description Anten Skrabec 2022-05-09 19:21:46 UTC
There is a vulnerability in htmldoc 1.9.16. In image_load_jpeg function image.cxx when it calls malloc,'img->width' and 'img->height' they are large enough to cause an integer overflow. So, the malloc function may return a heap blop smaller than the expected size, and it will cause a buffer overflow/Address boundary error in the jpeg_read_scanlines function.

https://github.com/michaelrsweet/htmldoc/commit/31f780487e5ddc426888638786cdc47631687275
https://github.com/michaelrsweet/htmldoc/issues/471

Comment 1 Anten Skrabec 2022-05-09 19:21:59 UTC
Created htmldoc tracking bugs for this issue:

Affects: fedora-all [bug 2083366]

Comment 2 Anten Skrabec 2022-05-09 19:23:05 UTC
Created htmldoc tracking bugs for this issue:

Affects: epel-7 [bug 2083367]
Affects: fedora-34 [bug 2083368]

Comment 3 Product Security DevOps Team 2022-05-10 00:14:53 UTC
This CVE Bugzilla entry is for community support informational purposes only as it does not affect a package in a commercially supported Red Hat product. Refer to the dependent bugs for status of those individual community products.