Bug 2460425 (CVE-2026-48864)

Summary: CVE-2026-48864 libsolv: Heap buffer overflow in libsolv repopagestore via unchecked decompression of malicious .solv page data
Product: [Other] Security Response Reporter: OSIDB Bzimport <bzimport>
Component: vulnerabilityAssignee: Product Security DevOps Team <prodsec-dev>
Status: NEW --- QA Contact:
Severity: medium Docs Contact:
Priority: medium    
Version: unspecifiedCC: anthomas, dranck, egoode, ehelms, ggainey, juwatts, lbrazdil, mhulan, mminar, nmoumoul, osousa, pcreech, ppisar, rbiba, rchan, rgatica, rhel-process-autobot, security-response-team, smallamp, sskracic, tmalecek, tpfromme, watson-tool-maintainers
Target Milestone: ---Keywords: Security
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: ---
Doc Text:
A flaw was found in libsolv. This heap buffer overflow occurs during the decompression of attacker-controlled compressed data within `.solv` files due to insufficient input validation. An attacker can provide a specially crafted `.solv` file, which, when processed by a vulnerable application, can lead to out-of-bounds memory access. This could result in information disclosure, alteration of program execution, or a denial of service.
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:
Attachments:
Description Flags
Proposed fix none

Description OSIDB Bzimport 2026-04-21 23:20:04 UTC
AI_ONLY_REPORT
package: libsolv-0.7.36-2.hum1
------
Summary: Heap Buffer Overflow in repopagestore_load_page_range via Malicious Compressed Data: libsolv decompresses attacker-controlled compressed `.solv` page data with `unchecked_decompress_buf` before validating the required output length or back-reference safety, allowing out-of-bounds reads and writes during page loading.
Requirements to exploit: An attacker must be able to supply a crafted `.solv` file or attacker-controlled repository metadata with compressed page data and cause a victim application to parse it through the normal loading flow that reaches `repopagestore_read_or_setup_pages` or `repopagestore_load_page_range`. No privileges on the target are required, but the victim must ingest the malicious content.
Component affected: libsolv - `src/repopage.c` (`repopagestore_load_page_range`, `repopagestore_read_or_setup_pages`)
Version affected: at least `libsolv-0.7.36` (confirmed in the source report); likely other releases that contain the same `src/repopage.c` call sites without `check_decompress_buf` before page decompression
Patch available: Proposed fix included in this report (see "Proposed Fix"); upstream release status unknown.
Version fixed (if any already): unknown
Upstream coordination: Initial disclosure draft prepared for libsolv maintainers.
CVSS: CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H - 7.8 (HIGH)
AV:L - The vulnerable component is a local parser reached when a victim application loads attacker-controlled `.solv` content.
AC:L - No unusual preconditions are required once crafted compressed page data is processed.
PR:N - The attacker does not need privileges on the target system.
UI:R - A victim must cause a vulnerable libsolv consumer to parse the malicious `.solv` content.
S:U - The impact remains within the vulnerable component's security scope.
C:H - Successful memory corruption could expose sensitive process memory.
I:H - Successful memory corruption could allow modification of process state or control flow.
A:H - Malformed metadata can crash the process and may permit broader denial of service.
Impact: Moderate. This is a memory-safety flaw in a parser for attacker-controlled `.solv` metadata. The report demonstrates out-of-bounds read and write conditions during normal parsing, but exploitation still requires the victim to ingest malicious `.solv` content and does not show reliable code execution in a default remote, no-interaction scenario.
Embargo: yes
Reason: The source report proposes a standard 90-day coordinated disclosure window while the issue is validated and a fix is prepared.
Suggested public date: 16-Jul-2026
Acknowledgement: Aisle Research
Steps to reproduce:
1. Build libsolv with AddressSanitizer (`-fsanitize=address`) and symbols.
2. Prepare a `.solv` file containing vertical page data marked as compressed.
3. Encode a compressed stream that either decompresses beyond `REPOPAGE_BLOBSIZE` (32 KB) or uses a back-reference offset larger than the amount of data already produced.
4. Load the file via normal `.solv` parsing flow, for example through a path that reaches `repo_add_solv`, `repopagestore_read_or_setup_pages`, or `repopagestore_load_page_range`.
5. Observe an ASan crash such as `heap-buffer-overflow` or invalid read during `unchecked_decompress_buf`.
------


Vulnerability Details






The issue is in page-loading paths that decompress attacker-controlled data from `.solv` files using `unchecked_decompress_buf` without pre-validation:
```c
/* src/repopage.c */
if (compressed)
{
unsigned int out_len;
out_len = unchecked_decompress_buf(buf, in_len, dest, REPOPAGE_BLOBSIZE);
if (out_len != REPOPAGE_BLOBSIZE && pnum < store->num_pages - 1)
return 0;
}
```
```c
/* src/repopage.c */
if (compressed)
{
out_len = unchecked_decompress_buf(buf, in_len, dest, REPOPAGE_BLOBSIZE);
if (out_len != REPOPAGE_BLOBSIZE && i < npages - 1)
return SOLV_ERROR_CORRUPT;
}
```
`unchecked_decompress_buf` does not enforce output bounds and does not validate back-reference safety before dereference. A safer pattern already exists elsewhere:
```c
/* src/repopage.c */
unsigned int l = check_decompress_buf(cpage, len);
if (l == 0 || l > max)
return 0;
return unchecked_decompress_buf(cpage, len, page, max);
```
This makes crafted compressed pages able to trigger:
Out-of-bounds write to the destination page buffer (`REPOPAGE_BLOBSIZE`), and/or

Out-of-bounds read via invalid back-reference offsets.


Relevant CWEs:
`CWE-787` (Out-of-bounds Write)

`CWE-125` (Out-of-bounds Read)

`CWE-20` (Improper Input Validation)




Proposed Fix






Suggested patch to validate compressed pages before decompression in both vulnerable paths:
```diff
diff --git a/src/repopage.c b/src/repopage.c
— a/src/repopage.c
+++ b/src/repopage.c
@@ -770,8 +770,13 @@ repopagestore_load_page_range(Repopagestore *store, unsigned int pstart, unsigned int pend)
if (compressed)
{
unsigned int out_len;

out_len = unchecked_decompress_buf(buf, in_len, dest, REPOPAGE_BLOBSIZE);
+ unsigned int out_len;
+ unsigned int need_len = check_decompress_buf(buf, in_len);
+ if (need_len == 0 || need_len > REPOPAGE_BLOBSIZE ||
+ (need_len != REPOPAGE_BLOBSIZE && pnum < store->num_pages - 1))
+ return 0;
+ out_len = unchecked_decompress_buf(buf, in_len, dest, REPOPAGE_BLOBSIZE);
+ if (out_len != need_len)
+ return 0;
 if (out_len != REPOPAGE_BLOBSIZE && pnum < store->num_pages - 1)
 {
 #ifdef DEBUG_PAGING
@@ -910,8 +915,13 @@ repopagestore_read_or_setup_pages(Repopagestore *store, FILE *fp, unsigned int pagesz, unsigned int blobsz)
 if (compressed)
 {

out_len = unchecked_decompress_buf(buf, in_len, dest, REPOPAGE_BLOBSIZE);
+ unsigned int need_len = check_decompress_buf(buf, in_len);
+ if (need_len == 0 || need_len > REPOPAGE_BLOBSIZE ||
+ (need_len != REPOPAGE_BLOBSIZE && i < npages - 1))
+ return SOLV_ERROR_CORRUPT;
+ out_len = unchecked_decompress_buf(buf, in_len, dest, REPOPAGE_BLOBSIZE);
+ if (out_len != need_len)
+ return SOLV_ERROR_CORRUPT;
 if (out_len != REPOPAGE_BLOBSIZE && i < npages - 1)
 {
 return SOLV_ERROR_CORRUPT;
```


------
This report was generated using AI technology. Always review AI-generated content prior to use

Comment 2 Petr Pisar 2026-05-25 07:50:25 UTC
Upstream confirmed this flaw but disagrees with the severity:

> That's again the solv file parser, so I don't
> consider this as a security risk.

Comment 3 Petr Pisar 2026-05-27 08:58:27 UTC
Created attachment 2143070 [details]
Proposed fix

Comment 4 errata-xmlrpc 2026-06-23 19:17:02 UTC
This issue has been addressed in the following products:

  Red Hat Enterprise Linux 10

Via RHSA-2026:28236 https://access.redhat.com/errata/RHSA-2026:28236

Comment 5 errata-xmlrpc 2026-07-08 14:06:51 UTC
This issue has been addressed in the following products:

  Red Hat Enterprise Linux 8

Via RHSA-2026:36730 https://access.redhat.com/errata/RHSA-2026:36730

Comment 7 errata-xmlrpc 2026-07-14 20:30:17 UTC
This issue has been addressed in the following products:

  Red Hat Enterprise Linux 9

Via RHSA-2026:39315 https://access.redhat.com/errata/RHSA-2026:39315

Comment 9 errata-xmlrpc 2026-07-30 15:50:45 UTC
This issue has been addressed in the following products:

  Red Hat Enterprise Linux 8.6 Advanced Mission Critical Update Support
  Red Hat Enterprise Linux 8.6 Extended Update Support Long-Life Add-On

Via RHSA-2026:48815 https://access.redhat.com/errata/RHSA-2026:48815

Comment 10 errata-xmlrpc 2026-07-30 16:07:47 UTC
This issue has been addressed in the following products:

  Red Hat Enterprise Linux 9.2 Update Services for SAP Solutions

Via RHSA-2026:48814 https://access.redhat.com/errata/RHSA-2026:48814

Comment 11 errata-xmlrpc 2026-07-30 16:20:42 UTC
This issue has been addressed in the following products:

  Red Hat Enterprise Linux 9.4 Update Services for SAP Solutions

Via RHSA-2026:48813 https://access.redhat.com/errata/RHSA-2026:48813

Comment 12 errata-xmlrpc 2026-07-30 16:27:29 UTC
This issue has been addressed in the following products:

  Red Hat Enterprise Linux 8.4 Advanced Mission Critical Update Support
  Red Hat Enterprise Linux 8.4 Extended Update Support Long-Life Add-On

Via RHSA-2026:48817 https://access.redhat.com/errata/RHSA-2026:48817

Comment 13 errata-xmlrpc 2026-07-30 16:31:09 UTC
This issue has been addressed in the following products:

  Red Hat Enterprise Linux 9.6 Extended Update Support

Via RHSA-2026:48811 https://access.redhat.com/errata/RHSA-2026:48811

Comment 14 errata-xmlrpc 2026-07-30 16:39:02 UTC
This issue has been addressed in the following products:

  Red Hat Enterprise Linux 8.8 Update Services for SAP Solutions
  Red Hat Enterprise Linux 8.8 Telecommunications Update Service

Via RHSA-2026:48816 https://access.redhat.com/errata/RHSA-2026:48816

Comment 15 errata-xmlrpc 2026-07-30 16:45:51 UTC
This issue has been addressed in the following products:

  Red Hat Enterprise Linux 10.0 Extended Update Support

Via RHSA-2026:48818 https://access.redhat.com/errata/RHSA-2026:48818

Comment 17 errata-xmlrpc 2026-08-03 19:01:19 UTC
This issue has been addressed in the following products:

  Red Hat Enterprise Linux 7 Extended Lifecycle Support

Via RHSA-2026:49775 https://access.redhat.com/errata/RHSA-2026:49775

Comment 18 errata-xmlrpc 2026-08-04 15:59:03 UTC
This issue has been addressed in the following products:

  Red Hat Satellite 6.16 for RHEL 8
  Red Hat Satellite 6.16 for RHEL 9

Via RHSA-2026:50223 https://access.redhat.com/errata/RHSA-2026:50223