]> www.infradead.org Git - users/hch/xfs.git/commitdiff
platform/x86: toshiba_acpi: Fix array out-of-bounds access
authorArmin Wolf <W_Armin@gmx.de>
Tue, 9 Jul 2024 14:38:51 +0000 (16:38 +0200)
committerHans de Goede <hdegoede@redhat.com>
Wed, 10 Jul 2024 14:12:12 +0000 (16:12 +0200)
In order to use toshiba_dmi_quirks[] together with the standard DMI
matching functions, it must be terminated by a empty entry.

Since this entry is missing, an array out-of-bounds access occurs
every time the quirk list is processed.

Fix this by adding the terminating empty entry.

Reported-by: kernel test robot <oliver.sang@intel.com>
Closes: https://lore.kernel.org/oe-lkp/202407091536.8b116b3d-lkp@intel.com
Fixes: 3cb1f40dfdc3 ("drivers/platform: toshiba_acpi: Call HCI_PANEL_POWER_ON on resume on some models")
Cc: stable@vger.kernel.org
Signed-off-by: Armin Wolf <W_Armin@gmx.de>
Link: https://lore.kernel.org/r/20240709143851.10097-1-W_Armin@gmx.de
Reviewed-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
drivers/platform/x86/toshiba_acpi.c

index 10d0ce6c8342520667f67cb17f6a6285e677f9a5..78a5aac2dcfd65b9afd8b477bc0e95ee7154c5c8 100644 (file)
@@ -3299,6 +3299,7 @@ static const struct dmi_system_id toshiba_dmi_quirks[] __initconst = {
                },
         .driver_data = (void *)(QUIRK_TURN_ON_PANEL_ON_RESUME | QUIRK_HCI_HOTKEY_QUICKSTART),
        },
+       { }
 };
 
 static int toshiba_acpi_add(struct acpi_device *acpi_dev)