Skip to content

bpo-40645: restrict HMAC key len to INT_MAX - #20238

Merged
miss-islington merged 1 commit into
python:masterfrom
tiran:bpo40645-fix
May 19, 2020
Merged

miss-islington merged 1 commit into
python:masterfrom
tiran:bpo40645-fix

Conversation

@tiran

@tiran tiran commented May 19, 2020 •

Copy link
Copy Markdown
Member

Signed-off-by: Christian Heimes christian@python.org

https://bugs.python.org/issue40645

Automerge-Triggered-By: @tiran

Signed-off-by: Christian Heimes <christian@python.org>
Comment thread Modules/_hashopenssl.c

if (key->len > INT_MAX) {
PyErr_SetString(PyExc_OverflowError,
"key is too long.");

@vstinner vstinner May 19, 2020 •

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

"2 GB key should be enough for everyone" :-D

@vstinner vstinner left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

LGTM, thanks for the fix.

@miss-islington

Copy link
Copy Markdown
Contributor

Thanks @tiran for the PR 🌮🎉.. I'm working now to backport this PR to: 3.9.
🐍🍒⛏🤖

@bedevere-bot

Copy link
Copy Markdown

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

miss-islington pushed a commit to miss-islington/cpython that referenced this pull request May 19, 2020
Signed-off-by: Christian Heimes <christian@python.org>

Automerge-Triggered-By: @tiran
(cherry picked from commit aca4670)

Co-authored-by: Christian Heimes <christian@python.org>
miss-islington added a commit that referenced this pull request May 19, 2020
Signed-off-by: Christian Heimes <christian@python.org>

Automerge-Triggered-By: @tiran
(cherry picked from commit aca4670)

Co-authored-by: Christian Heimes <christian@python.org>
arturoescaip pushed a commit to arturoescaip/cpython that referenced this pull request May 24, 2020
Signed-off-by: Christian Heimes <christian@python.org>

Automerge-Triggered-By: @tiran
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

5 participants