[<prev] [next>] [day] [month] [year] [list]
Message-ID: <158287.1682087739@warthog.procyon.org.uk>
Date: Fri, 21 Apr 2023 15:35:39 +0100
From: David Howells <dhowells@...hat.com>
To: torvalds@...ux-foundation.org
cc: dhowells@...hat.com, Ekaterina Orlova <vorobushek.ok@...il.com>,
David Woodhouse <dwmw2@...radead.org>,
James Bottomley <jejb@...ux.ibm.com>,
Jarkko Sakkinen <jarkko@...nel.org>, keyrings@...r.kernel.org,
linux-kbuild@...r.kernel.org, linux-kernel@...r.kernel.org
Subject:
Hi Linus,
Can you apply this, please? It can probably wait for the merge window if you
don't want to apply it now as it only affects building the kernel.
Thanks,
David
---
From: Ekaterina Orlova <vorobushek.ok@...il.com>
ASN.1: Fix check for strdup() success
It seems there is a misprint in the check of strdup() return code
that can lead to NULL pointer dereference.
Found by Linux Verification Center (linuxtesting.org) with SVACE.
Fixes: 4520c6a49af8 ("X.509: Add simple ASN.1 grammar compiler")
Signed-off-by: Ekaterina Orlova <vorobushek.ok@...il.com>
Signed-off-by: David Howells <dhowells@...hat.com>
cc: David Woodhouse <dwmw2@...radead.org>
cc: James Bottomley <jejb@...ux.ibm.com>
cc: Jarkko Sakkinen <jarkko@...nel.org>
cc: keyrings@...r.kernel.org
cc: linux-kbuild@...r.kernel.org
Link: https://lore.kernel.org/r/20230315172130.140-1-vorobushek.ok@gmail.com/
---
scripts/asn1_compiler.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/scripts/asn1_compiler.c b/scripts/asn1_compiler.c
index 7b6756a8c15d..4c3f645065a4 100644
--- a/scripts/asn1_compiler.c
+++ b/scripts/asn1_compiler.c
@@ -625,7 +625,7 @@ int main(int argc, char **argv)
p = strrchr(argv[1], '/');
p = p ? p + 1 : argv[1];
grammar_name = strdup(p);
- if (!p) {
+ if (!grammar_name) {
perror(NULL);
exit(1);
}
Powered by blists - more mailing lists