[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[PATCH] 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 <JBeulich@xxxxxxxx>

--- a/xen/arch/x86/dmi_scan.c
+++ b/xen/arch/x86/dmi_scan.c
@@ -357,7 +357,7 @@ static int __init dmi_iterate(void (*dec
                        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;
                }



 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.