Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

bpo-36253: Remove use after free reference in ctypes test suite#12257

Merged
Yhg1s merged 4 commits into
python:masterpython/cpython:masterfrom
btharper:ctypes_uafbtharper/cpython:ctypes_uafCopy head branch name to clipboard
Sep 10, 2019
Merged

bpo-36253: Remove use after free reference in ctypes test suite#12257
Yhg1s merged 4 commits into
python:masterpython/cpython:masterfrom
btharper:ctypes_uafbtharper/cpython:ctypes_uafCopy head branch name to clipboard

Conversation

@btharper

@btharper btharper commented Mar 10, 2019

Copy link
Copy Markdown
Contributor

Removes invalid reference to freed memory in ctypes test case.

Once buf is deleted and freed r becomes a dangling pointer, further use requires reading from freed memory.

Bug found using asan, full details and stack trace attached in the bug tracker.

https://bugs.python.org/issue36253

@jdemeyer jdemeyer left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

@matrixise Does this needs a NEWS entry? I don't think so, it would just clutter the changelog. I ask you since you've been adding skip news labels to various of my PRs.

Other than that, I approve the patch. The point of that test is unclear to me.

Remove unnecessary elaboration of the old (bad, useless) test. Just mention that 'r' is now a dangling pointer and leave it at that.
Delete the news blurb, as minor changes to the ctypes test suite are not newsworthy.
@Yhg1s Yhg1s self-assigned this Sep 10, 2019
@Yhg1s

Yhg1s commented Sep 10, 2019

Copy link
Copy Markdown
Member

This doesn't need a news entry, no.

@Yhg1s Yhg1s merged commit a9b6033 into python:master Sep 10, 2019
@btharper btharper deleted the ctypes_uaf branch October 6, 2019 04:39
websurfer5 pushed a commit to websurfer5/cpython that referenced this pull request Jul 20, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

skip news tests Tests in the Lib/test dir

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants

Morty Proxy This is a proxified and sanitized view of the page, visit original site.