- Reported
-
- Issued
-
- Package
-
pyo3
(crates.io)
- Type
-
Vulnerability
- Categories
-
- Keywords
-
#memory-corruption
- References
-
- Patched
-
- Unaffected
-
Description
PyO3 0.28.1 added support for #[pyclass(extends=PyList)] struct NativeSub (and other native types) when targeting Python 3.12 and up with the abi3 feature.
It was discovered that subclasses of such classes would use the type of the subclass when attempting to access to data of NativeSub contained within Python objects, amounting to memory corruption.
PyO3 0.28.2 fixed the issue by using the type of (e.g.) NativeSub correctly.
Advisory available under CC0-1.0
license.