Bug 2188240 (CVE-2023-1729)

Summary: CVE-2023-1729 LibRaw: a heap-buffer-overflow in raw2image_ex()
Product: [Other] Security Response Reporter: Marian Rehak <mrehak>
Component: vulnerabilityAssignee: Nobody <nobody>
Status: NEW --- QA Contact:
Severity: low Docs Contact:
Priority: low    
Version: unspecifiedCC: alekcejk, bugzilla_throwaway, debarshir, gwync
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 LibRaw. A heap-buffer-overflow in raw2image_ex() caused by a maliciously crafted file may lead to 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: 2188276, 2188274, 2188275, 2188277, 2188282, 2188283, 2188284    
Bug Blocks: 2175642    

Description Marian Rehak 2023-04-20 08:52:02 UTC
There exists heap-buffer-overflow when using function raw2image_ex(int).

Comment 1 Marian Rehak 2023-04-20 10:52:07 UTC
Created LibRaw tracking bugs for this issue:

Affects: fedora-all [bug 2188274]


Created digikam tracking bugs for this issue:

Affects: epel-all [bug 2188276]
Affects: fedora-all [bug 2188275]


Created mingw-LibRaw tracking bugs for this issue:

Affects: fedora-all [bug 2188277]

Comment 3 Gwyn Ciesla 2023-04-20 15:12:06 UTC
I need access to 2175642 if I am to patch LibRaw for Fedora.

Comment 4 bugzilla_throwaway 2023-04-21 09:35:59 UTC
Hi, could you please provide more information on this CVE? Like a patch or the fixed version? Thanks!

Comment 5 Debarshi Ray 2023-04-27 13:47:02 UTC
(In reply to bugzilla_throwaway from comment #4)
> Hi, could you please provide more information on this CVE? Like a patch or
> the fixed version? Thanks!

Yeah, I can't fix this for RHEL without a reference to a patch or an issue.  I don't see any relevant commits in 2023 to the upstream 0.21-stable branch:
https://github.com/LibRaw/LibRaw/tree/0.21-stable

Comment 7 nucleo 2023-05-07 17:44:44 UTC
I found fix for LibRaw issue 
https://github.com/LibRaw/LibRaw/commit/9ab70f6dca19229cb5caad7cc31af4e7501bac93
is applied in digiKam 8.0.0 sources
https://invent.kde.org/graphics/digikam/-/commit/7ba146e67f3417f325e60343de4a9bc88e81f29b

So bug 2188275 can be closed with digiKam update to 8.0.0?

Comment 8 Gwyn Ciesla 2023-05-08 14:26:25 UTC
(In reply to nucleo from comment #7)
> I found fix for LibRaw issue 
> https://github.com/LibRaw/LibRaw/commit/
> 9ab70f6dca19229cb5caad7cc31af4e7501bac93
> is applied in digiKam 8.0.0 sources
> https://invent.kde.org/graphics/digikam/-/commit/
> 7ba146e67f3417f325e60343de4a9bc88e81f29b
> 
> So bug 2188275 can be closed with digiKam update to 8.0.0?

Thank you, I'll get a LibRaw update out ASAP.

Comment 9 Debarshi Ray 2023-06-06 16:19:32 UTC
LibRaw backport for 0.21.x:
https://github.com/LibRaw/LibRaw/commit/477e0719ffc07190c89b4f3d12d51b1292e75828