Skip to content

[3.5] bpo-30657: Check & prevent integer overflow in PyString_DecodeEscape (GH-2174)#4664

Merged
larryhastings merged 1 commit into
python:3.5from
hroncok:fix-issue-30657
Dec 8, 2017
Merged

[3.5] bpo-30657: Check & prevent integer overflow in PyString_DecodeEscape (GH-2174)#4664
larryhastings merged 1 commit into
python:3.5from
hroncok:fix-issue-30657

Conversation

@hroncok

@hroncok hroncok commented Dec 1, 2017

Copy link
Copy Markdown
Contributor

Fixes possible integer overflow in PyBytes_DecodeEscape, CVE-2017-1000158.
Original patch by Jay Bosamiya @jaybosamiya in #2174

https://bugs.python.org/issue30657

@bedevere-bot bedevere-bot added the type-bug An unexpected behavior, bug, or error label Dec 1, 2017
@hroncok

hroncok commented Dec 1, 2017

Copy link
Copy Markdown
Contributor Author

@jaybosamiya I can make you the author of that commit if you'd like, but since it's against a different file, I didn't just cherry-picked it, so I wasn't sure.

@hroncok hroncok changed the title [3.5] bpo-30657: Check & prevent integer overflow in PyString_DecodeEscape (#2174) [3.5] bpo-30657: Check & prevent integer overflow in PyString_DecodeEscape (GH-2174) Dec 1, 2017
@bedevere-bot bedevere-bot added the type-bug An unexpected behavior, bug, or error label Dec 1, 2017
@jaybosamiya

Copy link
Copy Markdown

I'm not sure of the convention for cpython when bringing a patch from one version to another, but I'm fine with it either ways. Feel free to keep/change as you see fit :)

@hroncok

hroncok commented Dec 1, 2017

Copy link
Copy Markdown
Contributor Author

OK, let's wait what the reviewer says.

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

Would you mind to rewrite your commit message to mention the original author as the following syntax?

Co-Authored-By: Jay Bosamiya <jaybosamiya@gmail.com>

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

The change itself LGTM.

Fixes possible integer overflow in PyBytes_DecodeEscape.

Co-Authored-By: Jay Bosamiya <jaybosamiya@gmail.com>
@hroncok

hroncok commented Dec 4, 2017

Copy link
Copy Markdown
Contributor Author

Commit message changed as requested.

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

@vstinner

vstinner commented Dec 4, 2017

Copy link
Copy Markdown
Member

@larryhastings: Would you mind to merge this PR?

@hroncok

hroncok commented Dec 8, 2017

Copy link
Copy Markdown
Contributor Author

For 3.4: #4758

@larryhastings larryhastings merged commit fd8614c into python:3.5 Dec 8, 2017
@hroncok hroncok deleted the fix-issue-30657 branch December 8, 2017 21:41
@hroncok

hroncok commented Dec 8, 2017

Copy link
Copy Markdown
Contributor Author

Thanks @vstinner @larryhastings.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

type-bug An unexpected behavior, bug, or error

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants