pyexpat: CPython can be crashed through resetting `StartDoctypeDeclHandler` with pyexpat at the wrong time
I maintainer di solito rispondono entro 1 giorno
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 1/5
- Tempo stimato
- Meno di un'ora
- Idoneità per principianti
- 25/100
Direzione di ricerca
The report provides a reproducer using xml.parsers.expat.ParserCreate and says Expat upstream pull request #1437 fixes the crash. Start by checking how CPython vendors or updates Expat and whether that upstream fix is already included. Done means the reproducer no longer crashes; the report says this is defense-in-depth, not a vulnerability.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
Hello!
It has been brought to my attention that the Expat XML parser can be crashed via a segmentation fault by resetting member StartDoctypeDeclHandler at the wrong time, like this:
from xml.parsers.expat import ParserCreate
parser = ParserCreate()
def reset_start_doctype_handler():
parser.StartDoctypeDeclHandler = None
return True
parser.StartDoctypeDeclHandler = lambda *_: None
parser.NotStandaloneHandler = reset_start_doctype_handler
parser.Parse(b"<!DOCTYPE r SYSTEM \"s\"><r/>", True)
This affects all versions of Python with all versions of Expat up to 2.9.0 including. Expat upstream pull request https://github.com/libexpat/libexpat/pull/1437 fixes this issue for itself and CPython and the fix will be contained in the next release that may come out as early as next Monday. So updating to the next release will fix this for Python for free, I just wanted to let you know.
Credits for this finding go to Bartłomiej Dmitruk (@hackerman70000) of https://www.striga.ai/ .
Bartłomiej reported this as defense-in-depth to me and we both do not consider this a vulnerability. If you come to difference conclusions, please let me know.
Best, Sebastian
CC @StanFromIreland @picnixz
- Lingua principale
- Python
- Stelle
- 77.8k
- Fork
- 37.7k
- Merge medio
- 12h 27m
- PR unite (30g)
- 710
Preparare l'ambiente
Avvia il container di sviluppo del progetto nel browser, con il tuo account GitHub.
- Nessun Dockerfile né file Docker Compose
- Ha un modello di pull request
- Leggi 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 python/cpython
-
3.16 build type-bug
Difficoltà 2/5 1-3 ore Idoneità per principianti 62/100
python/cpython#160829 · 4 commenti ·
I maintainer di solito rispondono entro 1 giorno
-
dependencies infra topic-ensurepip
Difficoltà 2/5 1-3 ore Idoneità per principianti 66/100
I maintainer di solito rispondono entro 1 giorno
-
symtable: repr() of a Symbol raises TypeError under -X lazy_imports=allForse già presa Una pull request collegata a questa issue è aperta o già unita. Apertastdlib topic-lazy-imports type-bug
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
python/cpython#160810 · 3 commenti ·
I maintainer di solito rispondono entro 1 giorno
-
tarfile: extractfile(member).read() of a sparse member is slow due to repeated bytes concatenationApertaperformance stdlib triaged type-bug
Difficoltà 2/5 1-3 ore Idoneità per principianti 75/100
python/cpython#160774 · 2 commenti ·
I maintainer di solito rispondono entro 1 giorno
-
tests topic-profiling type-bug
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
python/cpython#160334 · 1 commento ·
I maintainer di solito rispondono entro 1 giorno
Tutte le issue di python/cpython
Issue simili
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
ComposioHQ/awesome-claude-skills#2398 ·
I maintainer di solito rispondono entro 2 giorni
-
bug converter
Difficoltà 2/5 1-3 ore Idoneità per principianti 62/100
grafana/sigma-rule-deployment#435 ·
I maintainer di solito rispondono entro 1 giorno
-
bug
Difficoltà 2/5 1-3 ore Idoneità per principianti 73/100
datamodel-code-generator/datamodel-code-generator#5589 ·
I maintainer di solito rispondono entro 1 giorno
-
Shell: serve the home app's Cookie Policy on a hard reloadForse già presa @2001anshkaushik l’ha presa oggi. Apertafeature module:ai
Difficoltà 2/5 1-3 ore Idoneità per principianti 88/100
rocketride-org/rocketride-server#2899 · 1 commento ·
I maintainer di solito rispondono entro 2 giorni
-
GEFSv12
Difficoltà 2/5 1-3 ore Idoneità per principianti 70/100