commit | bfff4d9d532fb4fa07be9f325d774e5b23ae30f0 | [log] [tgz] |
---|---|---|
author | Demi Marie Obenour <demiobenour@gmail.com> | Thu Dec 08 15:24:31 2022 -0500 |
committer | Sandrine Bailleux <sandrine.bailleux@arm.com> | Tue Jan 03 17:49:16 2023 +0100 |
tree | 6a283d027f9e857bb7aa87589f30c0ae6bbc530e | |
parent | 4d1610baadcce0c63ea140e1940982d65c8cc74f [diff] |
fix(auth): reject junk after certificates Certificates must not allow trailing junk after them. Change-Id: Ie33205fb051fc63af5b72c326822da7f62eec1d1 Signed-off-by: Demi Marie Obenour <demiobenour@gmail.com>
diff --git a/drivers/auth/mbedtls/mbedtls_x509_parser.c b/drivers/auth/mbedtls/mbedtls_x509_parser.c index 87f280c..d8f201e 100644 --- a/drivers/auth/mbedtls/mbedtls_x509_parser.c +++ b/drivers/auth/mbedtls/mbedtls_x509_parser.c
@@ -178,7 +178,7 @@ return IMG_PARSER_ERR_FORMAT; } - if (len > (size_t)(end - p)) { + if (len != (size_t)(end - p)) { return IMG_PARSER_ERR_FORMAT; } crt_end = p + len;