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-123270: Replaced SanitizedNames with a more surgical fix. by jaraco · Pull Request #123354 · python/cpython

Conversation

@jaraco

@jaraco jaraco commented Aug 26, 2024 •
edited
Loading

Uh oh!

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

Copy link
Copy Markdown
Member

Applies changes from zipp 3.20.1 and jaraco/zipp#124

  • Issue: zipfile.Path regression #123270
  • Original issue: Malformed payload can lead to infinite loops in zipfile.Path #122905

Sorry, something went wrong.

Uh oh!

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

All reactions
@jaraco
pythongh-123270: Replaced SanitizedNames with a more surgical fix.
55c2795
Applies changes from zipp 3.20.1 and jaraco/zipp#124
@bedevere-app bedevere-app Bot mentioned this pull request Aug 26, 2024
zipfile.Path regression #123270
Closed
@bedevere-app bedevere-app Bot added the awaiting core review label Aug 26, 2024
@jaraco
jaraco requested a review from sethmlarson August 26, 2024 17:47
@jaraco jaraco added needs backport to 3.8 needs backport to 3.11 only security fixes needs backport to 3.12 only security fixes needs backport to 3.13 only security fixes labels Aug 26, 2024
@jaraco

jaraco commented Aug 26, 2024

Copy link
Copy Markdown
Member Author

Seth, I'm seeking your review on this for a couple of reasons.

  1. It's a tweak to a security fix, so needs to be applied to the same place. Do you agree this should be applied as an amendment to the previous security fix?

  2. It re-introduces potential vulnerabilities discussed here that were addressed by the original approach but also broke legitimate cases. Are you comfortable with more narrowly addressing the reported vulnerability (causing infinite loops) and leaving the other potential concerns to be addressed separately?

All reactions

Sorry, something went wrong.

Uh oh!

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

@sethmlarson

sethmlarson commented Aug 26, 2024

Copy link
Copy Markdown
Contributor

Thanks @jaraco, I'll take a look. Maybe you can clarify for me, the vulnerability only affects zipfile.Path and not zipfile.ZipFile methods using namelist, etc? If that's the case I need to update the advisory.

All reactions

Sorry, something went wrong.

Uh oh!

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

@obfusk

obfusk commented Aug 26, 2024

Copy link
Copy Markdown
Contributor

Maybe you can clarify for me, the vulnerability only affects zipfile.Path and not zipfile.ZipFile methods using namelist, etc? If that's the case I need to update the advisory.

FYI I wrote about that here: https://www.openwall.com/lists/oss-security/2024/08/23/2

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

@jaraco

jaraco commented Aug 26, 2024

Copy link
Copy Markdown
Member Author

Thanks @jaraco, I'll take a look. Maybe you can clarify for me, the vulnerability only affects zipfile.Path and not zipfile.ZipFile methods using namelist, etc? If that's the case I need to update the advisory.

That is correct.

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

sethmlarson
sethmlarson approved these changes Aug 27, 2024
View reviewed changes
@jaraco
jaraco merged commit 2231286 into python:main Aug 27, 2024
@miss-islington-app

miss-islington-app Bot commented Aug 27, 2024

Copy link
Copy Markdown

Thanks @jaraco for the PR 🌮🎉.. I'm working now to backport this PR to: 3.8, 3.9, 3.10, 3.11, 3.12, 3.13.
🐍🍒⛏🤖

All reactions

Sorry, something went wrong.

Uh oh!

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

@bedevere-app bedevere-app Bot removed the awaiting core review label Aug 27, 2024
miss-islington pushed a commit to miss-islington/cpython that referenced this pull request Aug 27, 2024
@jaraco @miss-islington
pythongh-123270: Replaced SanitizedNames with a more surgical fix. (p…
88e9785
…ythonGH-123354)

Applies changes from zipp 3.20.1 and jaraco/zippGH-124
(cherry picked from commit 2231286)

Co-authored-by: Jason R. Coombs <[email protected]>
@bedevere-app

bedevere-app Bot commented Aug 27, 2024

Copy link
Copy Markdown

GH-123410 is a backport of this pull request to the 3.13 branch.

All reactions

Sorry, something went wrong.

Uh oh!

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

@bedevere-app bedevere-app Bot removed the needs backport to 3.13 only security fixes label Aug 27, 2024
miss-islington pushed a commit to miss-islington/cpython that referenced this pull request Aug 27, 2024
@jaraco @miss-islington
pythongh-123270: Replaced SanitizedNames with a more surgical fix. (p…
a2ee3af
…ythonGH-123354)

Applies changes from zipp 3.20.1 and jaraco/zippGH-124
(cherry picked from commit 2231286)

Co-authored-by: Jason R. Coombs <[email protected]>
@miss-islington-app

miss-islington-app Bot commented Aug 27, 2024

Copy link
Copy Markdown

Sorry, @jaraco, I could not cleanly backport this to 3.11 due to a conflict.
Please backport using cherry_picker on command line.

cherry_picker 2231286d78d328c2f575e0b05b16fe447d1656d6 3.11
All reactions

Sorry, something went wrong.

Uh oh!

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

@bedevere-app

bedevere-app Bot commented Aug 27, 2024

Copy link
Copy Markdown

GH-123411 is a backport of this pull request to the 3.12 branch.

All reactions

Sorry, something went wrong.

Uh oh!

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

@miss-islington-app miss-islington-app Bot assigned jaraco Aug 27, 2024
@bedevere-app bedevere-app Bot removed the needs backport to 3.12 only security fixes label Aug 27, 2024
@miss-islington-app

miss-islington-app Bot commented Aug 27, 2024

Copy link
Copy Markdown

Sorry, @jaraco, I could not cleanly backport this to 3.10 due to a conflict.
Please backport using cherry_picker on command line.

cherry_picker 2231286d78d328c2f575e0b05b16fe447d1656d6 3.10
All reactions

Sorry, something went wrong.

Uh oh!

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

@miss-islington-app

miss-islington-app Bot commented Aug 27, 2024

Copy link
Copy Markdown

Sorry, @jaraco, I could not cleanly backport this to 3.9 due to a conflict.
Please backport using cherry_picker on command line.

cherry_picker 2231286d78d328c2f575e0b05b16fe447d1656d6 3.9
All reactions

Sorry, something went wrong.

Uh oh!

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

@miss-islington-app

miss-islington-app Bot commented Aug 27, 2024

Copy link
Copy Markdown

Sorry, @jaraco, I could not cleanly backport this to 3.8 due to a conflict.
Please backport using cherry_picker on command line.

cherry_picker 2231286d78d328c2f575e0b05b16fe447d1656d6 3.8
All reactions

Sorry, something went wrong.

Uh oh!

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

@jaraco jaraco mentioned this pull request Aug 27, 2024
[3.8] gh-122905: Sanitize names in zipfile.Path. (GH-122906) #123162
Closed
@jaraco jaraco mentioned this pull request Aug 27, 2024
[3.9] gh-122905: Sanitize names in zipfile.Path. (GH-122906) #123161
Closed
@sindhu-karri

sindhu-karri commented Aug 28, 2024

Copy link
Copy Markdown

@jaraco Could you please drive the backports to the previous versions as well. Waiting for both the original fix and surgical fix to go together in the 3.9 and 3.12 versions

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

@jaraco

jaraco commented Aug 28, 2024

Copy link
Copy Markdown
Member Author

@jaraco Could you please drive the backports to the previous versions as well. Waiting for both the original fix and surgical fix to go together in the 3.9 and 3.12 versions

Yes, absolutely.

All reactions

Sorry, something went wrong.

Uh oh!

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

@jaraco jaraco mentioned this pull request Aug 28, 2024
Extract ZipInfo for archive functionality #123424
Closed
jaraco added a commit to jaraco/cpython that referenced this pull request Aug 28, 2024
@jaraco
[3.11] pythongh-123270: Replaced SanitizedNames with a more surgical …
17b77bb
…fix. (pythonGH-123354)

Applies changes from zipp 3.20.1 and jaraco/zippGH-124
(cherry picked from commit 2231286)

Co-authored-by: Jason R. Coombs <[email protected]>
@bedevere-app

bedevere-app Bot commented Aug 28, 2024

Copy link
Copy Markdown

GH-123425 is a backport of this pull request to the 3.11 branch.

All reactions

Sorry, something went wrong.

Uh oh!

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

@bedevere-app bedevere-app Bot removed the needs backport to 3.11 only security fixes label Aug 28, 2024
jaraco added a commit to jaraco/cpython that referenced this pull request Aug 28, 2024
@jaraco
[3.10] [3.11] pythongh-123270: Replaced SanitizedNames with a more su…
c94488e
…rgical fix. (pythonGH-123354)

Applies changes from zipp 3.20.1 and jaraco/zippGH-124
(cherry picked from commit 2231286)
(cherry picked from commit 17b77bb)

Co-authored-by: Jason R. Coombs <[email protected]>
@bedevere-app

bedevere-app Bot commented Aug 28, 2024

Copy link
Copy Markdown

GH-123426 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-app bedevere-app Bot removed the needs backport to 3.10 label Aug 28, 2024
@jaraco

jaraco commented Aug 28, 2024 •
edited
Loading

Uh oh!

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

Copy link
Copy Markdown
Member Author

Unfortunately, I can't complete a backport to 3.8 or 3.9 because the diff depends on other PRs not yet merged:

  • [3.9] gh-122905: Sanitize names in zipfile.Path. (GH-122906) #123161
  • [3.8] gh-122905: Sanitize names in zipfile.Path. (GH-122906) #123162

I guess I could hand-resolve the combination of the two, but I feel a little uneasy doing that.

All reactions

Sorry, something went wrong.

Uh oh!

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

@jaraco
jaraco deleted the gh-123270/secure-allowed-names branch August 28, 2024 13:31
jaraco added a commit to jaraco/cpython that referenced this pull request Aug 28, 2024
@jaraco
[3.9] [3.11] pythongh-123270: Replaced SanitizedNames with a more sur…
66d3383
…gical fix. (pythonGH-123354)

Applies changes from zipp 3.20.1 and jaraco/zippGH-124
(cherry picked from commit 2231286)
(cherry picked from commit 17b77bb)

Co-authored-by: Jason R. Coombs <[email protected]>
@bedevere-app

bedevere-app Bot commented Aug 28, 2024

Copy link
Copy Markdown

GH-123432 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.

@bedevere-app bedevere-app Bot removed the needs backport to 3.9 label Aug 28, 2024
jaraco added a commit to jaraco/cpython that referenced this pull request Aug 28, 2024
@jaraco
[3.8] [3.9] [3.11] pythongh-123270: Replaced SanitizedNames with a mo…
dcb320a
…re surgical fix. (pythonGH-123354)

Applies changes from zipp 3.20.1 and jaraco/zippGH-124
(cherry picked from commit 2231286)
(cherry picked from commit 17b77bb)
(cherry picked from commit 66d3383)

Co-authored-by: Jason R. Coombs <[email protected]>
@bedevere-app

bedevere-app Bot commented Aug 28, 2024

Copy link
Copy Markdown

GH-123433 is a backport of this pull request to the 3.8 branch.

All reactions

Sorry, something went wrong.

Uh oh!

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

@bedevere-app bedevere-app Bot removed the needs backport to 3.8 label Aug 28, 2024
Yhg1s pushed a commit that referenced this pull request Sep 2, 2024
@miss-islington @jaraco
[3.13] gh-123270: Replaced SanitizedNames with a more surgical fix. (G…
7e8883a
…H-123354) (#123410)

gh-123270: Replaced SanitizedNames with a more surgical fix. (GH-123354)

Applies changes from zipp 3.20.1 and jaraco/zippGH-124
(cherry picked from commit 2231286)

Co-authored-by: Jason R. Coombs <[email protected]>
jaraco added a commit that referenced this pull request Sep 2, 2024
@miss-islington @jaraco
[3.12] gh-123270: Replaced SanitizedNames with a more surgical fix. (G…
95b073b
…H-123354) (#123411)

gh-123270: Replaced SanitizedNames with a more surgical fix. (GH-123354)

Applies changes from zipp 3.20.1 and jaraco/zippGH-124
(cherry picked from commit 2231286)

Co-authored-by: Jason R. Coombs <[email protected]>
ambv pushed a commit that referenced this pull request Sep 4, 2024
@jaraco
[3.8] gh-123270: Replaced SanitizedNames with a more surgical fix. (G…
7bc367e
…H-123354) (#123433)

Applies changes from zipp 3.20.1 and jaraco/zippGH-124
(cherry picked from commit 2231286)
(cherry picked from commit 17b77bb)
(cherry picked from commit 66d3383)

Co-authored-by: Jason R. Coombs <[email protected]>
ambv pushed a commit that referenced this pull request Sep 4, 2024
@jaraco
[3.9] gh-123270: Replaced SanitizedNames with a more surgical fix. (G…
9620552
…H-123354) (#123432)

Applies changes from zipp 3.20.1 and jaraco/zippGH-124
(cherry picked from commit 2231286)
(cherry picked from commit 17b77bb)

Co-authored-by: Jason R. Coombs <[email protected]>
ambv pushed a commit that referenced this pull request Sep 4, 2024
@jaraco
[3.11] gh-123270: Replaced SanitizedNames with a more surgical fix. (G…
fc0b825
…H-123354) (#123425)

Applies changes from zipp 3.20.1 and jaraco/zippGH-124
(cherry picked from commit 2231286)

Co-authored-by: Jason R. Coombs <[email protected]>

* Restore the slash-prefixed paths in the malformed_paths test.
@jaraco jaraco mentioned this pull request Sep 4, 2024
[3.10] gh-123693: Use platform-agnostic semantics when processing zipfile.Path.name. #123694
Merged
ambv pushed a commit that referenced this pull request Sep 4, 2024
@jaraco
[3.10] gh-123270: Replaced SanitizedNames with a more surgical fix. (G…
0aa1ee2
…H-123354) (#123426)

Applies changes from zipp 3.20.1 and jaraco/zippGH-124
(cherry picked from commit 2231286)
(cherry picked from commit 17b77bb)

Co-authored-by: Jason R. Coombs <[email protected]>
@emontnemery emontnemery mentioned this pull request Jan 27, 2026
Add option to use frontend PR artifact to frontend integration home-assistant/core#161291
Merged
10 of 21 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

@sethmlarson sethmlarson sethmlarson approved these changes

Uh oh!

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

Assignees

@jaraco jaraco

Labels

None yet

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.

4 participants

@jaraco @sethmlarson @obfusk @sindhu-karri
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.