Out-of-bounds read in portableproplib on a truncated XML plist preamble
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 4/5
- Tempo stimato
- 3-5 giorni
- Idoneità per principianti
- 45/100
Direzione di ricerca
The bug is in lib/portableproplib/prop_object.c at line 722, where a memcmp call reads out-of-bounds. Start by examining the MATCH macro and the surrounding parser logic in prop_object.c. Reproduce the issue with the minimal input '\x3c' and an ASan build. Check input length validation before fixed-length comparisons. The fix must be applied to the portableproplib code used by XBPS, and tests should be run to ensure repository index parsing (lib/repo.c) and archive handling (lib/archive.c) remain safe.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
I found a reproducible out-of-bounds read in XBPS's bundled portableproplib XML plist parser. In lib/portableproplib/prop_object.c, MATCH(str) calls memcmp(&xml[1], str, sizeof(str) - 1) before confirming that the input contains that many bytes. A one-byte input consisting only of < reaches this comparison.
Affected code tested: XBPS 0.60.7 and a frozen master revision at c5f41d5. With AddressSanitizer-enabled dictionary internalization builds, the one-byte input reports a five-byte heap-buffer-overflow read in _prop_object_internalize_context_alloc() at prop_object.c:722. I reproduced it again on both revisions on 23 September 2026; earlier testing also reached the same parser defect through the array internalization API. The test adapter allocates input_size + 1 bytes, copies the input, and appends a NUL terminator before invoking the upstream API. The invalid read therefore occurs despite the terminator.
Minimal input (hex): 3c (ASCII <). The relevant sanitizer trace begins:
ERROR: AddressSanitizer: heap-buffer-overflow
READ of size 5
#2 _prop_object_internalize_context_alloc .../lib/portableproplib/prop_object.c:722
#3 _prop_generic_internalize .../lib/portableproplib/prop_object.c:639
XBPS also passes repository index and metadata plist buffers to xbps_dictionary_internalize() in lib/repo.c, and archive dictionaries through lib/archive.c. This establishes product paths to the parser. I have not established a specific remote attacker model, native process termination, or information disclosure; the observed failure is the sanitizer-detected read while rejecting malformed input.
Please check the remaining input length before each fixed-length comparison and assess the affected release range. I can provide the full sanitizer log and adapter source if helpful.
I submitted a CVE ID request to MITRE CNA-LR under tracking number CAN-2026-2052927. This is a request tracking number, not an assigned CVE ID. Please coordinate on this existing request rather than filing a duplicate for the same root cause. For public credit, please identify He Huang as the finder and NexusSan as the discovery tool.
- Lingua principale
- C
- Stelle
- 1.1k
- Fork
- 151
- Metriche di merge delle PR
- Nessuna PR unita negli ultimi 30g
Guida per i contributori
Apri la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di void-linux/xbps
-
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 68/100
void-linux/xbps#475 ·
-
Difficoltà 4/5 3-5 giorni Idoneità per principianti 55/100
void-linux/xbps#700 ·
-
bug
Difficoltà 3/5 1-2 giorni Idoneità per principianti 45/100
void-linux/xbps#696 ·
-
Difficoltà 3/5 1-2 giorni Idoneità per principianti 52/100
void-linux/xbps#695 · 7 commenti ·
-
Difficoltà 4/5 3-5 giorni Idoneità per principianti 48/100
void-linux/xbps#694 · 3 commenti ·
Tutte le issue di void-linux/xbps
Issue simili
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 70/100
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
-
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 90/100
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 82/100
NVIDIA/k8s-device-plugin#2061 · 1 commento ·
-
task
Difficoltà 2/5 1-3 ore Idoneità per principianti 70/100
vsanthanam/JBird#429 ·