-
-
Notifications
You must be signed in to change notification settings - Fork 34.4k
Out-of-bounds read in integrated mimalloc (fixed upstream) #134070
Copy link
Copy link
Open
Labels
3.13bugs and security fixesbugs and security fixes3.14bugs and security fixesbugs and security fixes3.15new features, bugs and security fixesnew features, bugs and security fixesinterpreter-core(Objects, Python, Grammar, and Parser dirs)(Objects, Python, Grammar, and Parser dirs)type-bugAn unexpected behavior, bug, or errorAn unexpected behavior, bug, or error
Metadata
Metadata
Assignees
Labels
3.13bugs and security fixesbugs and security fixes3.14bugs and security fixesbugs and security fixes3.15new features, bugs and security fixesnew features, bugs and security fixesinterpreter-core(Objects, Python, Grammar, and Parser dirs)(Objects, Python, Grammar, and Parser dirs)type-bugAn unexpected behavior, bug, or errorAn unexpected behavior, bug, or error
Bug report
Bug description:
The integrated mimalloc has out-of-bounds bug in the generic implementation of ctz/clz:
cpython/Include/internal/mimalloc/mimalloc/internal.h
Lines 847 to 870 in 6a22963
On platforms with 64-bit
UL, the multiplication in index calculation can grow much larger than arraydebruijn[].It has been fixed in this upstream commit:
microsoft/mimalloc@ed31847
CPython versions tested on:
3.14, CPython main branch, 3.13, 3.15
Operating systems tested on:
Linux
Linked PRs