Compare commits
13 commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
daba5b738c | ||
|
|
b4205523e7 | ||
|
|
7da201e900 | ||
|
|
c30eb40478 | ||
|
|
e6d9413cd5 | ||
|
|
16aa6aa9ff | ||
|
|
458effe6fa | ||
|
|
c9e6166456 | ||
|
|
e0dac6a2c5 | ||
|
|
6c0fab4bc9 | ||
|
|
311900d817 | ||
|
|
14cfcd8b1f | ||
|
|
bd23e23416 |
7 changed files with 234 additions and 15 deletions
|
|
@ -22,10 +22,10 @@ Co-authored-by: Petr Viktorin <encukou@gmail.com>
|
|||
create mode 100644 Misc/NEWS.d/next/Library/2024-02-18-09-50-31.gh-issue-115627.HGchj0.rst
|
||||
|
||||
diff --git a/Lib/test/test_ssl.py b/Lib/test/test_ssl.py
|
||||
index 0f1397de73..21d3676c22 100644
|
||||
index f4bba8ff03..f772bd6ab6 100644
|
||||
--- a/Lib/test/test_ssl.py
|
||||
+++ b/Lib/test/test_ssl.py
|
||||
@@ -2605,16 +2605,18 @@ def run(self):
|
||||
@@ -2607,16 +2607,18 @@ def run(self):
|
||||
self.write(msg.lower())
|
||||
except OSError as e:
|
||||
# handles SSLError and socket errors
|
||||
|
|
@ -53,7 +53,7 @@ index 0f1397de73..21d3676c22 100644
|
|||
try:
|
||||
self.write(b"ERROR\n")
|
||||
except OSError:
|
||||
@@ -3296,23 +3298,16 @@ def test_wrong_cert_tls13(self):
|
||||
@@ -3298,23 +3300,16 @@ def test_wrong_cert_tls13(self):
|
||||
client_context.wrap_socket(socket.socket(),
|
||||
server_hostname=hostname,
|
||||
suppress_ragged_eofs=False) as s:
|
||||
|
|
@ -82,7 +82,7 @@ index 0f1397de73..21d3676c22 100644
|
|||
|
||||
def test_rude_shutdown(self):
|
||||
"""A brutal shutdown of an SSL server should raise an OSError
|
||||
@@ -4558,8 +4553,8 @@ def msg_cb(conn, direction, version, content_type, msg_type, data):
|
||||
@@ -4560,8 +4555,8 @@ def msg_cb(conn, direction, version, content_type, msg_type, data):
|
||||
# test sometimes fails with EOF error. Test passes as long as
|
||||
# server aborts connection with an error.
|
||||
with self.assertRaisesRegex(
|
||||
|
|
@ -102,7 +102,7 @@ index 0000000000..75d926ab59
|
|||
+Fix the :mod:`ssl` module error handling of connection terminate by peer.
|
||||
+It now throws an OSError with the appropriate error code instead of an EOFError.
|
||||
diff --git a/Modules/_ssl.c b/Modules/_ssl.c
|
||||
index 6852cc363b..91bf27bfef 100644
|
||||
index af770c7f18..7b3cf61474 100644
|
||||
--- a/Modules/_ssl.c
|
||||
+++ b/Modules/_ssl.c
|
||||
@@ -582,7 +582,7 @@ PySSL_ChainExceptions(PySSLSocket *sslsock) {
|
||||
|
|
|
|||
61
00474-cve-2025-15366.patch
Normal file
61
00474-cve-2025-15366.patch
Normal file
|
|
@ -0,0 +1,61 @@
|
|||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: Seth Michael Larson <seth@python.org>
|
||||
Date: Tue, 20 Jan 2026 14:45:42 -0600
|
||||
Subject: 00474: CVE-2025-15366
|
||||
|
||||
gh-143921: Reject control characters in IMAP commands
|
||||
|
||||
(cherry-picked from commit 6262704b134db2a4ba12e85ecfbd968534f28b45)
|
||||
---
|
||||
Lib/imaplib.py | 4 +++-
|
||||
Lib/test/test_imaplib.py | 6 ++++++
|
||||
.../Security/2026-01-16-11-41-06.gh-issue-143921.AeCOor.rst | 1 +
|
||||
3 files changed, 10 insertions(+), 1 deletion(-)
|
||||
create mode 100644 Misc/NEWS.d/next/Security/2026-01-16-11-41-06.gh-issue-143921.AeCOor.rst
|
||||
|
||||
diff --git a/Lib/imaplib.py b/Lib/imaplib.py
|
||||
index 54122f985b..9ab8e43bbf 100644
|
||||
--- a/Lib/imaplib.py
|
||||
+++ b/Lib/imaplib.py
|
||||
@@ -132,7 +132,7 @@
|
||||
# We compile these in _mode_xxx.
|
||||
_Literal = br'.*{(?P<size>\d+)}$'
|
||||
_Untagged_status = br'\* (?P<data>\d+) (?P<type>[A-Z-]+)( (?P<data2>.*))?'
|
||||
-
|
||||
+_control_chars = re.compile(b'[\x00-\x1F\x7F]')
|
||||
|
||||
|
||||
class IMAP4:
|
||||
@@ -994,6 +994,8 @@ def _command(self, name, *args):
|
||||
if arg is None: continue
|
||||
if isinstance(arg, str):
|
||||
arg = bytes(arg, self._encoding)
|
||||
+ if _control_chars.search(arg):
|
||||
+ raise ValueError("Control characters not allowed in commands")
|
||||
data = data + b' ' + arg
|
||||
|
||||
literal = self.literal
|
||||
diff --git a/Lib/test/test_imaplib.py b/Lib/test/test_imaplib.py
|
||||
index f817707743..9ce59b3040 100644
|
||||
--- a/Lib/test/test_imaplib.py
|
||||
+++ b/Lib/test/test_imaplib.py
|
||||
@@ -505,6 +505,12 @@ def test_login(self):
|
||||
self.assertEqual(data[0], b'LOGIN completed')
|
||||
self.assertEqual(client.state, 'AUTH')
|
||||
|
||||
+ def test_control_characters(self):
|
||||
+ client, _ = self._setup(SimpleIMAPHandler)
|
||||
+ for c0 in support.control_characters_c0():
|
||||
+ with self.assertRaises(ValueError):
|
||||
+ client.login(f'user{c0}', 'pass')
|
||||
+
|
||||
def test_logout(self):
|
||||
client, _ = self._setup(SimpleIMAPHandler)
|
||||
typ, data = client.login('user', 'pass')
|
||||
diff --git a/Misc/NEWS.d/next/Security/2026-01-16-11-41-06.gh-issue-143921.AeCOor.rst b/Misc/NEWS.d/next/Security/2026-01-16-11-41-06.gh-issue-143921.AeCOor.rst
|
||||
new file mode 100644
|
||||
index 0000000000..4e13fe92bc
|
||||
--- /dev/null
|
||||
+++ b/Misc/NEWS.d/next/Security/2026-01-16-11-41-06.gh-issue-143921.AeCOor.rst
|
||||
@@ -0,0 +1 @@
|
||||
+Reject control characters in IMAP commands.
|
||||
61
00475-cve-2025-15367.patch
Normal file
61
00475-cve-2025-15367.patch
Normal file
|
|
@ -0,0 +1,61 @@
|
|||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: Seth Michael Larson <seth@python.org>
|
||||
Date: Tue, 20 Jan 2026 14:46:32 -0600
|
||||
Subject: 00475: CVE-2025-15367
|
||||
|
||||
gh-143923: Reject control characters in POP3 commands
|
||||
|
||||
(cherry-picked from commit b234a2b67539f787e191d2ef19a7cbdce32874e7)
|
||||
---
|
||||
Lib/poplib.py | 2 ++
|
||||
Lib/test/test_poplib.py | 8 ++++++++
|
||||
.../2026-01-16-11-43-47.gh-issue-143923.DuytMe.rst | 1 +
|
||||
3 files changed, 11 insertions(+)
|
||||
create mode 100644 Misc/NEWS.d/next/Security/2026-01-16-11-43-47.gh-issue-143923.DuytMe.rst
|
||||
|
||||
diff --git a/Lib/poplib.py b/Lib/poplib.py
|
||||
index 0f8587317c..f563030f7f 100644
|
||||
--- a/Lib/poplib.py
|
||||
+++ b/Lib/poplib.py
|
||||
@@ -122,6 +122,8 @@ def _putline(self, line):
|
||||
def _putcmd(self, line):
|
||||
if self._debugging: print('*cmd*', repr(line))
|
||||
line = bytes(line, self.encoding)
|
||||
+ if re.search(b'[\x00-\x1F\x7F]', line):
|
||||
+ raise ValueError('Control characters not allowed in commands')
|
||||
self._putline(line)
|
||||
|
||||
|
||||
diff --git a/Lib/test/test_poplib.py b/Lib/test/test_poplib.py
|
||||
index 1220ca32ef..2655e366fd 100644
|
||||
--- a/Lib/test/test_poplib.py
|
||||
+++ b/Lib/test/test_poplib.py
|
||||
@@ -12,6 +12,7 @@
|
||||
import unittest
|
||||
from unittest import TestCase, skipUnless
|
||||
from test import support as test_support
|
||||
+from test.support import control_characters_c0
|
||||
from test.support import hashlib_helper
|
||||
from test.support import socket_helper
|
||||
from test.support import threading_helper
|
||||
@@ -365,6 +366,13 @@ def test_quit(self):
|
||||
self.assertIsNone(self.client.sock)
|
||||
self.assertIsNone(self.client.file)
|
||||
|
||||
+ def test_control_characters(self):
|
||||
+ for c0 in control_characters_c0():
|
||||
+ with self.assertRaises(ValueError):
|
||||
+ self.client.user(f'user{c0}')
|
||||
+ with self.assertRaises(ValueError):
|
||||
+ self.client.pass_(f'{c0}pass')
|
||||
+
|
||||
@requires_ssl
|
||||
def test_stls_capa(self):
|
||||
capa = self.client.capa()
|
||||
diff --git a/Misc/NEWS.d/next/Security/2026-01-16-11-43-47.gh-issue-143923.DuytMe.rst b/Misc/NEWS.d/next/Security/2026-01-16-11-43-47.gh-issue-143923.DuytMe.rst
|
||||
new file mode 100644
|
||||
index 0000000000..3cde4df3e0
|
||||
--- /dev/null
|
||||
+++ b/Misc/NEWS.d/next/Security/2026-01-16-11-43-47.gh-issue-143923.DuytMe.rst
|
||||
@@ -0,0 +1 @@
|
||||
+Reject control characters in POP3 commands.
|
||||
|
|
@ -0,0 +1,23 @@
|
|||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: Karolina Surma <ksurma@redhat.com>
|
||||
Date: Fri, 14 Aug 2026 09:38:26 +0200
|
||||
Subject: 00494: Increase the timeout of test_large_content_length_truncated
|
||||
|
||||
It has started to fail randomly when run on s390x architecture.
|
||||
---
|
||||
Lib/test/test_httpservers.py | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/Lib/test/test_httpservers.py b/Lib/test/test_httpservers.py
|
||||
index 5eb3c82fbd..aa8ad1c323 100644
|
||||
--- a/Lib/test/test_httpservers.py
|
||||
+++ b/Lib/test/test_httpservers.py
|
||||
@@ -872,7 +872,7 @@ def test_large_content_length(self):
|
||||
self.assertEqual(res.read(), b'%d %d' % (size, size) + self.linesep)
|
||||
|
||||
def test_large_content_length_truncated(self):
|
||||
- with support.swap_attr(self.request_handler, 'timeout', 0.001):
|
||||
+ with support.swap_attr(self.request_handler, 'timeout', support.LOOPBACK_TIMEOUT):
|
||||
for w in range(18, 65):
|
||||
size = 1 << w
|
||||
headers = {'Content-Length' : str(size)}
|
||||
6
plan.fmf
6
plan.fmf
|
|
@ -34,6 +34,9 @@ discover:
|
|||
- name: marshalparser
|
||||
path: /marshalparser
|
||||
test: "VERSION=${pybasever} SAMPLE=10 ./test_marshalparser_compatibility.sh"
|
||||
- name: required_symbols
|
||||
path: /required-symbols
|
||||
test: "VERSION=${pybasever} ./check.sh"
|
||||
|
||||
prepare:
|
||||
- name: Install dependencies
|
||||
|
|
@ -50,8 +53,9 @@ prepare:
|
|||
- virtualenv # for virtualenv tests
|
||||
- glibc-all-langpacks # for locale tests
|
||||
- marshalparser # for testing compatibility (magic numbers) with marshalparser
|
||||
- binutils # for nm (symbol inspection)
|
||||
- rpm # for debugging
|
||||
- dnf # for upgrade
|
||||
- dnf # for upgrade and downgrade
|
||||
- name: Update packages
|
||||
how: shell
|
||||
script: dnf upgrade -y
|
||||
|
|
|
|||
|
|
@ -13,7 +13,7 @@ URL: https://www.python.org/
|
|||
|
||||
# WARNING When rebasing to a new Python version,
|
||||
# remember to update the python3-docs package as well
|
||||
%global general_version %{pybasever}.19
|
||||
%global general_version %{pybasever}.21
|
||||
#global prerel ...
|
||||
%global upstream_version %{general_version}%{?prerel}
|
||||
Version: %{general_version}%{?prerel:~%{prerel}}
|
||||
|
|
@ -192,8 +192,7 @@ BuildRequires: bluez-libs-devel
|
|||
BuildRequires: bzip2
|
||||
BuildRequires: bzip2-devel
|
||||
BuildRequires: desktop-file-utils
|
||||
# See the runtime requirement in the -libs subpackage
|
||||
BuildRequires: expat-devel >= 2.6
|
||||
BuildRequires: expat-devel
|
||||
|
||||
BuildRequires: findutils
|
||||
BuildRequires: gcc-c++
|
||||
|
|
@ -217,7 +216,6 @@ BuildRequires: make
|
|||
BuildRequires: mpdecimal-devel
|
||||
BuildRequires: ncurses-devel
|
||||
|
||||
BuildRequires: openssl-devel
|
||||
BuildRequires: pkgconfig
|
||||
BuildRequires: readline-devel
|
||||
BuildRequires: redhat-rpm-config >= 127
|
||||
|
|
@ -230,6 +228,10 @@ BuildRequires: tix-devel
|
|||
BuildRequires: tk-devel < 1:9
|
||||
BuildRequires: tzdata
|
||||
|
||||
# Support for OpenSSL 4 only landed in Python 3.15 for now
|
||||
# https://github.com/python/cpython/issues/146207
|
||||
BuildRequires: (openssl-devel < 1:4 or openssl3-devel)
|
||||
|
||||
%if %{with valgrind}
|
||||
BuildRequires: valgrind-devel
|
||||
%endif
|
||||
|
|
@ -246,6 +248,9 @@ BuildRequires: /usr/sbin/ifconfig
|
|||
%if %{with rpmwheels}
|
||||
BuildRequires: %{python_wheel_pkg_prefix}-setuptools-wheel
|
||||
BuildRequires: %{python_wheel_pkg_prefix}-pip-wheel
|
||||
%else
|
||||
# For %%python_wheel_inject_sbom
|
||||
BuildRequires: python-rpm-macros
|
||||
%endif
|
||||
|
||||
%if %{without bootstrap}
|
||||
|
|
@ -348,6 +353,28 @@ Patch452: 00452-properly-apply-exported-cflags-for-dtrace-systemtap-builds.patch
|
|||
# stressed on OpenSSL 3.5.
|
||||
Patch462: 00462-fix-pyssl_seterror-handling-ssl_error_syscall.patch
|
||||
|
||||
# 00474 # 837ddca0372fa87ff9cee47142200caa21e77def
|
||||
# CVE-2025-15366
|
||||
#
|
||||
# gh-143921: Reject control characters in IMAP commands
|
||||
#
|
||||
# (cherry-picked from commit 6262704b134db2a4ba12e85ecfbd968534f28b45)
|
||||
Patch474: 00474-cve-2025-15366.patch
|
||||
|
||||
# 00475 # 3748209a316662d4e85981ca1a7418547a1d25c6
|
||||
# CVE-2025-15367
|
||||
#
|
||||
# gh-143923: Reject control characters in POP3 commands
|
||||
#
|
||||
# (cherry-picked from commit b234a2b67539f787e191d2ef19a7cbdce32874e7)
|
||||
Patch475: 00475-cve-2025-15367.patch
|
||||
|
||||
# 00494 # 430aab133397ed44cc9ee621fd311e02fee317b5
|
||||
# Increase the timeout of test_large_content_length_truncated
|
||||
#
|
||||
# It has started to fail randomly when run on s390x architecture.
|
||||
Patch494: 00494-increase-the-timeout-of-test_large_content_length_truncated.patch
|
||||
|
||||
# (New patches go here ^^^)
|
||||
#
|
||||
# When adding new patches to "python" and "python3" in Fedora, EL, etc.,
|
||||
|
|
@ -494,12 +521,24 @@ Recommends: (%{pkgname}-tkinter%{?_isa} = %{version}-%{release} if tk%{?_isa})
|
|||
Requires: tzdata
|
||||
|
||||
# The requirement on libexpat is generated, but we need to version it.
|
||||
# When built with expat >= 2.6, but installed with older expat, we get:
|
||||
# When built with a specific expat version, but installed with an older one,
|
||||
# we sometimes get:
|
||||
# ImportError: /usr/lib64/python3.X/lib-dynload/pyexpat.cpython-....so:
|
||||
# undefined symbol: XML_SetReparseDeferralEnabled
|
||||
# undefined symbol: XML_...
|
||||
# The pyexpat module has build-time checks for expat version to only use the
|
||||
# available symbols. However, there is no runtime protection, so when the module
|
||||
# is later installed with an older expat, it may error due to undefined symbols.
|
||||
# This breaks many things, including python -m venv.
|
||||
# We avoid this problem by requiring at least the same version of expat that
|
||||
# was used during the build time.
|
||||
# Other subpackages (like -debug) also need this, but they all depend on -libs.
|
||||
Requires: expat >= 2.6
|
||||
# Since expat 2.7.4, the library has versioned symbols and this is no longer needed,
|
||||
# as the generated requirement will be in the form of libexpat.so.1(LIBEXPAT_2.7.2) etc.
|
||||
%global expat_version %(LANG=C rpm -q --qf '%%{version}' expat.%{_target_cpu} | sed 's/.*not installed/0/')
|
||||
%if v"%{expat_version}" < v"2.7.4"
|
||||
Requires: expat%{?_isa} >= %{expat_version}
|
||||
%endif
|
||||
|
||||
|
||||
# Since patch 251 changed from distutils to sysconfig, pip needed to be adapted
|
||||
# The previous versions could cause serious bugs during `sudo pip install --upgrade ...`
|
||||
|
|
@ -1064,6 +1103,11 @@ for file in %{buildroot}%{pylibdir}/pydoc_data/topics.py $(grep --include='*.py'
|
|||
rm ${directory}/{__pycache__/${module}.cpython-%{pyshortver}.opt-?.pyc,${module}.py}
|
||||
done
|
||||
|
||||
%if %{without rpmwheels}
|
||||
# Inject SBOM into the installed wheels (if the macro is available)
|
||||
%{?python_wheel_inject_sbom:%python_wheel_inject_sbom %{buildroot}%{pylibdir}/ensurepip/_bundled/*.whl}
|
||||
%endif
|
||||
|
||||
# ======================================================
|
||||
# Checks for packaging issues
|
||||
# ======================================================
|
||||
|
|
@ -1634,6 +1678,32 @@ CheckPython optimized
|
|||
# ======================================================
|
||||
|
||||
%changelog
|
||||
* Thu Aug 13 2026 Karolina Surma <ksurma@redhat.com> - 3.10.21-1
|
||||
- Update to Python 3.10.21
|
||||
|
||||
* Thu Jul 30 2026 Miro Hrončok <mhroncok@redhat.com> - 3.10.20-4
|
||||
- Skip UDP Lite tests if it's not supported
|
||||
- Fixes FTBFS on Linux kernel 7.1 and newer
|
||||
|
||||
* Thu Jul 16 2026 Fedora Release Engineering <releng@fedoraproject.org> - 3.10.20-3
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_45_Mass_Rebuild
|
||||
|
||||
* Sat Apr 11 2026 Miro Hrončok <mhroncok@redhat.com> - 3.10.20-2
|
||||
- Explicitly build with OpenSSL 3
|
||||
- Fix ssl.SSLError: [ASN1: NOT_ENOUGH_DATA] not enough data with OpenSSL 3.5.7+
|
||||
|
||||
* Tue Mar 03 2026 Tomáš Hrnčiar <thrnciar@redhat.com> - 3.10.20-1
|
||||
- Update to 3.10.20
|
||||
|
||||
* Mon Feb 09 2026 Tomáš Hrnčiar <thrnciar@redhat.com> - 3.10.19-4
|
||||
- Security fixes for CVE-2026-0865, CVE-2025-15366 and CVE-2025-15367
|
||||
|
||||
* Sat Jan 17 2026 Fedora Release Engineering <releng@fedoraproject.org> - 3.10.19-3
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_44_Mass_Rebuild
|
||||
|
||||
* Tue Jan 06 2026 Karolina Surma <ksurma@redhat.com> - 3.10.19-2
|
||||
- Require at least the same expat version as used during the build time
|
||||
|
||||
* Fri Oct 10 2025 Karolina Surma <ksurma@redhat.com> - 3.10.19-1
|
||||
- Update to Python 3.10.19
|
||||
|
||||
|
|
|
|||
4
sources
4
sources
|
|
@ -1,2 +1,2 @@
|
|||
SHA512 (Python-3.10.19.tar.xz) = 9ea1e952bb5f7c9cc8d3efd8e7ae0059c129b6e09d12ded7d4e22476fad35f2c8186b1e003ea35a0099ffa5ff0a114985c3e960fba84e7037670b840a3e19c68
|
||||
SHA512 (Python-3.10.19.tar.xz.asc) = 64bcee68c2f4e0718daaf19d405f4a5bd0ce3fc3d13bb5cbae8d4a36e419dd104c94323b497f1d06110f6b62a1b3b351279c534145f4e8cea9af0d7bb0a8b5c9
|
||||
SHA512 (Python-3.10.21.tar.xz) = 6f6de7c5e4c0457f2d189ed5d111c83fb8775e19123afe4f9fd0ae2b93f3fa2bbb7ad849ade6bb5227d4a6a3d63abc8e167fbe5fb54fa715660c89fd6274daee
|
||||
SHA512 (Python-3.10.21.tar.xz.asc) = 72d6aeaa0f51e527f82392cf1f969b0ad50a48fe10e8b7e5feb6117718223d00757f7b375b3ac82e257571d5a61f8162e9dd59b81fcf8f2a441c6deb42be71cb
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue