public inbox for git-commits@fedoraproject.org
help / color / mirror / Atom feed
From: Panu Matilainen <pmatilai@redhat.com>
To: git-commits@fedoraproject.org
Subject: [rpms/rpm] pmatilai-v6: Fix buffer overrun on rpmdb queries involving ^ in version
Date: Mon, 23 Nov 2026 09:34:27 GMT [thread overview]
Message-ID: <179542646741.1.325185722255514534.rpms-rpm-56a300ba62b9@fedoraproject.org> (raw)
A new commit has been pushed.
Repo : rpms/rpm
Branch : pmatilai-v6
Commit : 56a300ba62b9066185dab413acb050786e98524e
Author : Panu Matilainen <pmatilai@redhat.com>
Date : 2022-09-07T10:44:44+03:00
Stats : +33/-1 in 2 file(s)
URL : https://src.fedoraproject.org/rpms/rpm/c/56a300ba62b9066185dab413acb050786e98524e?branch=pmatilai-v6
Log:
Fix buffer overrun on rpmdb queries involving ^ in version
---
diff --git a/0001-Fix-buffer-overrun-from-commit-4420c78beb86cc6739227.patch b/0001-Fix-buffer-overrun-from-commit-4420c78beb86cc6739227.patch
new file mode 100644
index 0000000..4010f59
--- /dev/null
+++ b/0001-Fix-buffer-overrun-from-commit-4420c78beb86cc6739227.patch
@@ -0,0 +1,28 @@
+From 19d73f67883c011cc74326a5dc34f7009efa60e1 Mon Sep 17 00:00:00 2001
+Message-Id: <19d73f67883c011cc74326a5dc34f7009efa60e1.1662536462.git.pmatilai@redhat.com>
+From: Panu Matilainen <pmatilai@redhat.com>
+Date: Tue, 6 Sep 2022 13:15:44 +0300
+Subject: [PATCH] Fix buffer overrun from commit
+ 4420c78beb86cc67392274bf351478a3375626a2
+
+The newly handled ^ needs to be accounted for when allocating memory.
+Found when testing #1936, goes to show what a useful thing that is.
+---
+ lib/rpmdb.c | 1 +
+ 1 file changed, 1 insertion(+)
+
+diff --git a/lib/rpmdb.c b/lib/rpmdb.c
+index fd2b0671a..b3c5da62d 100644
+--- a/lib/rpmdb.c
++++ b/lib/rpmdb.c
+@@ -1107,6 +1107,7 @@ static char * mireDup(rpmTagVal tag, rpmMireMode *modep,
+ case '.':
+ case '+':
+ case '*':
++ case '^':
+ if (!brackets) nb++;
+ break;
+ case '\\':
+--
+2.37.3
+
diff --git a/rpm.spec b/rpm.spec
index 0589b3d..bb0a908 100644
--- a/rpm.spec
+++ b/rpm.spec
@@ -30,7 +30,7 @@
%global rpmver 4.18.0
%global snapver rc1
-%global baserelease 2
+%global baserelease 3
%global sover 9
%global srcver %{rpmver}%{?snapver:-%{snapver}}
@@ -56,6 +56,7 @@ Patch1: rpm-4.17.x-siteconfig.patch
Patch3: rpm-4.9.90-no-man-dirs.patch
# Patches already upstream:
+Patch100: 0001-Fix-buffer-overrun-from-commit-4420c78beb86cc6739227.patch
# These are not yet upstream
Patch906: rpm-4.7.1-geode-i686.patch
@@ -610,6 +611,9 @@ fi
%doc docs/librpm/html/*
%changelog
+* Wed Sep 07 2022 Panu Matilainen <pmatilai@redhat.com> - 4.18.0-0.rc1.3
+- Fix buffer overrun on rpmdb queries involving ^ in version
+
* Wed Sep 07 2022 Panu Matilainen <pmatilai@redhat.com> - 4.18.0-0.rc1.2
- Break selinux-policy <-> rpm-plugin-selinux ordering loop (#1851266)
reply other threads:[~2026-11-23 9:34 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=179542646741.1.325185722255514534.rpms-rpm-56a300ba62b9@fedoraproject.org \
--to=pmatilai@redhat.com \
--cc=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