SECURITY UPDATE: race condition in ssl.SSLContext.cert_store_stats()
and get_ca_certs()
debian/patches/CVE-2024-0397.patch: in Modules/_ssl.c, take a locked
copy of the X509_STORE object list (shim of OpenSSL 3.3's
X509_STORE_get1_objects()) instead of iterating the live list, so a
concurrent certificate load can no longer free entries while they are
read. Backport of upstream commit 29c97287d205 (gh-114572, 3.8
branch); the get_ca_certs() failure path releases the result list,
as in the original 3.12 fix.
CVE-2024-0397
SECURITY UPDATE: incorrect "private"/"global" classification of IP
address ranges
debian/patches/CVE-2024-4032.patch: in Lib/ipaddress.py, update the
is_private / is_global tables to the IANA special-purpose registries
and handle IPv4-mapped IPv6 addresses. Backport of upstream commit
895f7e2ac23e (gh-113171, 3.8 branch); the Doc/whatsnew/3.8.rst hunk
is dropped. Bundles the upstream regression tests.
CVE-2024-4032
SECURITY UPDATE: email header injection through BytesGenerator
debian/patches/CVE-2026-1299.patch: in Lib/email/generator.py, apply
the verify_generated_headers checks in BytesGenerator._write_headers()
too. Backport of upstream commit 052e55e7d447 (gh-144125), with
bytes.removesuffix() replaced by slicing. Bundles the upstream
regression tests.
debian/patches/bpo-34424.patch, debian/patches/gh-142006.patch:
prerequisites of the BytesGenerator header check. In
Lib/email/_header_value_parser.py, strip the whole policy.linesep
when refolding an encoded word (upstream c0abd0c8e9b6, bpo-34424),
so smtplib.send_message() no longer raises HeaderWriteError, and drop
an empty line left in the fold buffer (upstream 90ca216cdcb7,
gh-142006).