* Patch "pkcs7: Prevent NULL pointer dereference, since sinfo is not always set." has been added to the 4.4-stable tree
@ 2017-10-24 8:02 gregkh
0 siblings, 0 replies; only message in thread
From: gregkh @ 2017-10-24 8:02 UTC (permalink / raw)
To: eric.sesterhenn, dhowells, gregkh; +Cc: stable, stable-commits
This is a note to let you know that I've just added the patch titled
pkcs7: Prevent NULL pointer dereference, since sinfo is not always set.
to the 4.4-stable tree which can be found at:
http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary
The filename of the patch is:
pkcs7-prevent-null-pointer-dereference-since-sinfo-is-not-always-set.patch
and it can be found in the queue-4.4 subdirectory.
If you, or anyone else, feels it should not be added to the stable tree,
please let <stable@vger.kernel.org> know about it.
>From 68a1fdbbf8bd3378325e45c19e167a165f9ffc3a Mon Sep 17 00:00:00 2001
From: Eric Sesterhenn <eric.sesterhenn@x41-dsec.de>
Date: Sun, 8 Oct 2017 20:02:32 +0200
Subject: pkcs7: Prevent NULL pointer dereference, since sinfo is not always set.
From: Eric Sesterhenn <eric.sesterhenn@x41-dsec.de>
commit 68a1fdbbf8bd3378325e45c19e167a165f9ffc3a upstream.
The ASN.1 parser does not necessarily set the sinfo field,
this patch prevents a NULL pointer dereference on broken
input.
Fixes: 99db44350672 ("PKCS#7: Appropriately restrict authenticated attributes and content type")
Signed-off-by: Eric Sesterhenn <eric.sesterhenn@x41-dsec.de>
Signed-off-by: David Howells <dhowells@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
crypto/asymmetric_keys/pkcs7_parser.c | 3 +++
1 file changed, 3 insertions(+)
--- a/crypto/asymmetric_keys/pkcs7_parser.c
+++ b/crypto/asymmetric_keys/pkcs7_parser.c
@@ -90,6 +90,9 @@ static int pkcs7_check_authattrs(struct
bool want;
sinfo = msg->signed_infos;
+ if (!sinfo)
+ goto inconsistent;
+
if (sinfo->authattrs) {
want = true;
msg->have_authattrs = true;
Patches currently in stable-queue which might be from eric.sesterhenn@x41-dsec.de are
queue-4.4/pkcs7-prevent-null-pointer-dereference-since-sinfo-is-not-always-set.patch
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2017-10-24 8:43 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-10-24 8:02 Patch "pkcs7: Prevent NULL pointer dereference, since sinfo is not always set." has been added to the 4.4-stable tree gregkh
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).