We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
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
Sorry, something went wrong.
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
Ideally, a regression test would be good but hash() is an implementation detail, making it CPython-only (I don't know how PyPy and co implement it), and if we don't already have a test for the similar issue you found, there's no need for one.
hash()
I can add a regression test.
Let's add a test where we manually craft the values that are hashed. I'm however unsure whether hash((X, Y)) where X and Y are known to be ints is always stable. For strings and bytes, this is not the case due to security reasons, but for ints, I think it's stable but I cannot say for sure that it's the case.
hash((X, Y))
If there wasn't a test introduced for the previous CVE, just don't bother with a test.
eeabe2a
264bf69
These tests were introduced for the previous CVE:
cpython/Lib/test/test_ipaddress.py
Lines 2753 to 2763 in 62f66ca
I added some tests in a separate commit. Feel free to drop it if you don't think the tests are valuable.
pythongh-134062: Fix hash collisions in IPv4Network and IPv6Network
bd15816
pythongh-134062: Add hash collision regression test
492c579
🤖 New build scheduled with the buildbot fleet by 492c579 🤖
Results will be shown at:
https://buildbot.python.org/all/#/grid?branch=refs%2Fpull%2F134063%2Fmerge
If you want to schedule another build, you need to add the 🔨 test-with-buildbots label again.
f3fc0c1
Thanks @gpshead for merging it 🌮🎉.. I'm working now to backport this PR to: 3.9, 3.10, 3.11, 3.12, 3.13, 3.14. 🐍🍒⛏🤖
pythongh-134062: Fix hash collisions in IPv4Network and IPv6Network (p…
fc67379
…ythonGH-134063) (cherry picked from commit f3fc0c1) Co-authored-by: Mike Salvatore <[email protected]> pythongh-134062: Fix hash collisions in IPv4Network and IPv6Network pythongh-134062: Add hash collision regression test
6f62f1f
3.14 branch.
12a4b39
3.13 branch.
7f186cf
3.12 branch.
3.11 branch.
67d38b1
8719a0b
3.10 branch.
3.9 branch.
[3.13] gh-134062: Fix hash collisions in IPv4Network and IPv6Network (G…
e0822d8
#134477) GH-134063) (cherry picked from commit f3fc0c1) gh-134062: Fix hash collisions in IPv4Network and IPv6Network gh-134062: Add hash collision regression test Co-authored-by: Mike Salvatore <[email protected]>
[3.14] gh-134062: Fix hash collisions in IPv4Network and IPv6Network (G…
4e9248f
#134476) GH-134063) (cherry picked from commit f3fc0c1) gh-134062: Fix hash collisions in IPv4Network and IPv6Network gh-134062: Add hash collision regression test Co-authored-by: Mike Salvatore <[email protected]>
[3.12] gh-134062: Fix hash collisions in IPv4Network and IPv6Network (G…
d02823e
#134478) GH-134063) (cherry picked from commit f3fc0c1) gh-134062: Fix hash collisions in IPv4Network and IPv6Network gh-134062: Add hash collision regression test Co-authored-by: Mike Salvatore <[email protected]>
412b391
…ythonGH-134063) pythongh-134062: Fix hash collisions in IPv4Network and IPv6Network pythongh-134062: Add hash collision regression test
[3.11] gh-134062: Fix hash collisions in IPv4Network and IPv6Network (G…
f8b4421
GH-134479) (cherry picked from commit f3fc0c1) Co-authored-by: Mike Salvatore <[email protected]>
[3.10] gh-134062: Fix hash collisions in IPv4Network and IPv6Network (G…
880adf6
GH-134480) (cherry picked from commit f3fc0c1) Co-authored-by: Mike Salvatore <[email protected]>
[3.9] gh-134062: Fix hash collisions in IPv4Network and IPv6Network (G…
03ac445
GH-134481) (cherry picked from commit f3fc0c1) Co-authored-by: Mike Salvatore <[email protected]>
aceded9
250fe64
picnixz picnixz left review comments
gpshead gpshead approved these changes
gpshead
Successfully merging this pull request may close these issues.