VYPR
Unrated severityNVD Advisory· Published Sep 2, 2021· Updated Aug 4, 2024

CVE-2021-33929

CVE-2021-33929

Description

Buffer overflow vulnerability in function pool_disabled_solvable in src/repo.h in libsolv before 0.7.17 allows attackers to cause a Denial of Service.

AI Insight

LLM-synthesized narrative grounded in this CVE's description and references.

Affected products

3

Patches

Vulnerability mechanics

Root cause

"Missing bounds check on the index used in the MAPTST macro allows heap-buffer-overflow when id>>3 exceeds pool->considered->size."

Attack vector

An attacker supplies a crafted testcase file that triggers a heap-buffer-overflow when processed by the `testsolv` tool [ref_id=1]. The macro `MAPTST(pool->considered, id)` computes `pool->considered->map[id>>3]`; if `id` is large enough that `id>>3` exceeds `pool->considered->size`, a read past the allocated heap buffer occurs [ref_id=1]. This can lead to a denial of service (crash) as demonstrated by the AddressSanitizer output [ref_id=1].

Affected code

The heap-buffer-overflow occurs in `pool_disabled_solvable`, `pool_installable`, and `pool_installable_whatprovides` in `src/repo.h` at lines 96, 120, and 138 respectively [ref_id=1]. All three functions use the same vulnerable `MAPTST(pool->considered, id)` macro without checking that the computed index `id>>3` is within the bounds of the `pool->considered->map` array [ref_id=1].

What the fix does

The advisory does not include a patch diff, but the fix (introduced in libsolv before 0.7.17) must add a bounds check before the `MAPTST` macro access to ensure `id>>3 < pool->considered->size` [ref_id=1]. Without this check, any caller that passes an out-of-range `id` can read memory beyond the allocated `map` buffer, causing undefined behavior and a crash [ref_id=1].

Preconditions

  • inputThe attacker must supply a crafted testcase file that causes an out-of-bounds `id` value to be passed to one of the vulnerable functions.
  • configThe vulnerable code path is reachable via the `testsolv` tool or any application using libsolv's selection functions.

Generated on May 29, 2026. Inputs: CWE entries + fix-commit diffs from this CVE's patches. Citations validated against bundle.

References

1

News mentions

0

No linked articles in our index yet.