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

[3.10] gh-98517: Fix buffer overflows in _sha3 module #98519

Merged
merged 3 commits into from
Oct 21, 2022

Conversation

botovq
Copy link

@botovq botovq commented Oct 21, 2022

This is a port of the applicable part of XKCP's fix for CVE-2022-37454 and avoids the segmentation fault and the infinite loop in the test cases published by the discoverer.

Automerge-Triggered-By: GH:gpshead

This is a port of the applicable part of XKCP's fix [1] for
CVE-2022-37454 and avoids the segmentation fault and the infinite
loop in the test cases published in [2].

[1]: XKCP/XKCP@fdc6fef
[2]: https://mouha.be/sha-3-buffer-overflow/
@bedevere-bot
Copy link

Most changes to Python require a NEWS entry.

Please add it using the blurb_it web app or the blurb command-line tool.

@cpython-cla-bot
Copy link

cpython-cla-bot bot commented Oct 21, 2022

All commit authors signed the Contributor License Agreement.
CLA signed

@botovq botovq changed the title gh-98517: [3.10] Fix buffer overflows in _sha3 module [3.10] gh-98517: Fix buffer overflows in _sha3 module Oct 21, 2022
@gpshead gpshead added release-blocker type-security A security issue needs backport to 3.9 only security fixes type-crash A hard crash of the interpreter, possibly with a core dump labels Oct 21, 2022
@gpshead gpshead self-assigned this Oct 21, 2022
Copy link
Member

@gpshead gpshead left a comment

Choose a reason for hiding this comment

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

I visually confirmed that this matches the upstream XKCP fix in XKCP/XKCP@fdc6fef.

@miss-islington
Copy link
Contributor

Thanks @botovq for the PR, and @gpshead for merging it 🌮🎉.. I'm working now to backport this PR to: 3.7, 3.8, 3.9.
🐍🍒⛏🤖

miss-islington pushed a commit to miss-islington/cpython that referenced this pull request Oct 21, 2022
…-98519)

This is a port of the applicable part of XKCP's fix [1] for
CVE-2022-37454 and avoids the segmentation fault and the infinite
loop in the test cases published in [2].

[1]: XKCP/XKCP@fdc6fef
[2]: https://mouha.be/sha-3-buffer-overflow/

Regression test added by: Gregory P. Smith [Google LLC] <greg@krypto.org>
(cherry picked from commit 0e4e058)

Co-authored-by: Theo Buehler <botovq@users.noreply.github.com>
@bedevere-bot
Copy link

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

@bedevere-bot bedevere-bot removed the needs backport to 3.9 only security fixes label Oct 21, 2022
@bedevere-bot
Copy link

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

@bedevere-bot
Copy link

GH-98528 is a backport of this pull request to the 3.7 branch.

@bedevere-bot
Copy link

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

@bedevere-bot
Copy link

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

miss-islington pushed a commit to miss-islington/cpython that referenced this pull request Oct 21, 2022
…-98519)

This is a port of the applicable part of XKCP's fix [1] for
CVE-2022-37454 and avoids the segmentation fault and the infinite
loop in the test cases published in [2].

[1]: XKCP/XKCP@fdc6fef
[2]: https://mouha.be/sha-3-buffer-overflow/

Regression test added by: Gregory P. Smith [Google LLC] <greg@krypto.org>
(cherry picked from commit 0e4e058)

Co-authored-by: Theo Buehler <botovq@users.noreply.github.com>
@bedevere-bot
Copy link

GH-98528 is a backport of this pull request to the 3.7 branch.

ned-deily pushed a commit that referenced this pull request Oct 22, 2022
…8528)

This is a port of the applicable part of XKCP's fix [1] for
CVE-2022-37454 and avoids the segmentation fault and the infinite
loop in the test cases published in [2].

[1]: XKCP/XKCP@fdc6fef
[2]: https://mouha.be/sha-3-buffer-overflow/

Regression test added by: Gregory P. Smith [Google LLC] <greg@krypto.org>
(cherry picked from commit 0e4e058)

Co-authored-by: Theo Buehler <botovq@users.noreply.github.com>
ambv pushed a commit that referenced this pull request Oct 28, 2022
This is a port of the applicable part of XKCP's fix [1] for
CVE-2022-37454 and avoids the segmentation fault and the infinite
loop in the test cases published in [2].

[1]: XKCP/XKCP@fdc6fef
[2]: https://mouha.be/sha-3-buffer-overflow/

Regression test added by: Gregory P. Smith [Google LLC] <greg@krypto.org>
(cherry picked from commit 0e4e058)

Co-authored-by: Theo Buehler <botovq@users.noreply.github.com>
ambv pushed a commit that referenced this pull request Oct 28, 2022
This is a port of the applicable part of XKCP's fix [1] for
CVE-2022-37454 and avoids the segmentation fault and the infinite
loop in the test cases published in [2].

[1]: XKCP/XKCP@fdc6fef
[2]: https://mouha.be/sha-3-buffer-overflow/

Regression test added by: Gregory P. Smith [Google LLC] <greg@krypto.org>
(cherry picked from commit 0e4e058)

Co-authored-by: Theo Buehler <botovq@users.noreply.github.com>
facebook-github-bot pushed a commit to facebookincubator/cinder that referenced this pull request Dec 12, 2022
Summary:
This is a cherry-pick from upstream 3.10 branch of [GH-98519](python/cpython#98519)
```
git cherry-pick 0e4e058
```

Original commit message:

This is a port of the applicable part of XKCP's fix [1] for
CVE-2022-37454 and avoids the segmentation fault and the infinite
loop in the test cases published in [2].

[1]: XKCP/XKCP@fdc6fef
[2]: https://mouha.be/sha-3-buffer-overflow/

Regression test added by: Gregory P. Smith [Google LLC] <greg@krypto.org>

Reviewed By: carljm

Differential Revision: D41908205

fbshipit-source-id: 199e75c
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
release-blocker type-crash A hard crash of the interpreter, possibly with a core dump type-security A security issue
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants