x86/DMI: fix SMBIOS pointer range check
PATCH 1/1 x86/DMI: fix SMBIOS pointer range check
Forever since its introduction this has been using an inverted relation operator.
Fixes 54057a28f22b ("x86: support SMBIOS v3")
Signed-off-by Jan Beulich <[email protected]>
xen/arch/x86/dmi_scan.c +1 -1
@@ -357,7 +357,7 @@ static int __init dmi_iterate(void (*decmemcpy_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 ; }
Quoted 5 lines · Jan Beulich
Forever since its introduction this has been using an inverted relation operator.
Fixes 54057a28f22b ("x86: support SMBIOS v3")Signed-off-by Jan Beulich <[email protected]>
Acked-by Andrew Cooper <[email protected]>