-
-
Notifications
You must be signed in to change notification settings - Fork 31.2k
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
bpo-36384: Leading zeros in IPv4 addresses are no longer tolerated #25099
Conversation
Misc/NEWS.d/next/Security/2021-03-30-16-29-51.bpo-36384.sCAmLs.rst
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What's New entry?
Misc/NEWS.d/next/Security/2021-03-30-16-29-51.bpo-36384.sCAmLs.rst
Outdated
Show resolved
Hide resolved
Misc/NEWS.d/next/Security/2021-03-30-16-29-51.bpo-36384.sCAmLs.rst
Outdated
Show resolved
Hide resolved
I' leaving the whatsnew entry to release managers. |
Usually, release managers don't maintain the What's New document. Since this change is backward incompatible, IMO it would deserve a "Notable changes in Python 3.x.y" in their What's New document in 3.6-3.9 branches. Example for a recent security fix: For Python 3.10, it can be written in the https://docs.python.org/dev/whatsnew/3.10.html#changes-in-the-python-api section. |
c3d2fae
to
d79774f
Compare
Reverts commit e653d4d and makes parsing even more strict. Like socket.inet_pton() any leading zero is now treated as invalid input. Signed-off-by: Christian Heimes <[email protected]>
d79774f
to
a91c18a
Compare
This looks ready to me, and Christian has asked someone else to finish the merge as he's out. Any other feedback? @vstinner, @serhiy-storchaka, are you guys happy with the changes (pending the versionchanged being updated in each backport)? |
Withdrawing the readiness - @ambv and I would prefer to see this behind a flag (probably "strict" parsing), on by default for 3.10, and maybe on by default for 3.9/earlier. The main reasoning being that this isn't our vulnerability, but an inconsistency with other vulnerable libraries. The current fix is the best it can be, but it doesn't prevent the vulnerability, it just causes Python to break first. So it ought to be relatively easy to retain the flexible (though admittedly non-sensical) behaviour for those who currently rely on it. |
Sorry, @tiran and @ambv, I could not cleanly backport this to |
GH-25815 is a backport of this pull request to the 3.9 branch. |
…ythonGH-25099) Reverts commit e653d4d and makes parsing even more strict. Like socket.inet_pton() any leading zero is now treated as invalid input. Signed-off-by: Christian Heimes <[email protected]> Co-authored-by: Łukasz Langa <[email protected]> (cherry picked from commit 60ce8f0) Co-authored-by: Christian Heimes <[email protected]>
…H-25099) (GH-25815) Reverts commit e653d4d and makes parsing even more strict. Like socket.inet_pton() any leading zero is now treated as invalid input. Signed-off-by: Christian Heimes <[email protected]> Co-authored-by: Łukasz Langa <[email protected]> (cherry picked from commit 60ce8f0)
Thanks @tiran for the fix. |
…ythonGH-25099) Reverts commit e653d4d and makes parsing even more strict. Like socket.inet_pton() any leading zero is now treated as invalid input. Signed-off-by: Christian Heimes <[email protected]> Co-authored-by: Łukasz Langa <[email protected]>
…ted (GH-25099) (GH-27801) Reverts commit e653d4d and makes parsing even more strict. Like socket.inet_pton() any leading zero is now treated as invalid input. Signed-off-by: Christian Heimes <[email protected]> Co-authored-by: Łukasz Langa <[email protected]>
|
Reverts commit e653d4d and makes
parsing even more strict. Like socket.inet_pton() any leading zero
is now treated as invalid input.
Signed-off-by: Christian Heimes [email protected]
https://bugs.python.org/issue36384