]> git.ipfire.org Git - thirdparty/Python/cpython.git/commit
[3.5] bpo-41004: Resolve hash collisions for IPv4Interface and IPv6Interface (GH... 21779/head
authorTapas Kundu <39723251+tapakund@users.noreply.github.com>
Tue, 4 Aug 2020 02:33:30 +0000 (08:03 +0530)
committerGitHub <noreply@github.com>
Tue, 4 Aug 2020 02:33:30 +0000 (19:33 -0700)
commit11d258ceafdf60ab3840f9a5700f2d0ad3e2e2d1
tree5886799983f76fb805a146154c9ebbeefbcff21e
parentf205f1000a2d7f8b044caf281041b3705f293480
[3.5] bpo-41004: Resolve hash collisions for IPv4Interface and IPv6Interface (GH-21033) (#21233)

CVE-2020-14422: The __hash__() methods of classes IPv4Interface and IPv6Interface had issue
of generating constant hash values of 32 and 128 respectively causing hash collisions.
The fix uses the hash() function to generate hash values for the objects
instead of XOR operation.

(cherry picked from commit b30ee26e366bf509b7538d79bfec6c6d38d53f28)

Co-authored-by: Ravi Teja P <rvteja92@gmail.com>
Signed-off-by: Tapas Kundu <tkundu@vmware.com>
Lib/ipaddress.py
Lib/test/test_ipaddress.py
Misc/NEWS.d/next/Security/2020-06-29-16-02-29.bpo-41004.ovF0KZ.rst [new file with mode: 0644]