linux-stable/certs
Mickaël Salaün 84ffbefd65 certs: Fix blacklisted hexadecimal hash string check
When looking for a blacklisted hash, bin2hex() is used to transform a
binary hash to an ascii (lowercase) hexadecimal string.  This string is
then search for in the description of the keys from the blacklist
keyring.  When adding a key to the blacklist keyring,
blacklist_vet_description() checks the hash prefix and the hexadecimal
string, but not that this string is lowercase.  It is then valid to set
hashes with uppercase hexadecimal, which will be silently ignored by the
kernel.

Add an additional check to blacklist_vet_description() to check that
hexadecimal strings are in lowercase.

Signed-off-by: Mickaël Salaün <mic@linux.microsoft.com>
Signed-off-by: David Howells <dhowells@redhat.com>
Reviewed-by: Ben Boeckel <mathstuf@gmail.com>
Cc: David Woodhouse <dwmw2@infradead.org>
2021-01-21 16:16:10 +00:00
..
.gitignore .gitignore: add SPDX License Identifier 2020-03-25 11:50:48 +01:00
blacklist.c certs: Fix blacklisted hexadecimal hash string check 2021-01-21 16:16:10 +00:00
blacklist.h certs/blacklist: fix const confusion 2018-06-26 09:43:03 -07:00
blacklist_hashes.c License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
blacklist_nohashes.c certs/blacklist_nohashes.c: fix const confusion in certs blacklist 2018-02-21 15:35:43 -08:00
Kconfig docs: Fix some broken references 2018-06-15 18:10:01 -03:00
Makefile kbuild: remove redundant target cleaning on failure 2019-01-06 09:46:51 +09:00
system_certificates.S export.h: remove VMLINUX_SYMBOL() and VMLINUX_SYMBOL_STR() 2018-08-22 23:21:44 +09:00
system_keyring.c PKCS#7: Refactor verify_pkcs7_signature() 2019-08-05 18:40:18 -04:00