Title: CPython 3.15: consolidated memory-safety and concurrency bugs · Issue #157198 · python/cpython · GitHub
Open Graph Title: CPython 3.15: consolidated memory-safety and concurrency bugs · Issue #157198 · python/cpython
X Title: CPython 3.15: consolidated memory-safety and concurrency bugs · Issue #157198 · python/cpython
Description: Hello, This issue consolidates 13 reproducible CPython 3.15 bugs involving memory safety and concurrency. The bugs resulted from Python security research using static analysis. Each entry has a concrete PoC in the linked version-specific...
Open Graph Description: Hello, This issue consolidates 13 reproducible CPython 3.15 bugs involving memory safety and concurrency. The bugs resulted from Python security research using static analysis. Each entry has a con...
X Description: Hello, This issue consolidates 13 reproducible CPython 3.15 bugs involving memory safety and concurrency. The bugs resulted from Python security research using static analysis. Each entry has a con...
Opengraph URL: https://github.com/python/cpython/issues/157198
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"CPython 3.15: consolidated memory-safety and concurrency bugs","articleBody":"Hello,\n\nThis issue consolidates 13 reproducible CPython 3.15 bugs involving memory safety and concurrency.\n\nThe bugs resulted from Python security research using static analysis. Each entry has a concrete PoC in the linked version-specific Gist. Although the collection is large, these bugs warrant inspection, especially the cases producing interpreter crashes, sanitizer failures, memory corruption, or similarly concrete failures.\n\n## Bugs\n\n1. [AST initialization `_field_types` race](https://gist.github.com/Nievesjyl/88b08474bc010dfb7b8c7d14e3705aa5#file-001-ast-init-field-types-borrow-promotion-md) — Concurrent descriptor replacement can reclaim a borrowed value and cause an impossible initialization decision.\n2. [Bytes formatting shared-bytearray race](https://gist.github.com/Nievesjyl/88b08474bc010dfb7b8c7d14e3705aa5#file-002-bytes-format-shared-bytearray-md) — A peer can modify bytearray storage while `%b` formatting copies it, producing a mixed-generation result.\n3. [Verbose module-finalization stderr reentry](https://gist.github.com/Nievesjyl/88b08474bc010dfb7b8c7d14e3705aa5#file-003-finalize-remove-modules-verbose-stderr-reentry-md) — A `sys.__stderr__` callback can release borrowed `sys.modules` entries before finalization uses them.\n4. [Unexpected-keyword dictionary traversal race](https://gist.github.com/Nievesjyl/88b08474bc010dfb7b8c7d14e3705aa5#file-004-getargs-unexpected-keyword-dict-traversal-md) — Concurrent mutation can reclaim a borrowed keyword while diagnostics convert and format it.\n5. [Import traceback-chain frame race](https://gist.github.com/Nievesjyl/88b08474bc010dfb7b8c7d14e3705aa5#file-005-import-traceback-chain-borrow-race-md) — Traceback mutation can detach a node and release its borrowed frame during import cleanup.\n6. [Child memoryview construction and source-release race](https://gist.github.com/Nievesjyl/88b08474bc010dfb7b8c7d14e3705aa5#file-006-memoryview-getbuffer-release-race-md) — Source release can deallocate the managed buffer between the released check and child export acquisition.\n7. [`object.__getstate__()` inline-dictionary transition race](https://gist.github.com/Nievesjyl/88b08474bc010dfb7b8c7d14e3705aa5#file-007-object-getstate-inline-dict-empty-transition-md) — Concurrent dictionary replacement can make a nonempty object incorrectly report an empty state.\n8. [OrderedDict reentrant keys-table corruption](https://gist.github.com/Nievesjyl/88b08474bc010dfb7b8c7d14e3705aa5#file-008-odict-get-index-reentrant-ma-keys-md) — A colliding comparison can replace the cached keys table, causing an unrelated key to move.\n9. [`_posixsubprocess.fork_exec()` process-argument race](https://gist.github.com/Nievesjyl/88b08474bc010dfb7b8c7d14e3705aa5#file-009-posixsubprocess-process-args-borrow-promotion-md) — Concurrent list replacement can finalize a borrowed argument before filesystem conversion.\n10. [`BinaryReader` operation and close race](https://gist.github.com/Nievesjyl/88b08474bc010dfb7b8c7d14e3705aa5#file-010-remote-debugging-binary-reader-close-race-md) — `get_stats()` or callback-resumed replay can access native reader state freed by `close()`.\n11. [Concurrent `BinaryReader.replay()` state corruption](https://gist.github.com/Nievesjyl/88b08474bc010dfb7b8c7d14e3705aa5#file-011-remote-debugging-binary-reader-replay-state-race-md) — Simultaneous replays can corrupt shared reconstruction arrays, stacks, depths, and counters.\n12. [`BinaryWriter.get_stats()` and close race](https://gist.github.com/Nievesjyl/88b08474bc010dfb7b8c7d14e3705aa5#file-012-remote-debugging-binary-writer-close-race-md) — Concurrent `close()` can destroy the native writer before an unlocked stats call finishes using it.\n13. [`BinaryWriter.write_sample()` input-list race](https://gist.github.com/Nievesjyl/88b08474bc010dfb7b8c7d14e3705aa5#file-013-remote-debugging-binary-writer-shared-input-lists-md) — Concurrent mutation can reclaim outer, thread, or frame-list items before their fields are read.\n","author":{"url":"https://github.com/Nievesjyl","@type":"Person","name":"Nievesjyl"},"datePublished":"2026-09-08T19:25:51Z","url":"https://github.com/python/cpython/issues/157198"}
| react-profiling | 0 |
| react-import-map | react,react-dom,react-dom/client,react-dom/profiling,react-is,react-reconciler,react/compiler-runtime,react/jsx-dev-runtime,react/jsx-runtime,scheduler@d5750093facf |
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:a4eda0ac-cf17-fb94-35bd-7c60218ede3e |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | D0D2:253B87:5D32E7:81872A:6AF85B13 |
| html-safe-nonce | 11c5a8128a9367af2fb6dc4ac9481400036e595e6b5b3db0c637db235a4450ad |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJEMEQyOjI1M0I4Nzo1RDMyRTc6ODE4NzJBOjZBRjg1QjEzIiwidmlzaXRvcl9pZCI6Ijg4MjYzMTI0MDUzMDczODI1NDciLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ== |
| visitor-hmac | b9d155fa6884656141ca97d340022466f8d5564097cbf3c033b3e31f9c054247 |
| hovercard-subject-tag | issue:5390993211 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/python/cpython/157198/issue_layout |
| twitter:image | https://opengraph.githubassets.com/c1323bc51078cc9ded4cca86cd5843e604a16aa77f44e369f4b4d6488edcaa84/python/cpython/issues/157198 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/c1323bc51078cc9ded4cca86cd5843e604a16aa77f44e369f4b4d6488edcaa84/python/cpython/issues/157198 |
| og:image:alt | Hello, This issue consolidates 13 reproducible CPython 3.15 bugs involving memory safety and concurrency. The bugs resulted from Python security research using static analysis. Each entry has a con... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | Nievesjyl |
| hostname | github.com |
| expected-hostname | github.com |
| None | 5713ecd83001b2f55c3509fb7a292bf7d66d0f167c7ae87a9f7eaec5a52bf8db |
| turbo-cache-control | no-preview |
| go-import | github.com/python/cpython git https://github.com/python/cpython.git |
| octolytics-dimension-user_id | 1525981 |
| octolytics-dimension-user_login | python |
| octolytics-dimension-repository_id | 81598961 |
| octolytics-dimension-repository_nwo | python/cpython |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 81598961 |
| octolytics-dimension-repository_network_root_nwo | python/cpython |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 653be32ff5c755082a4db662491bfbbcfc9112c1 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
| react-app-name | issues |
Links:
Viewport: width=device-width