Bug 2158359 (CVE-2022-44940) - CVE-2022-44940 patchelf: an out-of-bounds read via the function modifyRPath
Summary: CVE-2022-44940 patchelf: an out-of-bounds read via the function modifyRPath
Keywords:
Status: CLOSED UPSTREAM
Alias: CVE-2022-44940
Product: Security Response
Classification: Other
Component: vulnerability
Version: unspecified
Hardware: All
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Red Hat Product Security
QA Contact:
URL:
Whiteboard:
Depends On: 2158360 2158361
Blocks:
TreeView+ depends on / blocked
 
Reported: 2023-01-05 08:04 UTC by Marian Rehak
Modified: 2023-01-07 03:30 UTC (History)
1 user (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2023-01-07 03:30:38 UTC
Embargoed:


Attachments (Terms of Use)

Description Marian Rehak 2023-01-05 08:04:13 UTC
Patchelf v0.9 was discovered to contain an out-of-bounds read via the function modifyRPath at src/patchelf.cc.

Reference:

https://github.com/NixOS/patchelf/pull/419

Comment 1 Marian Rehak 2023-01-05 08:04:54 UTC
Created patchelf tracking bugs for this issue:

Affects: epel-all [bug 2158360]
Affects: fedora-all [bug 2158361]

Comment 2 Jeremy Sanders 2023-01-05 16:00:13 UTC
This CVE seems to be fixed in versions 0.16.0 or greater.

Possibly affected releases are:
Fedora 37	patchelf-0.15.0-1.fc37	
Fedora 36	patchelf-0.13-2.fc36	
Fedora EPEL 9	patchelf-0.15.0-1.el9	
Fedora EPEL 8	patchelf-0.12-1.el8	
Fedora EPEL 7	patchelf-0.12-1.el7

However, after looking through recent commits there are also these potential security patches (without CVE numbers):

https://github.com/NixOS/patchelf/commit/e9d339465963968ea98cc98a5c218ccfef9b74f3 (not included in the latest release)
https://github.com/NixOS/patchelf/commit/bf62fda4ecab0dc44a0b823517d1cf22633adc25 (fixed in 0.14 and later)
https://github.com/NixOS/patchelf/commit/fa8896a5a8651dd399f0ad4dfbabb3df9767d847 (fixed in 0.13 and later)

One potential issue is that C++17 is required from 0.14 or later, which may cause issues in EPEL7+8. The patches do not apply cleanly to older versions as the code has substantially changed. 

Perhaps the cleanest is to go to to 0.17.0 everywhere, and include the patch not included in the latest release (I'll ask upstream to make a new release with this). Probably Developer Toolset is necessary for EPEL7+8.

Comment 3 Product Security DevOps Team 2023-01-07 03:30:36 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.


Note You need to log in before you can comment on or make changes to this bug.