mirror of
https://github.com/xen-project/xen.git
synced 2026-10-28 02:01:24 +01:00
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:6befe59870master date: 2020-11-24 11:25:29 +0100
This commit is contained in:
1 parent
d064b6581b
commit
a1d8a6c24b
1 file changed
+1
-1
@@ -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;
|
||||
}
|
||||
|
||||