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 — gh-126033: Fix crash in _elementtree.c where evil tags/elements occurs · Pull Request #126079 · python/cpython

Conversation

@ghost

@ghost ghost commented Oct 28, 2024

Copy link
Copy Markdown

gh-126033: Fix crash in _elementtree.c where evil tags/elements occurs

Throws errors when evil tags/elements was detected.

This also fixes gh-126037.

Sorry, something went wrong.

Uh oh!

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

All reactions
Li Xingru
gh-126033: Fix crash in _elementtree.c where evil tags/elements occurs
d4ef296
@ghost

ghost commented Oct 28, 2024 •
edited by ghost
Loading

Uh oh!

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

Copy link
Copy Markdown

All commit authors signed the Contributor License Agreement.
CLA signed

All reactions

Sorry, something went wrong.

Uh oh!

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

@bedevere-app

bedevere-app Bot commented Oct 28, 2024

Copy link
Copy Markdown

Most changes to Python require a NEWS entry. Add one using the blurb_it web app or the blurb command-line tool.

If this change has little impact on Python users, wait for a maintainer to apply the skip news label instead.

All reactions

Sorry, something went wrong.

Uh oh!

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

@bedevere-app bedevere-app Bot added the awaiting review label Oct 28, 2024
@bedevere-app bedevere-app Bot mentioned this pull request Oct 28, 2024
UAF: xml.etree.ElementTree.Element.remove when concurrent mutations happen #126033
Closed
blurb-it Bot and others added 2 commits October 28, 2024 14:44
@blurb-it
📜🤖 Added by blurb_it.
2dd828c
Li Xingru
Update NEWs rst file
2b1b009
@picnixz

picnixz commented Oct 28, 2024

Copy link
Copy Markdown
Member

The way to fix this is not necessarily only by checking whether extra is NULL or not. You may also change the size of the list without clearing it and currently we don't check this. I think we should use RuntimeError instead as well because that's the kind of exceptions we usually raise when a list is mutated while iterating over it.

There are also other places where there is a crash (namely in other find* methods). I would appreciate we first discuss the approach for fixing it (one way to fix it is to add versioning but we need to discuss first).

Finally, I would have appreciated if you first asked whether you could open a PR or not since I was also working on it (and self-assigned the issue).

sobolevn 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.

@ghost

ghost commented Oct 29, 2024

Copy link
Copy Markdown
Author

The way to fix this is not necessarily only by checking whether extra is NULL or not. You may also change the size of the list without clearing it and currently we don't check this. I think we should use RuntimeError instead as well because that's the kind of exceptions we usually raise when a list is mutated while iterating over it.

There are also other places where there is a crash (namely in other find* methods). I would appreciate we first discuss the approach for fixing it (one way to fix it is to add versioning but we need to discuss first).

Finally, I would have appreciated if you first asked whether you could open a PR or not since I was also working on it (and self-assigned the issue).

Sorry about that, I didn’t saw the issue carefully about the self-assigning tag. I’ve understand your solution about this issue, For my solution, just adding the error throwing for just few functions, doesn't really fit for this issue. so I’ll close this PR soon.

All reactions

Sorry, something went wrong.

Uh oh!

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

@ghost ghost closed this Oct 29, 2024
This pull request was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

No reviews

Uh oh!

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

Assignees

No one assigned

Labels

awaiting review

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

UAF: xml.etree.ElementTree.Element.find* when concurrent mutations happen

Uh oh!

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

1 participant

@picnixz
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 01402520 — 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.