Skip to content

[3.15] gh-157335: Fix out-of-bounds write in mmap.mmap.__setitem__ (GH-157438) - #158026

Merged
hugovk merged 1 commit into
python:3.15from
miss-islington:backport-09bf4c5-3.15
Sep 28, 2026
Merged

hugovk merged 1 commit into
python:3.15from
miss-islington:backport-09bf4c5-3.15

Conversation

@miss-islington

@miss-islington miss-islington commented Sep 23, 2026 •

Copy link
Copy Markdown
Contributor

Fix out-of-bounds write in mmap.mmap.setitem() that could occur
when converting the index or the assigned value (via index()
for a single item, or via the buffer protocol for a slice) resized or closed
the mmap object during the assignment.
(cherry picked from commit 09bf4c5)

Co-authored-by: Joseph Kerry joerkerry@gmail.com
Co-authored-by: Victor Stinner vstinner@python.org

…thonGH-157438)

Fix out-of-bounds write in mmap.mmap.__setitem__() that could occur
when converting the index or the assigned value (via __index__()
for a single item, or via the buffer protocol for a slice) resized or closed
the mmap object during the assignment.
(cherry picked from commit 09bf4c5)

Co-authored-by: Joseph Kerry <joerkerry@gmail.com>
Co-authored-by: Victor Stinner <vstinner@python.org>

@vstinner vstinner left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@hugovk
hugovk merged commit 960f69c into python:3.15 Sep 28, 2026
60 checks passed
@miss-islington
miss-islington deleted the backport-09bf4c5-3.15 branch September 28, 2026 15:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants