Bug 2172004 (CVE-2021-32142)

Summary: CVE-2021-32142 LibRaw: stack buffer overflow in LibRaw_buffer_datastream::gets() in src/libraw_datastream.cpp
Product: [Other] Security Response Reporter: TEJ RATHI <trathi>
Component: vulnerabilityAssignee: Nobody <nobody>
Status: NEW --- QA Contact:
Severity: medium Docs Contact:
Priority: medium    
Version: unspecifiedCC: debarshir
Target Milestone: ---Keywords: Security
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
A flaw was found in the LibRaw package. A stack buffer overflow in the LibRaw_buffer_datastream::gets() function in src/libraw_datastream.cpp caused by a maliciously crafted file may result in compromised confidentiality and integrity and an application crash.
Story Points: ---
Clone Of: Environment:
Last Closed: 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: 2172134, 2172133, 2172135, 2172136, 2172138, 2172139, 2172140    
Bug Blocks: 2171901    

Description TEJ RATHI 2023-02-21 07:36:11 UTC
Buffer Overflow vulnerability in LibRaw linux/unix v0.20.0 allows attacker to escalate privileges via the LibRaw_buffer_datastream::gets(char*, int) in /src/libraw/src/libraw_datastream.cpp.

https://github.com/LibRaw/LibRaw/commit/bc3aaf4223fdb70d52d470dae65c5a7923ea2a49
https://github.com/LibRaw/LibRaw/issues/400

Comment 1 Marian Rehak 2023-02-21 15:06:31 UTC
Created LibRaw tracking bugs for this issue:

Affects: fedora-all [bug 2172133]


Created digikam tracking bugs for this issue:

Affects: epel-all [bug 2172134]
Affects: fedora-all [bug 2172135]


Created mingw-LibRaw tracking bugs for this issue:

Affects: fedora-all [bug 2172136]

Comment 4 Debarshi Ray 2023-09-26 11:21:04 UTC
Here's an attempted backport for LibRaw 0.19.x:
https://github.com/LibRaw/LibRaw/pull/611

Comment 5 errata-xmlrpc 2023-11-07 08:13:20 UTC
This issue has been addressed in the following products:

  Red Hat Enterprise Linux 9

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

Comment 6 errata-xmlrpc 2024-01-23 16:19:55 UTC
This issue has been addressed in the following products:

  Red Hat Enterprise Linux 7

Via RHSA-2024:0343 https://access.redhat.com/errata/RHSA-2024:0343