diff --git a/kmod-testsuite.changes b/kmod-testsuite.changes index 020c09d..6a9f1b4 100644 --- a/kmod-testsuite.changes +++ b/kmod-testsuite.changes @@ -1,3 +1,9 @@ +------------------------------------------------------------------- +Fri Apr 6 10:43:42 UTC 2018 - msuchanek@suse.com + +- Fix crash when PKCS#7 signer name is not present in signature (bsc#1088244) + + libkmod-signature-pkcs-7-fix-crash-when-signer-info-.patch + ------------------------------------------------------------------- Fri Mar 16 13:08:14 CET 2018 - ro@suse.de diff --git a/kmod-testsuite.spec b/kmod-testsuite.spec index 385dd99..3dec895 100644 --- a/kmod-testsuite.spec +++ b/kmod-testsuite.spec @@ -37,6 +37,7 @@ Patch3: 0009-libkmod-Implement-filtering-of-unsupported-modules-o.patch Patch4: 0010-modprobe-Implement-allow-unsupported-modules.patch Patch5: 0011-Do-not-filter-unsupported-modules-when-running-a-van.patch Patch6: libkmod-signature-Fix-crash-when-module-signature-is.patch +Patch7: libkmod-signature-pkcs-7-fix-crash-when-signer-info-.patch BuildRoot: %{_tmppath}/%{name}-%{version}-build BuildRequires: asn1c BuildRequires: autoconf @@ -61,7 +62,7 @@ buildloop with the kernel. %prep %setup -q -n kmod-%version -%patch -P 0 -P 1 -P 2 -P 3 -P 4 -P 5 -P 6 -p1 +%patch -P 0 -P 1 -P 2 -P 3 -P 4 -P 5 -P 6 -P 7 -p1 %build autoreconf -fi diff --git a/kmod.changes b/kmod.changes index 0170b43..ef7f3b5 100644 --- a/kmod.changes +++ b/kmod.changes @@ -1,3 +1,9 @@ +------------------------------------------------------------------- +Fri Apr 6 10:43:42 UTC 2018 - msuchanek@suse.com + +- Fix crash when PKCS#7 signer name is not present in signature (bsc#1088244) + + libkmod-signature-pkcs-7-fix-crash-when-signer-info-.patch + ------------------------------------------------------------------- Fri Mar 16 13:08:14 CET 2018 - ro@suse.de diff --git a/kmod.spec b/kmod.spec index 0016c28..4849505 100644 --- a/kmod.spec +++ b/kmod.spec @@ -36,6 +36,7 @@ Patch3: 0009-libkmod-Implement-filtering-of-unsupported-modules-o.patch Patch4: 0010-modprobe-Implement-allow-unsupported-modules.patch Patch5: 0011-Do-not-filter-unsupported-modules-when-running-a-van.patch Patch6: libkmod-signature-Fix-crash-when-module-signature-is.patch +Patch7: libkmod-signature-pkcs-7-fix-crash-when-signer-info-.patch BuildRoot: %{_tmppath}/%{name}-%{version}-build BuildRequires: asn1c BuildRequires: autoconf @@ -108,7 +109,7 @@ in %lname. %prep %setup -q -n kmod-%version -%patch -P 0 -P 1 -P 2 -P 3 -P 4 -P 5 -P 6 -p1 +%patch -P 0 -P 1 -P 2 -P 3 -P 4 -P 5 -P 6 -P 7 -p1 %build autoreconf -fi diff --git a/libkmod-signature-pkcs-7-fix-crash-when-signer-info-.patch b/libkmod-signature-pkcs-7-fix-crash-when-signer-info-.patch new file mode 100644 index 0000000..d596c4d --- /dev/null +++ b/libkmod-signature-pkcs-7-fix-crash-when-signer-info-.patch @@ -0,0 +1,28 @@ +From 22afe9ca4bd26287554f282cbed9a367deb77186 Mon Sep 17 00:00:00 2001 +From: Michal Suchanek +Date: Fri, 6 Apr 2018 12:36:41 +0200 +Subject: [PATCH] libkmod-signature: pkcs#7: fix crash when signer info is not + present. + +Reported-by: Kazuya Saito +Signed-off-by: Michal Suchanek +--- + libkmod/libkmod-signature.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/libkmod/libkmod-signature.c b/libkmod/libkmod-signature.c +index fae074e6dd1d..782e96f69fef 100644 +--- a/libkmod/libkmod-signature.c ++++ b/libkmod/libkmod-signature.c +@@ -166,7 +166,7 @@ kmod_module_signature_info_pkcs7(const char *mem, + sig_info->key_id_len = cert->key_id_size; + + sig_info->signer = cert->signer; +- sig_info->signer_len = strlen(cert->signer); ++ sig_info->signer_len = cert->signer ? strlen(cert->signer) : 0; + + sig_info->algo = NULL; + sig_info->hash_algo = cert->hash_algo; +-- +2.13.6 +