Open
Description
Bug report
Bug description:
The integrated mimalloc has out-of-bounds bug in the generic implementation of ctz/clz:
cpython/Include/internal/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 array debruijn[]
.
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
Activity
picnixz commentedon May 15, 2025
cc @colesbury
Fix: Prevent out-of-bounds read in mi_clz32 and mi_ctz32 (python#134070)
Fix: Prevent out-of-bounds read in mi_clz32 and mi_ctz32 (python#134070)
Fix: Prevent out-of-bounds read in mi_ctz_generic32 and mi_clz_generic32
pythongh-134070: Fix mi_clz32/mi_ctz32 to prevent out-of-bounds read (p…
pythongh-134070: Add news entry for mi_clz32/mi_ctz32 out-of-bounds fix
4 remaining items