]> git.dujemihanovic.xyz Git - u-boot.git/commitdiff
rsa: sig: fix config signature check for fit with padding
authorPhilippe Reynes <philippe.reynes@softathome.com>
Wed, 29 Apr 2020 13:26:17 +0000 (15:26 +0200)
committerTom Rini <trini@konsulko.com>
Fri, 1 May 2020 15:34:01 +0000 (11:34 -0400)
The signature check on config node is broken on fit with padding.
To compute the signature for config node, U-Boot compute the
signature on all properties of requested node for this config,
except for the property "data". But, when padding is used for
binary in a fit, there isn't a property "data" but two properties:
"data-offset" and "data-size". So to fix the check of signature,
we also don't use the properties "data-offset" and "data-size"
when checking the signature on config node.

Reviewed-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Philippe Reynes <philippe.reynes@softathome.com>
common/image-fit-sig.c

index 3e735785949e9d642c00624164e8f03933ed6749..a3a0c61bcbf48df7fb53f848d5a03df22dbbcf09 100644 (file)
@@ -249,7 +249,7 @@ static int fit_config_check_sig(const void *fit, int noffset,
                                int required_keynode, int conf_noffset,
                                char **err_msgp)
 {
-       char * const exc_prop[] = {"data"};
+       char * const exc_prop[] = {"data", "data-size", "data-position"};
        const char *prop, *end, *name;
        struct image_sign_info info;
        const uint32_t *strings;