public inbox for git-commits@fedoraproject.org
help / color / mirror / Atom feed
To: git-commits@fedoraproject.org
Subject: [rpms/python3.14] f45: Fix fetching with -fips property for usedforsecurity=True
Date: Fri, 13 Nov 2026 11:08:16 GMT [thread overview]
Message-ID: <179456809640.1.2650205177058225150.rpms-python3.14-410b5213d76b@fedoraproject.org> (raw)
A new commit has been pushed.
Repo : rpms/python3.14
Branch : f45
Commit : 410b5213d76b920fc66ab579e6da739c0053d926
Author : Miro Hrončok <miro@hroncok.cz>
Date : 2026-11-13T12:07:18+01:00
Stats : +61/-1 in 2 file(s)
URL : https://src.fedoraproject.org/rpms/python3.14/c/410b5213d76b920fc66ab579e6da739c0053d926?branch=f45
Log:
Fix fetching with -fips property for usedforsecurity=True
And run tests in forced FIPS mode as well.
(cherry picked from c10s commit 0257f51a2d7af27e0fa2dc1c9fda1888b470cfda)
Unlike c10s with FIPS patch, we actually have 3 errors,
in test_case_md5_0 to _2. Those error existed even on 3.14.9,
so we deselect the tests for now.
For completes:
ERROR: test_case_md5_2 (test.test_hashlib.HashLibTestCase.test_case_md5_2)
----------------------------------------------------------------------
Traceback (most recent call last):
File "/builddir/build/BUILD/python3.14-3.14.10-build/Python-3.14.10/Lib/test/test_hashlib.py", line 644, in test_case_md5_2
self.check(
~~~~~~~~~~^
'md5',
^^^^^^
...<2 lines>...
usedforsecurity=False
^^^^^^^^^^^^^^^^^^^^^
)
^
File "/builddir/build/BUILD/python3.14-3.14.10-build/Python-3.14.10/Lib/test/test_hashlib.py", line 511, in check
self.check_file_digest(name, data, hexdigest)
~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^
File "/builddir/build/BUILD/python3.14-3.14.10-build/Python-3.14.10/Lib/test/test_hashlib.py", line 530, in check_file_digest
hashlib.file_digest(buf, digest).hexdigest(), hexdigest
~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^
File "/builddir/build/BUILD/python3.14-3.14.10-build/Python-3.14.10/Lib/hashlib.py", line 211, in file_digest
digestobj = digest()
_hashlib.UnsupportedDigestmodError: [digital envelope routines] unsupported
(The other two look almost identical.)
---
diff --git a/00500-gh-160923-fix-fetching-with--fips-property-for-usedforsecurity-true.patch b/00500-gh-160923-fix-fetching-with--fips-property-for-usedforsecurity-true.patch
new file mode 100644
index 0000000..393f250
--- /dev/null
+++ b/00500-gh-160923-fix-fetching-with--fips-property-for-usedforsecurity-true.patch
@@ -0,0 +1,41 @@
+From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
+From: Seth Michael Larson <seth@python.org>
+Date: Thu, 29 Oct 2026 15:55:24 -0500
+Subject: 00500: gh-160923: Fix fetching with `-fips` property for
+ `usedforsecurity=True`
+
+---
+ .../Security/2026-10-29-15-49-06.gh-issue-160923.gCRiZ3.rst | 5 +++++
+ Modules/_hashopenssl.c | 5 +++--
+ 2 files changed, 8 insertions(+), 2 deletions(-)
+ create mode 100644 Misc/NEWS.d/next/Security/2026-10-29-15-49-06.gh-issue-160923.gCRiZ3.rst
+
+diff --git a/Misc/NEWS.d/next/Security/2026-10-29-15-49-06.gh-issue-160923.gCRiZ3.rst b/Misc/NEWS.d/next/Security/2026-10-29-15-49-06.gh-issue-160923.gCRiZ3.rst
+new file mode 100644
+index 0000000000..8fa1bc394f
+--- /dev/null
++++ b/Misc/NEWS.d/next/Security/2026-10-29-15-49-06.gh-issue-160923.gCRiZ3.rst
+@@ -0,0 +1,5 @@
++.. cve: CVE-2026-119170
++
++Fix fetching with ``-fips`` property for ``usedforsecurity=True``
++in :mod:`hashlib`. This issue only affects Python 3.14.10, and
++all other Python versions are unaffected.
+diff --git a/Modules/_hashopenssl.c b/Modules/_hashopenssl.c
+index 09aa2af173..a87c541902 100644
+--- a/Modules/_hashopenssl.c
++++ b/Modules/_hashopenssl.c
+@@ -417,10 +417,11 @@ py_digest_by_name(PyObject *module, const char *name, enum Py_hash_type py_ht)
+ PY_EVP_MD *digest = NULL, *fresh = NULL;
+ _hashlibstate *state = get_hashlib_state(module);
+ py_hashentry_t *entry = _Py_hashtable_get(state->hashtable, name);
+- int fips = disable_fips_property(py_ht);
+- if (fips == -1) {
++ int disable_fips = disable_fips_property(py_ht);
++ if (disable_fips == -1) {
+ goto finally;
+ }
++ int fips = !disable_fips;
+
+ if (entry != NULL) {
+ PY_EVP_MD **cached = fips ? &entry->evp : &entry->evp_nosecurity;
diff --git a/python3.14.spec b/python3.14.spec
index 1bc1b35..cdf8ec4 100644
--- a/python3.14.spec
+++ b/python3.14.spec
@@ -49,7 +49,7 @@ URL: https://www.python.org/
#global prerel ...
%global upstream_version %{general_version}%{?prerel}
Version: %{general_version}%{?prerel:~%{prerel}}
-Release: 1%{?dist}
+Release: 2%{?dist}
License: Python-2.0.1
@@ -447,6 +447,10 @@ Patch477: 00477-raise-an-error-when-importing-stdlib-modules-compiled-for-a-diff
# gh-148646: Add --enable-prebuilt-jit-stencils configure flag
Patch486: 00486-gh-148646-add---enable-prebuilt-jit-stencils-configure-flag.patch
+# 00500 # 71a00312c96802a29a8b4b8ebee04ceddedcc4c5
+# gh-160923: Fix fetching with `-fips` property for `usedforsecurity=True`
+Patch500: 00500-gh-160923-fix-fetching-with--fips-property-for-usedforsecurity-true.patch
+
# (New patches go here ^^^)
#
# When adding new patches to "python" and "python3" in Fedora, EL, etc.,
@@ -1526,6 +1530,17 @@ CheckPython() {
%endif
-i test_check_probes \
+ # Re-run the hashlib/hmac/ssl related tests with FIPS mode forced on.
+ OPENSSL_FORCE_FIPS_MODE=1 LD_LIBRARY_PATH=$ConfDir $ConfDir/python -m test.regrtest \
+ -wW --slowest %{_smp_mflags} \
+ %ifarch riscv64
+ --timeout=8100 \
+ %else
+ --timeout=2700 \
+ %endif
+ test_hashlib test_hmac test_ssl \
+ -i test_case_md5_0 -i test_case_md5_1 -i test_case_md5_2
+
echo FINISHED: CHECKING OF PYTHON FOR CONFIGURATION: $ConfName
}
@@ -2014,6 +2029,10 @@ CheckPython freethreading
# ======================================================
%changelog
+* Mon Nov 09 2026 Miro Hrončok <miro@hroncok.cz> - 3.14.10-2
+- Security fix for CVE-2026-119170
+- Fixes a regression in FIPS enforcement of hash algorithms
+
* Mon Oct 26 2026 Karolina Surma <ksurma@redhat.com> - 3.14.10-1
- Update to Python 3.14.10
- CVE-2026-114583: tar filter allows writing outside destination via empty-named symlink
reply other threads:[~2026-11-13 11:08 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=179456809640.1.2650205177058225150.rpms-python3.14-410b5213d76b@fedoraproject.org \
--to=git-commits@fedoraproject.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox