public inbox for git-commits@fedoraproject.org
help / color / mirror / Atom feed
To: git-commits@fedoraproject.org
Subject: [rpms/libsidplayfp] epel10: Fix CVE-2026-111148 - possible OOB read (rhbz#2554228)
Date: Mon, 26 Oct 2026 09:20:30 GMT	[thread overview]
Message-ID: <179300643088.1.17228497062597153919.rpms-libsidplayfp-3142b0e88493@fedoraproject.org> (raw)

            A new commit has been pushed.

            Repo   : rpms/libsidplayfp
            Branch : epel10
            Commit : 3142b0e88493858cfff0ad74e5082b699ec2fa54
            Author : Karel Volný <kvolny@redhat.com>
            Date   : 2026-10-26T10:20:22+01:00
            Stats  : +72/-4 in 2 file(s)
            URL    : https://src.fedoraproject.org/rpms/libsidplayfp/c/3142b0e88493858cfff0ad74e5082b699ec2fa54?branch=epel10

            Log:
            Fix CVE-2026-111148 - possible OOB read (rhbz#2554228)

Use %autosetup, add %check, spec cleanup

---
diff --git a/libsidplayfp-CVE-2026-111148.patch b/libsidplayfp-CVE-2026-111148.patch
new file mode 100644
index 0000000..eb8dd77
--- /dev/null
+++ b/libsidplayfp-CVE-2026-111148.patch
@@ -0,0 +1,62 @@
+From afa48cda489ad3a7c5ad12b635632f160599add8 Mon Sep 17 00:00:00 2001
+From: Leandro Nini <drfiemost@users.sourceforge.net>
+Date: Wed, 21 Oct 2026 20:26:44 +0200
+Subject: [PATCH] Fix possible out-of-bounds read (#280)
+
+CVE-2026-111148
+
+Adapted for 2.15.0 (Karel Volný <kvolny@redhat.com>)
+---
+ src/sidtune/SidTuneBase.cpp |  4 ++++
+ tests/TestPSID.cpp          | 18 +++++++++++++++++-
+ 2 files changed, 21 insertions(+), 1 deletion(-)
+
+diff --git a/src/sidtune/SidTuneBase.cpp b/src/sidtune/SidTuneBase.cpp
+index 446968a2d..aa4dc2e81 100644
+--- a/src/sidtune/SidTuneBase.cpp
++++ b/src/sidtune/SidTuneBase.cpp
+@@ -276,6 +276,10 @@ void SidTuneBase::acceptSidTune(const char* dataFileName, const char* infoFileNa
+         info->m_infoFileName = std::string(infoFileName + fileNamePos);
+     }
+ 
++    // Check that offset is inside file limits
++    if (fileOffset >= buf.size())
++        throw loadError(ERR_TRUNCATED);
++
+     // Fix bad sidtune set up.
+     if (info->m_songs > MAX_SONGS)
+     {
+diff --git a/tests/TestPSID.cpp b/tests/TestPSID.cpp
+index 57f7b202c..a013df085 100644
+--- a/tests/TestPSID.cpp
++++ b/tests/TestPSID.cpp
+@@ -51,7 +51,7 @@
+ using namespace UnitTest;
+ 
+ uint8_t const bufferRSID[BUFFERSIZE] = {
+-    0x52, 0x53, 0x49, 0x44, // magicID
++    0x52, 0x53, 0x49, 0x44, // magicID (RSID)
+     0x00, 0x02,             // version
+     0x00, 0x7C,             // dataOffset
+     0x00, 0x00,             // loadAddress
+@@ -345,4 +345,20 @@ TEST_FIXTURE(TestFixture, TestWrongThirdSIDAddressLikeSecond)
+     CHECK_EQUAL(0, tune.getInfo()->sidChipBase(2));
+ }
+ 
++/*
++ * Data offset must not exceed file size.
++ * CVE-2026-111148
++ */
++TEST_FIXTURE(TestFixture, TestBadDaatOffset)
++{
++    data[DATAOFFSET_HI] = 0x7c;
++    data[DATAOFFSET_LO] = 0x00;
++    data[SONGS_LO] = 0x00;
++
++    SidTune tune(data, BUFFERSIZE);
++    CHECK(!tune.getStatus());
++
++    CHECK_EQUAL("SIDTUNE ERROR: File is most likely truncated", tune.statusString());
++}
++
+ }

diff --git a/libsidplayfp.spec b/libsidplayfp.spec
index 837b8a4..08c6d16 100644
--- a/libsidplayfp.spec
+++ b/libsidplayfp.spec
@@ -1,11 +1,12 @@
 Name:           libsidplayfp
 Version:        2.15.0
-Release:        1%{?dist}
+Release:        2%{?dist}
 Summary:        SID chip music module playing library
 # Zlib (src/utils/MD5/), GPL-2.0-only (src/builders/exsid-builder/) and GPL-2.0-or-later (the rest)
 License:        GPL-2.0-or-later AND GPL-2.0-only AND Zlib
 URL:            https://github.com/libsidplayfp
 Source0:        https://github.com/libsidplayfp/%{name}/releases/download/v%{version}/%{name}-%{version}.tar.gz
+Patch0:         libsidplayfp-CVE-2026-111148.patch
 BuildRequires:  gcc gcc-c++ libtool doxygen
 BuildRequires:  libftdi-c++-devel libgcrypt-devel
 BuildRequires:  make
@@ -36,7 +37,7 @@ This package contains API documentation for %{name}.
 
 
 %prep
-%setup -q
+%autosetup -p1
 # Regenerate autofoo stuff, it is better to always build this from source
 rm -r aclocal.m4 build-aux
 autoreconf -ivf
@@ -44,7 +45,7 @@ autoreconf -ivf
 
 %build
 %configure --disable-static
-make %{_smp_mflags} all doc
+%make_build all doc
 
 
 %install
@@ -52,7 +53,8 @@ make %{_smp_mflags} all doc
 find $RPM_BUILD_ROOT -name '*.la' -exec rm -f {} ';'
 
 
-%ldconfig_scriptlets
+%check
+%make_build check
 
 
 %files
@@ -73,6 +75,10 @@ find $RPM_BUILD_ROOT -name '*.la' -exec rm -f {} ';'
 
 
 %changelog
+* Mon Oct 26 2026 Karel Volný <kvolny@redhat.com> - 2.15.0-2
+- Fix CVE-2026-111148 - possible OOB read (rhbz#2554228)
+- Use %%autosetup, add %%check, spec cleanup
+
 * Wed Aug 13 2025 Karel Volný <kvolny@redhat.com> - 2.15.0-1
 - Update to 2.15.0 (rhbz#2359289)
 - See the upstream changes at https://github.com/libsidplayfp/libsidplayfp/releases

                 reply	other threads:[~2026-10-26  9:20 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=179300643088.1.17228497062597153919.rpms-libsidplayfp-3142b0e88493@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