]> git.ipfire.org Git - thirdparty/Python/cpython.git/commit
[3.7] bpo-41004: Resolve hash collisions for IPv4Interface and IPv6Interface (GH...
authorTapas Kundu <39723251+tapakund@users.noreply.github.com>
Tue, 30 Jun 2020 19:20:21 +0000 (00:50 +0530)
committerGitHub <noreply@github.com>
Tue, 30 Jun 2020 19:20:21 +0000 (15:20 -0400)
commitb98e7790c77a4378ec4b1c71b84138cb930b69b7
tree88a3c2309338d26f5db490f2da029ec6bda999bd
parent4fdc175f9adb7e8b82eca7b4182a21003ecf9395
[3.7] bpo-41004: Resolve hash collisions for IPv4Interface and IPv6Interface (GH-21033) (GH-21231)

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]