Files
Lukas Wunner 3b626ba431 X.509: Fix validation of ASN.1 certificate header
x509_load_certificate_list() seeks to enforce that a certificate starts
with 0x30 0x82 (ASN.1 SEQUENCE tag followed by a length of more than 256
and less than 65535 bytes).

But it only enforces that *either* of those two byte values are present,
instead of checking for the *conjunction* of the two values.  Fix it.

Fixes: 631cc66eb9 ("MODSIGN: Provide module signing public keys to the kernel")
Reported-by: Sashiko <[email protected]>
Closes: https://lore.kernel.org/r/[email protected]/
Signed-off-by: Lukas Wunner <[email protected]>
Cc: [email protected] # v3.7+
Reviewed-by: Ignat Korchagin <[email protected]>
Reviewed-by: Alistair Francis <[email protected]>
Signed-off-by: Herbert Xu <[email protected]>
2026-05-22 20:25:29 +08:00
..
2026-01-30 11:34:34 +00:00