[lfs] branch trunk updated: Python: Fix CVE-2025-8194

"Git Owner" ([email protected] via lfs-book Mailing List) <[email protected]>
Newsgroups gmane.linux.lfs.book
Message-ID <175445695601.16694.10539605141451972485@rivendell.linuxfromscratch.org>
This is an automated email from the git hooks/post-receive script.

git pushed a commit to branch trunk
in repository lfs.

The following commit(s) were added to refs/heads/trunk by this push:
     new 9f50c6cfe Python: Fix CVE-2025-8194
9f50c6cfe is described below

commit 9f50c6cfe16e8f4a39b72cfd33238e584d2cffd4
Author: Douglas R. Reno <[email protected]>
AuthorDate: Wed Aug 6 00:07:56 2025 -0500

    Python: Fix CVE-2025-8194
---
 chapter01/changelog.xml | 10 ++++++++++
 chapter08/python.xml    | 14 ++++++++++----
 2 files changed, 20 insertions(+), 4 deletions(-)

diff --git a/chapter01/changelog.xml b/chapter01/changelog.xml
index 09a3ee6e0..0e6915697 100644
--- a/chapter01/changelog.xml
+++ b/chapter01/changelog.xml
@@ -40,6 +40,16 @@
     appropriate for the entry or if needed the entire day's listitem.
     -->
 
+    <listitem>
+      <para>2025-08-05</para>
+      <itemizedlist>
+        <listitem>
+          <para>[renodr] - Fixed CVE-2025-8194 in Python. Fixes
+          <ulink url="&lfs-ticket-root;5774">#5774</ulink>.</para>
+        </listitem>
+      </itemizedlist>
+    </listitem>
+
     <listitem>
       <para>2025-08-01</para>
       <itemizedlist>
diff --git a/chapter08/python.xml b/chapter08/python.xml
index 534b81acd..2bedb71c6 100644
--- a/chapter08/python.xml
+++ b/chapter08/python.xml
@@ -42,11 +42,17 @@
 
   <sect2 role="installation">
     <title>Installation of Python 3</title>
-<!--
-    <para>First, apply a security patch to the current package:</para>
 
-    <screen><userinput remap="pre">patch -Np1 -i ../&python-security-fixes-patch;</userinput></screen>
--->    
+    <!-- CVE-2025-8194, see BLFS ticket #21895. The sed adds three lines. Thank
+    you Bruce for the sed! Please do not modify the spacing. -renodr -->
+    <para>First, fix a security vulnerability in the tarfile module:</para>
+
+<screen><userinput remap="pre">sed -e '/Round/{n;n;a\
+        # Only non-negative offsets are allowed\
+        if count &lt; 0:\
+            raise InvalidHeaderError("invalid offset")
+}' -i Lib/tarfile.py</userinput></screen>
+
     <para>Prepare Python for compilation:</para>
 
 <screen><userinput remap="configure">./configure --prefix=/usr          \

-- 
To stop receiving notification emails like this one, please contact
the administrator of this repository.

-- 
http://lists.linuxfromscratch.org/sympa/info/lfs-book
Unsubscribe: See the above information page
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.