Skip to content

Conversation

@rickprice
Copy link

@rickprice rickprice commented Jul 3, 2024

CVE-2024-4032 Fix "private" (non-global) IP address ranges (pythonGH-113179) (pythonGH-113186) (pythonGH-118177)

(cherry picked from commit f86b17a)

Co-authored-by: Jakub Stasiak [email protected]
(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 [email protected]
(cherry picked from commit 05a1467)

Add IPv6 addresses to suspignore.csv

That's a lot of semicolons!

(cherry picked from commit e366724)

@rickprice rickprice requested a review from icanhasmath July 3, 2024 15:06
@rickprice rickprice force-pushed the BE-4055-cve-2024-4032-for-3-7 branch from 677b465 to 6e7c097 Compare July 4, 2024 00:53
…113179) (pythonGH-113186) (pythonGH-118177)

* Fix "private" (non-global) IP address ranges (pythonGH-113179) (pythonGH-113186)
(pythonGH-118177)

(cherry picked from commit f86b17a)

Co-authored-by: Jakub Stasiak <[email protected]>
(cherry picked from commit 05a1467)

pythongh-113171: pythongh-65056: Fix "private" (non-global) IP address ranges
(pythonGH-113179) (pythonGH-113186) (pythonGH-118177)

* pythonGH-113171: Fix "private" (non-global) IP address ranges (pythonGH-113179)

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

* pythonGH-65056: Improve the IP address' is_global/is_private documentation (pythonGH-113186)

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 <[email protected]>
(cherry picked from commit 05a1467)

Add IPv6 addresses to suspignore.csv

That's a lot of semicolons!

(cherry picked from commit e366724)
@rickprice rickprice force-pushed the BE-4055-cve-2024-4032-for-3-7 branch from 6e7c097 to 89f48de Compare July 8, 2024 21:40
Copy link

@icanhasmath icanhasmath left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@icanhasmath icanhasmath merged commit 2cd349a into 3.7.17.x Jul 8, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants