public inbox for git-commits@fedoraproject.org
help / color / mirror / Atom feed
* [rpms/rpm] pmatilai-v6: Fix SIGSEGV in case of old unsupported gpg keys
@ 2026-11-23 9:29 Lubos Kardos
0 siblings, 0 replies; only message in thread
From: Lubos Kardos @ 2026-11-23 9:29 UTC (permalink / raw)
To: git-commits
A new commit has been pushed.
Repo : rpms/rpm
Branch : pmatilai-v6
Commit : aa8a7b2897b8ed3068fe7fb6a788e602dba50423
Author : Lubos Kardos <lkardos@redhat.com>
Date : 2015-11-06T13:10:56+01:00
Stats : +67/-1 in 2 file(s)
URL : https://src.fedoraproject.org/rpms/rpm/c/aa8a7b2897b8ed3068fe7fb6a788e602dba50423?branch=pmatilai-v6
Log:
Fix SIGSEGV in case of old unsupported gpg keys
Resolves: #1277464
---
diff --git a/rpm-4.13.0-unsupported-keys.patch b/rpm-4.13.0-unsupported-keys.patch
new file mode 100644
index 0000000..6603bbb
--- /dev/null
+++ b/rpm-4.13.0-unsupported-keys.patch
@@ -0,0 +1,62 @@
+From 2dd06933726cf5191e05264901789f8e1da6e51d Mon Sep 17 00:00:00 2001
+From: Lubos Kardos <lkardos@redhat.com>
+Date: Fri, 6 Nov 2015 12:45:32 +0100
+Subject: [PATCH] Fix SIGSEGV in case of old unsupported gpg keys
+ (rhbz:1277464)
+
+Regression from: a173d781a631a92524ce5be364c679ba19b3e321
+Adds also warning that gpg key is not supported.
+---
+ rpmio/rpmkeyring.c | 5 ++---
+ rpmio/rpmpgp.c | 5 +++++
+ 2 files changed, 7 insertions(+), 3 deletions(-)
+
+diff --git a/rpmio/rpmkeyring.c b/rpmio/rpmkeyring.c
+index b6b5703..c3d2c19 100644
+--- a/rpmio/rpmkeyring.c
++++ b/rpmio/rpmkeyring.c
+@@ -159,9 +159,8 @@ rpmPubkey *rpmGetSubkeys(rpmPubkey mainkey, int *count)
+ int pgpsubkeysCount = 0;
+ int i;
+
+- if (!pgpPrtParamsSubkeys(mainkey->pkt, mainkey->pktlen, mainkey->pgpkey,
+- &pgpsubkeys, &pgpsubkeysCount)) {
+-
++ if (mainkey && !pgpPrtParamsSubkeys(mainkey->pkt, mainkey->pktlen,
++ mainkey->pgpkey, &pgpsubkeys, &pgpsubkeysCount)) {
+
+ subkeys = xmalloc(pgpsubkeysCount * sizeof(*subkeys));
+
+diff --git a/rpmio/rpmpgp.c b/rpmio/rpmpgp.c
+index f020650..6f8d77b 100644
+--- a/rpmio/rpmpgp.c
++++ b/rpmio/rpmpgp.c
+@@ -624,6 +624,7 @@ static int pgpPrtSig(pgpTag tag, const uint8_t *h, size_t hlen,
+ rc = pgpPrtSigParams(tag, v->pubkey_algo, v->sigtype, p, h, hlen, _digp);
+ } break;
+ default:
++ rpmlog(RPMLOG_WARNING, _("Unsupported version of key: V%d\n"), h[0]);
+ rc = 1;
+ break;
+ }
+@@ -710,6 +711,8 @@ static int pgpPrtKey(pgpTag tag, const uint8_t *h, size_t hlen,
+ rc = pgpPrtPubkeyParams(v->pubkey_algo, p, h, hlen, _digp);
+ }
+ } break;
++ default:
++ rpmlog(RPMLOG_WARNING, _("Unsupported version of key: V%d\n"), h[0]);
+ }
+ return rc;
+ }
+@@ -775,6 +778,8 @@ static int getFingerprint(const uint8_t *h, size_t hlen, pgpKeyID_t keyid)
+ }
+
+ } break;
++ default:
++ rpmlog(RPMLOG_WARNING, _("Unsupported version of key: V%d\n"), h[0]);
+ }
+ return rc;
+ }
+--
+1.9.3
+
diff --git a/rpm.spec b/rpm.spec
index cf1bb66..4cd97b0 100644
--- a/rpm.spec
+++ b/rpm.spec
@@ -29,7 +29,7 @@
Summary: The RPM package management system
Name: rpm
Version: %{rpmver}
-Release: %{?snapver:0.%{snapver}.}9%{?dist}
+Release: %{?snapver:0.%{snapver}.}10%{?dist}
Group: System Environment/Base
Url: http://www.rpm.org/
Source0: http://rpm.org/releases/rpm-4.12.x/%{name}-%{srcver}.tar.bz2
@@ -60,6 +60,7 @@ Patch104: rpm-4.13.0-memory-error.patch
Patch105: rpm-4.13.0-rpmdeps-weakdep-support.patch
Patch106: rpm-4.13.0-autopatch-fix.patch
Patch107: rpm-4.13.0-ignore-sigpipe.patch
+Patch108: rpm-4.13.0-unsupported-keys.patch
# These are not yet upstream
Patch302: rpm-4.7.1-geode-i686.patch
@@ -564,6 +565,9 @@ exit 0
%doc doc/librpm/html/*
%changelog
+* Fri Nov 06 2015 Lubos Kardos <lkardos@rpm.org> - 4.13.0-0.rc1.10
+- Fix SIGSEGV in case of old unsupported gpg keys (#1277464)
+
* Fri Oct 30 2015 Lubos Kardos <lkardos@rpm.org> - 4.13.0-0.rc1.9
- Ignore SIGPIPE signals during execucton of scriptlets (#1264198)
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2026-11-23 9:29 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-11-23 9:29 [rpms/rpm] pmatilai-v6: Fix SIGSEGV in case of old unsupported gpg keys Lubos Kardos
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox