GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — bpo-45329: Fix freed memory access in pyexpat.c by y-tag · Pull Request #28649 · python/cpython

Conversation

@y-tag

@y-tag y-tag commented Sep 30, 2021 •
edited by bedevere-bot
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown
Contributor

https://bugs.python.org/issue45329

  • xmlparse_clear(self) calls clear_handlers(self, 0)
  • clear_handlers(self, 0) accesses self->itself
  • Therefore xmlparse_clear(self) would be done before XML_ParserFree(self->itself)

https://bugs.python.org/issue45329

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@y-tag
bpo-45329: Fix freed memory access in pyexpat.c
44509c5
@the-knights-who-say-ni the-knights-who-say-ni added the CLA signed label Sep 30, 2021
@bedevere-bot bedevere-bot added the awaiting review label Sep 30, 2021
serhiy-storchaka
serhiy-storchaka approved these changes Oct 1, 2021
View reviewed changes
@bedevere-bot bedevere-bot added awaiting merge and removed awaiting review labels Oct 1, 2021
@serhiy-storchaka serhiy-storchaka added needs backport to 3.9 type-bug An unexpected behavior, bug, or error labels Oct 1, 2021
@serhiy-storchaka

serhiy-storchaka commented Oct 1, 2021

Copy link
Copy Markdown
Member

LGTM, but please add a NEWS entry. https://blurb-it.herokuapp.com/

y-tag reacted with thumbs up emoji
All reactions
  • 👍 1 reaction

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@blurb-it
📜🤖 Added by blurb_it.
0b2c5df
serhiy-storchaka
serhiy-storchaka reviewed Oct 1, 2021
View reviewed changes
Comment thread Misc/NEWS.d/next/Core and Builtins/2021-10-01-11-17-45.bpo-45329.vtqRvA.rst Resolved

Uh oh!

There was an error while loading. Please reload this page.

blurb-it Bot and others added 2 commits October 1, 2021 13:09
@blurb-it
📜🤖 Added by blurb_it.
571af91
@y-tag
Remove an old NEWS entry.
23d7e6b
@y-tag

y-tag commented Oct 1, 2021

Copy link
Copy Markdown
Contributor Author

I found that the segmentation fault occurs with expat 2.2.0 or earlier.
Null check has been added to 2.2.1.
Since the expat included in this repositry has been updated to 2.4.1, the segmentation fault does not occur with it.
Some tests are failed with ./configure --with-system-expat on CentOS 7, which includes expat 2.1.0.

So this patch might be useful on system which uses old expat...

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@y-tag
Update a NEWS entry
4bb58ff
serhiy-storchaka
serhiy-storchaka approved these changes Oct 2, 2021
View reviewed changes
@serhiy-storchaka
serhiy-storchaka merged commit 0742abd into python:main Oct 2, 2021
@miss-islington

miss-islington commented Oct 2, 2021

Copy link
Copy Markdown
Contributor

Thanks @y-tag for the PR, and @serhiy-storchaka for merging it 🌮🎉.. I'm working now to backport this PR to: 3.9, 3.10.
🐍🍒⛏🤖

y-tag reacted with thumbs up emoji
All reactions
  • 👍 1 reaction

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@bedevere-bot bedevere-bot removed the awaiting merge label Oct 2, 2021
miss-islington pushed a commit to miss-islington/cpython that referenced this pull request Oct 2, 2021
@y-tag @miss-islington
bpo-45329: Fix freed memory access in pyexpat.c (pythonGH-28649)
0e39c63
(cherry picked from commit 0742abd)

Co-authored-by: TAGAMI Yukihiro <[email protected]>
@bedevere-bot

bedevere-bot commented Oct 2, 2021

Copy link
Copy Markdown

GH-28692 is a backport of this pull request to the 3.10 branch.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@bedevere-bot bedevere-bot removed the needs backport to 3.10 label Oct 2, 2021
miss-islington pushed a commit to miss-islington/cpython that referenced this pull request Oct 2, 2021
@y-tag @miss-islington
bpo-45329: Fix freed memory access in pyexpat.c (pythonGH-28649)
0c70829
(cherry picked from commit 0742abd)

Co-authored-by: TAGAMI Yukihiro <[email protected]>
@bedevere-bot bedevere-bot removed the needs backport to 3.9 label Oct 2, 2021
@bedevere-bot

bedevere-bot commented Oct 2, 2021

Copy link
Copy Markdown

GH-28693 is a backport of this pull request to the 3.9 branch.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@y-tag
y-tag deleted the pyexpat-freed-memory branch October 2, 2021 11:20
miss-islington added a commit that referenced this pull request Oct 2, 2021
@miss-islington @y-tag
bpo-45329: Fix freed memory access in pyexpat.c (GH-28649)
22cf6a2
(cherry picked from commit 0742abd)

Co-authored-by: TAGAMI Yukihiro <[email protected]>
@serhiy-storchaka

serhiy-storchaka commented Oct 2, 2021

Copy link
Copy Markdown
Member

Thank you for your contribution TAGAMI-san!

y-tag reacted with thumbs up emoji
All reactions
  • 👍 1 reaction

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@y-tag

y-tag commented Oct 2, 2021

Copy link
Copy Markdown
Contributor Author

Thank you too! 😃

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

@serhiy-storchaka serhiy-storchaka serhiy-storchaka approved these changes

Uh oh!

There was an error while loading. Please reload this page.

Assignees

No one assigned

Labels

type-bug An unexpected behavior, bug, or error

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

Uh oh!

There was an error while loading. Please reload this page.

5 participants

@y-tag @serhiy-storchaka @miss-islington @bedevere-bot @the-knights-who-say-ni
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.