public inbox for git-commits@fedoraproject.org
help / color / mirror / Atom feed
* [rpms/sbsigntools] f45: Fix intermediate certificate verification in sbverify (resolves rhbz#2578941)
@ 2026-11-23 10:14 Dominik 'Rathann' Mierzejewski
0 siblings, 0 replies; only message in thread
From: Dominik 'Rathann' Mierzejewski @ 2026-11-23 10:14 UTC (permalink / raw)
To: git-commits
A new commit has been pushed.
Repo : rpms/sbsigntools
Branch : f45
Commit : a915f6a1d3349412fe604a8acc666a0234deac21
Author : Dominik 'Rathann' Mierzejewski <dominik@greysector.net>
Date : 2026-11-21T12:43:41+01:00
Stats : +57/-1 in 2 file(s)
URL : https://src.fedoraproject.org/rpms/sbsigntools/c/a915f6a1d3349412fe604a8acc666a0234deac21?branch=f45
Log:
Fix intermediate certificate verification in sbverify (resolves rhbz#2578941)
---
diff --git a/sbsigntools-intermediate-cert-verify.patch b/sbsigntools-intermediate-cert-verify.patch
new file mode 100644
index 0000000..479b4b2
--- /dev/null
+++ b/sbsigntools-intermediate-cert-verify.patch
@@ -0,0 +1,50 @@
+From db731f0c4dd75e112e2abdfbe9443065742e58c3 Mon Sep 17 00:00:00 2001
+From: James Bottomley <James.Bottomley@HansenPartnership.com>
+Date: Wed, 15 Apr 2026 10:06:02 -0400
+Subject: sbverify: fix intermediate certificate verification
+
+Openssl verification of partial chains cannot be fixed by checking
+error codes in the verify callback (because the errors for
+intermediate verified OK and failed are identical). Instead they must
+be fixed by setting the verification flag X509_V_FLAG_PARTIAL_CHAIN
+which treats any intermediate cert found as a CA.
+
+Fixes: df27a41 ("sbverify: fix verification with intermediate certificates")
+Tested-by: evilteq@anddroptable.net
+Tested-by: Steve McIntyre <steve@einval.com>
+Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
+---
+ src/sbverify.c | 3 ++-
+ 1 file changed, 2 insertions(+), 1 deletion(-)
+
+diff --git a/src/sbverify.c b/src/sbverify.c
+index 8f14f35..422b3e0 100644
+--- a/src/sbverify.c
++++ b/src/sbverify.c
+@@ -212,6 +212,7 @@ static int x509_verify_cb(int status, X509_STORE_CTX *ctx)
+
+ else if (err == X509_V_ERR_CERT_UNTRUSTED ||
+ err == X509_V_ERR_UNABLE_TO_GET_ISSUER_CERT ||
++ err == X509_V_ERR_UNABLE_TO_GET_ISSUER_CERT_LOCALLY ||
+ err == X509_V_ERR_UNABLE_TO_VERIFY_LEAF_SIGNATURE) {
+ /* all certs given with the --cert argument are trusted */
+
+@@ -220,7 +221,6 @@ static int x509_verify_cb(int status, X509_STORE_CTX *ctx)
+ } else if (err == X509_V_ERR_CERT_HAS_EXPIRED ||
+ err == X509_V_ERR_ERROR_IN_CERT_NOT_BEFORE_FIELD ||
+ err == X509_V_ERR_CERT_NOT_YET_VALID ||
+- err == X509_V_ERR_UNABLE_TO_GET_ISSUER_CERT_LOCALLY ||
+ err == X509_V_ERR_ERROR_IN_CERT_NOT_AFTER_FIELD)
+ /* UEFI explicitly allows expired certificates */
+ status = 1;
+@@ -246,6 +246,7 @@ int main(int argc, char **argv)
+
+ status = VERIFY_FAIL;
+ certs = X509_STORE_new();
++ X509_STORE_set_flags(certs, X509_V_FLAG_PARTIAL_CHAIN);
+ list = 0;
+ verbose = 0;
+ detached_sig_filename = NULL;
+--
+cgit 1.3.1-korg
+
diff --git a/sbsigntools.spec b/sbsigntools.spec
index 2c3ba43..596e7d7 100644
--- a/sbsigntools.spec
+++ b/sbsigntools.spec
@@ -3,7 +3,7 @@
Name: sbsigntools
Version: 0.9.5
-Release: 16%{?dist}
+Release: 17%{?dist}
Summary: Signing utility for UEFI secure boot
# Most source code is GPL-3.0-or-later, except:
# LicenseRef-Fedora-Public-Domain:
@@ -45,6 +45,8 @@ Patch3: %{name}-no-openssl-engines.patch
Patch4: %{name}-binutils.patch
# remove unused variable
Patch5: %{name}-unused-var.patch
+# fix intermediate certificate verification
+Patch6: https://git.kernel.org/pub/scm/linux/kernel/git/jejb/sbsigntools.git/patch/?id=db731f0c4dd75e112e2abdfbe9443065742e58c3#/%{name}-intermediate-cert-verify.patch
# same as gnu-efi
ExclusiveArch: x86_64 aarch64 %{arm} %{ix86} riscv64
BuildRequires: make
@@ -87,6 +89,7 @@ Tools to add signatures to EFI binaries and Drivers.
%patch -p 1 -P 3
%patch -p 1 -P 4
%patch -p 1 -P 5
+%patch -p 1 -P 6
%build
./autogen.sh
@@ -118,6 +121,9 @@ make check
%{_mandir}/man1/sbverify.1.*
%changelog
+* Sat Nov 21 2026 Dominik Mierzejewski <dominik@greysector.net> - 0.9.5-17
+- Fix intermediate certificate verification in sbverify (resolves rhbz#2578941)
+
* Fri Jul 17 2026 Fedora Release Engineering <releng@fedoraproject.org> - 0.9.5-16
- Rebuilt for https://fedoraproject.org/wiki/Fedora_45_Mass_Rebuild
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2026-11-23 10:14 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-11-23 10:14 [rpms/sbsigntools] f45: Fix intermediate certificate verification in sbverify (resolves rhbz#2578941) Dominik 'Rathann' Mierzejewski
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox