Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

gh-123270: Replaced SanitizedNames with a more surgical fix. #123354

Merged
merged 1 commit into from
Aug 27, 2024

Conversation

jaraco
Copy link
Member

@jaraco jaraco commented Aug 26, 2024

@jaraco
Copy link
Member Author

jaraco commented Aug 26, 2024

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?

@sethmlarson
Copy link
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.

@obfusk
Copy link
Contributor

obfusk commented Aug 26, 2024

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

@jaraco
Copy link
Member Author

jaraco commented Aug 26, 2024

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.

@jaraco jaraco merged commit 2231286 into python:main Aug 27, 2024
41 checks passed
@miss-islington-app
Copy link

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.
🐍🍒⛏🤖

miss-islington pushed a commit to miss-islington/cpython that referenced this pull request Aug 27, 2024
…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
Copy link

bedevere-app bot commented Aug 27, 2024

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

@bedevere-app bedevere-app bot removed the needs backport to 3.13 bugs and security fixes label Aug 27, 2024
miss-islington pushed a commit to miss-islington/cpython that referenced this pull request Aug 27, 2024
…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
Copy link

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

@bedevere-app
Copy link

bedevere-app bot commented Aug 27, 2024

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

@bedevere-app bedevere-app bot removed the needs backport to 3.12 bug and security fixes label Aug 27, 2024
@miss-islington-app
Copy link

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

@miss-islington-app
Copy link

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

@miss-islington-app
Copy link

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

@sindhu-karri
Copy link

@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
Copy link
Member Author

jaraco commented Aug 28, 2024

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

jaraco added a commit to jaraco/cpython that referenced this pull request Aug 28, 2024
…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
Copy link

bedevere-app bot commented Aug 28, 2024

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

@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
…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
Copy link

bedevere-app bot commented Aug 28, 2024

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

@bedevere-app bedevere-app bot removed the needs backport to 3.10 only security fixes label Aug 28, 2024
@jaraco
Copy link
Member Author

jaraco commented Aug 28, 2024

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

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

@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
…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
Copy link

bedevere-app bot commented Aug 28, 2024

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

@bedevere-app bedevere-app bot removed the needs backport to 3.9 only security fixes label Aug 28, 2024
jaraco added a commit to jaraco/cpython that referenced this pull request Aug 28, 2024
…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
Copy link

bedevere-app bot commented Aug 28, 2024

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

Yhg1s pushed a commit that referenced this pull request Sep 2, 2024
…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
…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
…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
…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
…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.
ambv pushed a commit that referenced this pull request Sep 4, 2024
…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]>
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