mirror of
https://github.com/torvalds/linux.git
synced 2024-11-22 04:18:58 +00:00
70fd1966c9
In find_asymmetric_key(), if all NULLs are passed in the id_{0,1,2}
arguments, the kernel will first emit WARN but then have an oops
because id_2 gets dereferenced anyway.
Add the missing id_2 check and move WARN_ON() to the final else branch
to avoid duplicate NULL checks.
Found by Linux Verification Center (linuxtesting.org) with Svace static
analysis tool.
Cc: stable@vger.kernel.org # v5.17+
Fixes:
|
||
---|---|---|
.. | ||
asymmetric_keys.h | ||
asymmetric_type.c | ||
Kconfig | ||
Makefile | ||
mscode_parser.c | ||
mscode.asn1 | ||
pkcs7_key_type.c | ||
pkcs7_parser.c | ||
pkcs7_parser.h | ||
pkcs7_trust.c | ||
pkcs7_verify.c | ||
pkcs7.asn1 | ||
pkcs8_parser.c | ||
pkcs8.asn1 | ||
public_key.c | ||
restrict.c | ||
selftest_ecdsa.c | ||
selftest_rsa.c | ||
selftest.c | ||
selftest.h | ||
signature.c | ||
verify_pefile.c | ||
verify_pefile.h | ||
x509_akid.asn1 | ||
x509_cert_parser.c | ||
x509_loader.c | ||
x509_parser.h | ||
x509_public_key.c | ||
x509.asn1 |