public inbox for git-commits@fedoraproject.org
help / color / mirror / Atom feed
To: git-commits@fedoraproject.org
Subject: [rpms/coreutils] f43: fix CVE-2026-56391
Date: Mon, 03 Aug 2026 07:59:35 GMT	[thread overview]
Message-ID: <178574397580.1.10125718281052842557.rpms-coreutils-b3b9f9d8859a@fedoraproject.org> (raw)

            A new commit has been pushed.

            Repo   : rpms/coreutils
            Branch : f43
            Commit : b3b9f9d8859ac863efc4a06ff53fcbe3821da3b6
            Author : Lukáš Zaoral <lzaoral@redhat.com>
            Date   : 2026-08-03T09:59:08+02:00
            Stats  : +71/-1 in 2 file(s)
            URL    : https://src.fedoraproject.org/rpms/coreutils/c/b3b9f9d8859ac863efc4a06ff53fcbe3821da3b6?branch=f43

            Log:
            fix CVE-2026-56391

Resolves: rhbz#2507449

---
diff --git a/coreutils-9.11-CVE-2026-56391.patch b/coreutils-9.11-CVE-2026-56391.patch
new file mode 100644
index 0000000..7c4b862
--- /dev/null
+++ b/coreutils-9.11-CVE-2026-56391.patch
@@ -0,0 +1,63 @@
+From 3953e3d60edb0f23bdf367a3ccbc2282b9e00d1b Mon Sep 17 00:00:00 2001
+From: Paul Eggert <eggert@cs.ucla.edu>
+Date: Tue, 28 Apr 2026 11:25:00 -0700
+Subject: [PATCH] uniq: fix read overrun with -w
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+Problem reported by Michał Majchrowicz.
+* src/uniq.c (find_field): Fix typo.
+* tests/uniq/uniq.pl (add_z_variants): Test for the bug.
+
+(cherry picked from commit d64e35a8a4c0e4608321433e0d84d917e4e36371)
+---
+ THANKS.in          | 1 +
+ src/uniq.c         | 4 ++--
+ tests/uniq/uniq.pl | 3 +++
+ 3 files changed, 6 insertions(+), 2 deletions(-)
+
+diff --git a/THANKS.in b/THANKS.in
+index 35fee75..5a2fd35 100644
+--- a/THANKS.in
++++ b/THANKS.in
+@@ -459,6 +459,7 @@ Michail Litvak                      mci@owl.openwall.com
+ Michal Politowski                   mpol@charybda.icm.edu.pl
+ Michal Svec                         msvec@suse.cz
+ Michal Trunecka                     mtruneck@redhat.com
++Michał Majchrowicz                  mmajchrowicz@afine.com
+ Michel Robitaille                   robitail@IRO.UMontreal.CA
+ Michiel Bacchiani                   bacchian@raven.bu.edu
+ Mike Castle                         dalgoda@ix.netcom.com
+diff --git a/src/uniq.c b/src/uniq.c
+index 3046359..5834596 100644
+--- a/src/uniq.c
++++ b/src/uniq.c
+@@ -285,8 +285,8 @@ find_field (struct linebuffer const *line, idx_t *plen)
+   else
+     {
+       char *ep = lp;
+-      for (idx_t i = check_chars; 0 < i && lp < lim; i--)
+-        ep += mcel_scan (lp, lim).len;
++      for (idx_t i = check_chars; 0 < i && ep < lim; i--)
++        ep += mcel_scan (ep, lim).len;
+       len = ep - lp;
+     }
+ 
+diff --git a/tests/uniq/uniq.pl b/tests/uniq/uniq.pl
+index b558fb3..0df7ec6 100755
+--- a/tests/uniq/uniq.pl
++++ b/tests/uniq/uniq.pl
+@@ -234,6 +234,9 @@ my @Tests =
+         "  - 'separate'\n" .
+         "  - 'both'\n" .
+         "Try '$prog --help' for more information.\n"}],
++ # Test for read buffer overrun.
++ do { my $longline = "\360\237\230\200" . "A" x 255 . "\n";
++      ['146', '-w256', {IN  => $longline x 2}, {OUT => $longline}] },
+ );
+ 
+ # Locale related tests
+-- 
+2.55.0
+

diff --git a/coreutils.spec b/coreutils.spec
index 5c39f7b..0a056af 100644
--- a/coreutils.spec
+++ b/coreutils.spec
@@ -1,7 +1,7 @@
 Summary: A set of basic GNU tools commonly used in shell scripts
 Name:    coreutils
 Version: 9.7
-Release: 9%{?dist}
+Release: 10%{?dist}
 # some used parts of gnulib are under various variants of LGPL
 License: GPL-3.0-or-later AND GFDL-1.3-no-invariants-or-later AND LGPL-2.1-or-later AND LGPL-3.0-or-later
 Url:     https://www.gnu.org/software/coreutils/
@@ -49,6 +49,10 @@ Patch106: coreutils-CVE-2025-5278.patch
 # https://cgit.git.savannah.gnu.org/cgit/coreutils.git/patch/?id=3d35b3c0e56bd556c90dc98c3e5e2e7289b0eb0d
 Patch107: coreutils-9.7-stty-arbitrary-baud-rates.patch
 
+# CVE-2026-56391 - uniq: fix read overrun with -w
+# https://cgit.git.savannah.gnu.org/cgit/coreutils.git/commit/?id=d64e35a8a4c0e4608321433e0d84d917e4e36371
+Patch108: coreutils-9.11-CVE-2026-56391.patch
+
 # (sb) lin18nux/lsb compliance - multibyte functionality patch
 Patch800: coreutils-i18n.patch
 
@@ -298,6 +302,9 @@ rm -f $RPM_BUILD_ROOT%{_infodir}/dir
 %license COPYING
 
 %changelog
+* Mon Aug 03 2026 Lukáš Zaoral <lzaoral@redhat.com> - 9.7-10
+- CVE-2026-56391 - uniq: fix read overrun with -w (rhbz#2507449)
+
 * Thu Jun 11 2026 Lukáš Zaoral <lzaoral@redhat.com> - 9.7-9
 - unexpand: fix heap overflows
 

                 reply	other threads:[~2026-08-03  7:59 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=178574397580.1.10125718281052842557.rpms-coreutils-b3b9f9d8859a@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