Freed-memory access via bytearray self-copy
Published Sep 17, 2024 · Updated Sep 17, 2024
Use-after-free in py/objarray.c in MicroPython 1.22.2 allows remote attackers to access freed memory through bytearray self-copy. array_subscr and array_extend retain source-buffer pointers across m_renew, so reallocating a bytearray during self-copy leaves a dangling pointer that is then read. The upstream fix notes that default GIL configurations prevent reuse of the freed buffer, so practical impact requires a non-default configuration.
Summary
What happened
Use-after-free in py/objarray.c in MicroPython 1.22.2 allows remote attackers to access freed memory through bytearray self-copy. array_subscr and array_extend retain source-buffer pointers across m_renew, so reallocating a bytearray during self-copy leaves a dangling pointer that is then read. The upstream fix notes that default GIL configurations prevent reuse of the freed buffer, so practical impact requires a non-default configuration.
The record
- CVE
- CVE-2024-8947
- Published
- Sep 17, 2024
- Updated
- Sep 17, 2024
- Vendor
- MicroPython
- Product
- MicroPython
- Classifications
- CWE-416
- Attack vector
- network
- Privileges
- unauthenticated
Timeline
How it unfolded
- Sep 17, 2024CVE publishedPublication date reported by the CVE source.
- Sep 17, 2024Record updatedLatest update available in the CVE record.
Exploitability
Present is not the same as exploitable
Compare your product and version with the public record. A matching version still requires validation against your environment.
Is a vulnerable build present?
Compare these published version ranges with your installed build and any vendor patches.
- Affected versionversion=1.22.2
What conditions does exploitation require?
What is affected?
Attacks
What attackers are doing with it
Daily unique IPs observed by Shadowserver honeypots for known exploited vulnerabilities (KEVs). Missing observations do not establish an absence of attacks.
Weakness, pattern, technique
Public exploit references
- MicroPython bytearray self-slice proof of conceptproof of concept · demonstrated
Labels summarize the accepted research assessment. They do not indicate a test against your environment.
Technologies
Your stack
See the directory against your own environment.
Your stack
Check the software in your environment
Book a demo to see how Hinoki identifies affected software and validates exploitability in your environment.
Book a demo