cpython icon indicating copy to clipboard operation
cpython copied to clipboard

gh-142884: Fix UAF in `array.array.tofile` with concurrent mutations

Open fatelei opened this issue 3 weeks ago • 5 comments

the original code precomputed nblocks at the beginning of the function, but when a reentrant writer cleared the array during the first callback, self->ob_item became NULL. The loop continued iterating based on the cached values and dereferenced the null pointer.

  • Issue: gh-142884

fatelei avatar Dec 28 '25 07:12 fatelei

It is not the first time you are re-creating a PR because a force-push was wrong. Please, in the future, just don't force push. If you want to update your branch, hit the "update branch" button and pull your changes.

picnixz avatar Dec 28 '25 09:12 picnixz

It is not the first time you are re-creating a PR because a force-push was wrong. Please, in the future, just don't force push. If you want to update your branch, hit the "update branch" button and pull your changes.

after i rebase upstream/main,there are a lot of commits,so i close the old one,then create a new one

fatelei avatar Dec 28 '25 09:12 fatelei

A Python core developer has requested some changes be made to your pull request before we can consider merging it. If you could please address their requests along with any other requests in other reviews from core developers that would be appreciated.

Once you have made the requested changes, please leave a comment on this pull request containing the phrase I have made the requested changes; please review again. I will then notify any core developers who have left a review that you're ready for them to take another look at this pull request.

bedevere-app[bot] avatar Dec 28 '25 10:12 bedevere-app[bot]

after i rebase upstream/main,there are a lot of commits,so i close the old one,then create a new one

Don't rebase upstream/main, just merge main into your branch.

picnixz avatar Dec 28 '25 10:12 picnixz

after i rebase upstream/main,there are a lot of commits,so i close the old one,then create a new one

Don't rebase upstream/main, just merge main into your branch.

ok

fatelei avatar Dec 28 '25 10:12 fatelei