rpm/backport-Do-not-allow-extra-packets-to-follow-a-signature.patch
2021-11-03 14:24:37 +08:00

29 lines
791 B
Diff

From 5ff86764b17f31535cb247543a90dd739076ec38 Mon Sep 17 00:00:00 2001
From: Demi Marie Obenour <demi@invisiblethingslab.com>
Date: Thu, 6 May 2021 18:34:45 -0400
Subject: [PATCH] Do not allow extra packets to follow a signature
Conflict:NA
Reference:https://github.com/rpm-software-management/rpm/commit/5ff86764b17f31535cb247543a90dd739076ec38
---
rpmio/rpmpgp.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/rpmio/rpmpgp.c b/rpmio/rpmpgp.c
index b174a40..629378a 100644
--- a/rpmio/rpmpgp.c
+++ b/rpmio/rpmpgp.c
@@ -1025,6 +1025,8 @@ int pgpPrtParams(const uint8_t * pkts, size_t pktlen, unsigned int pkttype,
break;
p += (pkt.body - pkt.head) + pkt.blen;
+ if (pkttype == PGPTAG_SIGNATURE)
+ break;
}
rc = (digp && (p == pend)) ? 0 : -1;
--
2.27.0