Bug 2100044 (CVE-2021-46822)

Summary: CVE-2021-46822 libjpeg-turbo: heap buffer overflow in get_word_rgb_row() in rdppm.c
Product: [Other] Security Response Reporter: TEJ RATHI <trathi>
Component: vulnerabilityAssignee: Red Hat Product Security <security-response-team>
Status: CLOSED ERRATA QA Contact:
Severity: medium Docs Contact:
Priority: medium    
Version: unspecifiedCC: bdettelb, caswilli, dffrench, dkuc, erik-fedora, fjansen, gzaronik, jburrell, jkoehler, jwong, kaycoth, klember, kshier, manisandro, micjohns, mmuzila, negativo17, nforro, ngough, phracek, rgodfrey, rh-spice-bugs, rjones, sthirugn, tmeszaro, vkrizan, vonsch
Target Milestone: ---Keywords: Security
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: libjpeg-turbo 2.1.0 Doc Type: If docs needed, set a value
Doc Text:
A heap-based buffer overflow vulnerability was found in libjpeg-turbo in the get_word_rgb_row() function in rdppm.c. The flaw occurs when the PPM reader in libjpeg-turbo mishandles use of the tjLoadImage() function for loading a 16-bit binary PPM file into a grayscale uncompressed image buffer and then loading a 16-bit binary PGM file into an RGB uncompressed image buffer. This flaw allows a remote attacker to persuade a victim to open a specially-crafted file, causing the application to crash.
Story Points: ---
Clone Of: Environment:
Last Closed: 2023-03-06 17:09:16 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: 2102187, 2101702, 2101704, 2101764, 2103010, 2103011, 2169447    
Bug Blocks: 2099351    

Description TEJ RATHI 2022-06-22 09:07:30 UTC
The PPM reader in libjpeg-turbo through 2.0.90 mishandles use of tjLoadImage for loading a 16-bit binary PPM file into a grayscale buffer and loading a 16-bit binary PGM file into an RGB buffer. This is related to a heap-based buffer overflow in the get_word_rgb_row function in rdppm.c.

https://exchange.xforce.ibmcloud.com/vulnerabilities/221567
https://github.com/libjpeg-turbo/libjpeg-turbo/commit/f35fd27ec641c42d6b115bfa595e483ec58188d2

Comment 1 TEJ RATHI 2022-06-28 07:54:25 UTC
Created libjpeg-turbo tracking bugs for this issue:

Affects: fedora-all [bug 2101702]


Created mingw-libjpeg-turbo tracking bugs for this issue:

Affects: fedora-all [bug 2101704]

Comment 5 errata-xmlrpc 2023-03-06 10:56:09 UTC
This issue has been addressed in the following products:

  Red Hat Enterprise Linux 9

Via RHSA-2023:1068 https://access.redhat.com/errata/RHSA-2023:1068

Comment 6 Product Security DevOps Team 2023-03-06 17:09:12 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-2021-46822