Title: _interpqueuesmodule.c: Use-after-free from dangling items.last pointer · Issue #146427 · python/cpython · GitHub
Open Graph Title: _interpqueuesmodule.c: Use-after-free from dangling items.last pointer · Issue #146427 · python/cpython
X Title: _interpqueuesmodule.c: Use-after-free from dangling items.last pointer · Issue #146427 · python/cpython
Description: Crash report What happened? Summary _queue_clear_interpreter in Modules/_interpqueuesmodule.c (lines 739-774) never updates queue->items.last when removing the tail item. After the item is freed, items.last is a dangling pointer. Next qu...
Open Graph Description: Crash report What happened? Summary _queue_clear_interpreter in Modules/_interpqueuesmodule.c (lines 739-774) never updates queue->items.last when removing the tail item. After the item is freed, i...
X Description: Crash report What happened? Summary _queue_clear_interpreter in Modules/_interpqueuesmodule.c (lines 739-774) never updates queue->items.last when removing the tail item. After the item is freed...
Opengraph URL: https://github.com/python/cpython/issues/146427
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"_interpqueuesmodule.c: Use-after-free from dangling items.last pointer","articleBody":"# Crash report\n\n### What happened?\n\n## Summary\n\n`_queue_clear_interpreter` in `Modules/_interpqueuesmodule.c` (lines 739-774) never updates `queue-\u003eitems.last` when removing the tail item. After the item is freed, `items.last` is a dangling pointer. Next queue operation writes to freed memory.\n\nI have a working patch on this issue, will sending the PR later.\n\n### CPython versions tested on:\n\nCPython main branch\n\n### Operating systems tested on:\n\n_No response_\n\n### Output from running 'python -VV' on the command line:\n\n_No response_\n\n\u003c!-- gh-linked-prs --\u003e\n### Linked PRs\n* gh-146428\n\u003c!-- /gh-linked-prs --\u003e\n","author":{"url":"https://github.com/aisk","@type":"Person","name":"aisk"},"datePublished":"2026-03-25T16:20:29.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":0},"url":"https://github.com/146427/cpython/issues/146427"}
| 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:126638b2-985f-11ca-feb7-75302b01e256 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | A932:71E1B:DA9467:123A895:6A51B8B9 |
| html-safe-nonce | 860d4f00dcd680c105c227c6c3aa139055ab207bf808519cceb94cc065d2d7b8 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJBOTMyOjcxRTFCOkRBOTQ2NzoxMjNBODk1OjZBNTFCOEI5IiwidmlzaXRvcl9pZCI6IjIyMzYwNTgzNDgwMTIyODgxODUiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ== |
| visitor-hmac | 1f3d7916cd366d548057a9af8c9c2f49a8e26ce4271da91bb21a6f1bb68984fb |
| hovercard-subject-tag | issue:4136701680 |
| 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/146427/issue_layout |
| twitter:image | https://opengraph.githubassets.com/8b5a8ac065ba9d10357c854b9fb5d928d6b70e32394ae363dc4500190a71d31b/python/cpython/issues/146427 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/8b5a8ac065ba9d10357c854b9fb5d928d6b70e32394ae363dc4500190a71d31b/python/cpython/issues/146427 |
| og:image:alt | Crash report What happened? Summary _queue_clear_interpreter in Modules/_interpqueuesmodule.c (lines 739-774) never updates queue->items.last when removing the tail item. After the item is freed, i... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | aisk |
| hostname | github.com |
| expected-hostname | github.com |
| None | b9a586c06a05a7a86fc7e3f4dbd03e42f6869085879aa184aa6369456dbd50fb |
| 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 | 7aed05249554b889eb33d002851a973eebcc7e91 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width