lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  PHC 
Open Source and information security mailing list archives
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:   Fri, 20 Nov 2020 19:04:18 +0100
From:   Mickaël Salaün <>
To:     David Howells <>,
        David Woodhouse <>
Cc:     Mickaël Salaün <>,
        "David S . Miller" <>,
        Herbert Xu <>,
        James Morris <>,
        Jarkko Sakkinen <>,
        Mickaël Salaün <>,
        Mimi Zohar <>,
        "Serge E . Hallyn" <>,,,,,
Subject: [PATCH v1 1/9] certs: Fix blacklisted hexadecimal hash string check

From: Mickaël Salaün <>

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

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

Cc: David Howells <>
Cc: David Woodhouse <>
Signed-off-by: Mickaël Salaün <>
 certs/blacklist.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/certs/blacklist.c b/certs/blacklist.c
index 6514f9ebc943..4e1a58170d5c 100644
--- a/certs/blacklist.c
+++ b/certs/blacklist.c
@@ -37,7 +37,7 @@ static int blacklist_vet_description(const char *desc)
 	for (; *desc; desc++) {
-		if (!isxdigit(*desc))
+		if (!isxdigit(*desc) || isupper(*desc))
 			return -EINVAL;

Powered by blists - more mailing lists