CVE-2024-4032 Fix "private" (non-global) IP address ranges (GH-113179… #57
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
CVE-2024-4032 Fix "private" (non-global) IP address ranges (pythonGH-113179) (pythonGH-113186) (pythonGH-118177)
([3.12] gh-113171: gh-65056: Fix "private" (non-global) IP address ranges (GH-113179) (GH-113186) python/cpython#118177)
(cherry picked from commit f86b17a)
Co-authored-by: Jakub Stasiak jakub@stasiak.at
(cherry picked from commit 05a1467)
pythongh-113171: pythongh-65056: Fix "private" (non-global) IP address ranges
(pythonGH-113179) (pythonGH-113186) (pythonGH-118177)
The _private_networks variables, used by various is_private
implementations, were missing some ranges and at the same time had
overly strict ranges (where there are more specific ranges considered
globally reachable by the IANA registries).
This patch updates the ranges with what was missing or otherwise
incorrect.
100.64.0.0/10 is left alone, for now, as it's been made special in [1].
The _address_exclude_many() call returns 8 networks for IPv4, 121
networks for IPv6.
[1] python#61602
It wasn't clear what the semantics of is_global/is_private are and, when
one gets to the bottom of it, it's not quite so simple (hence the
exceptions listed).
(cherry picked from commit 2a4cbf1)
(cherry picked from commit 40d75c2)
(cherry picked from commit f86b17a)
Co-authored-by: Jakub Stasiak jakub@stasiak.at
(cherry picked from commit 05a1467)
Add IPv6 addresses to suspignore.csv
That's a lot of semicolons!
(cherry picked from commit e366724)