summaryrefslogtreecommitdiff
path: root/common/update.c
diff options
context:
space:
mode:
authorTom Rini <trini@konsulko.com>2021-02-15 19:19:56 -0500
committerTom Rini <trini@konsulko.com>2021-02-15 22:31:54 -0500
commitb6f4c757959f8850e1299a77c8e5713da78e8ec0 (patch)
tree2de8580b23f833e100a186448625721d71625521 /common/update.c
parent6144438fb5c9059dc87cf219bed0c992f70b3509 (diff)
parent3f04db891a353f4b127ed57279279f851c6b4917 (diff)
Merge branch '2021-02-15-fix-CVE-2021-27097-CVE-2021-27138'
Fix CVE-2021-27097 and CVE-2021-27138. For more details see http://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2021-27097 and http://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2021-27138
Diffstat (limited to 'common/update.c')
-rw-r--r--common/update.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/common/update.c b/common/update.c
index a5879cb52c4..f0848954e5d 100644
--- a/common/update.c
+++ b/common/update.c
@@ -286,7 +286,7 @@ int update_tftp(ulong addr, char *interface, char *devstring)
got_update_file:
fit = map_sysmem(addr, 0);
- if (!fit_check_format((void *)fit)) {
+ if (fit_check_format((void *)fit, IMAGE_SIZE_INVAL)) {
printf("Bad FIT format of the update file, aborting "
"auto-update\n");
return 1;
@@ -363,7 +363,7 @@ int fit_update(const void *fit)
if (!fit)
return -EINVAL;
- if (!fit_check_format((void *)fit)) {
+ if (fit_check_format((void *)fit, IMAGE_SIZE_INVAL)) {
printf("Bad FIT format of the update file, aborting auto-update\n");
return -EINVAL;
}