x86/DMI: fix SMBIOS pointer range check

Forever since its introduction this has been using an inverted relation
operator.

Fixes: 54057a28f2 ("x86: support SMBIOS v3")
Signed-off-by: Jan Beulich <JBeulich@suse.com>
Acked-by: Andrew Cooper <andrew.cooper3@citrix.com>
master commit: 6befe59870
master date: 2020-11-24 11:25:29 +0100
This commit is contained in:
Jan Beulich authored and Jan Beulich committed 2020-12-01 15:39:48 +01:00
1 parent d064b6581b
commit a1d8a6c24b
1 file changed
+1 -1
+1 -1
View File
@@ -357,7 +357,7 @@ static int __init dmi_iterate(void (*decode)(struct dmi_header *))
memcpy_fromio(&smbios3, q, sizeof(smbios3));
if (memcmp(smbios3.anchor, "_SM3_", 5) ||
smbios3.length < sizeof(smbios3) ||
q < p + 0x10000 - smbios3.length ||
q > p + 0x10000 - smbios3.length ||
!dmi_checksum(q, smbios3.length))
smbios3.length = 0;
}
Reference in new issue
Block a user
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.