Bug 2460425 (CVE-2026-48864) - CVE-2026-48864 libsolv: Heap buffer overflow in libsolv repopagestore via unchecked decompression of malicious .solv page data
Summary: CVE-2026-48864 libsolv: Heap buffer overflow in libsolv repopagestore via unc...
Keywords:
Status: NEW
Alias: CVE-2026-48864
Product: Security Response
Classification: Other
Component: vulnerability
Version: unspecified
Hardware: All
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Product Security DevOps Team
QA Contact:
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2026-04-21 23:20 UTC by OSIDB Bzimport
Modified: 2026-07-13 11:43 UTC (History)
23 users (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed:
Embargoed:


Attachments (Terms of Use)
Proposed fix (2.49 KB, patch)
2026-05-27 08:58 UTC, Petr Pisar
no flags Details | Diff


Links
System ID Private Priority Status Summary Last Updated
Github openSUSE libsolv pull 622 0 None open Fix a buffer overflow when decompressing solv pages 2026-05-27 09:08:08 UTC
Red Hat Product Errata RHBA-2026:36845 0 None None None 2026-07-08 18:47:14 UTC
Red Hat Product Errata RHBA-2026:36870 0 None None None 2026-07-08 20:27:08 UTC
Red Hat Product Errata RHBA-2026:37280 0 None None None 2026-07-09 12:20:33 UTC
Red Hat Product Errata RHBA-2026:37459 0 None None None 2026-07-10 00:36:48 UTC
Red Hat Product Errata RHBA-2026:37460 0 None None None 2026-07-09 23:30:35 UTC
Red Hat Product Errata RHBA-2026:38900 0 None None None 2026-07-13 11:43:23 UTC
Red Hat Product Errata RHSA-2026:28236 0 None None None 2026-06-23 19:17:05 UTC
Red Hat Product Errata RHSA-2026:36730 0 None None None 2026-07-08 14:06:53 UTC

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


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