]> git.ipfire.org Git - thirdparty/Python/cpython.git/commit
[3.6] bpo-41004: Resolve hash collisions for IPv4Interface and IPv6Interface (GH...
authorTapas Kundu <39723251+tapakund@users.noreply.github.com>
Tue, 30 Jun 2020 19:30:22 +0000 (01:00 +0530)
committerGitHub <noreply@github.com>
Tue, 30 Jun 2020 19:30:22 +0000 (15:30 -0400)
commitcfc7ff8d05f7a949a88b8a8dd506fb5c1c30d3e9
tree0223cd1fa7499f1d8a053e7c8ead0a6b9a0a04eb
parent2fce0235883e79419d7f3eb96057052e56fdeade
[3.6] bpo-41004: Resolve hash collisions for IPv4Interface and IPv6Interface (GH-21033) (GH-21232)

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]