* [PATCH] drivers/platform: toshiba_acpi: Fix array out-of-bounds access
@ 2024-07-09 14:38 Armin Wolf
2024-07-10 14:23 ` Hans de Goede
0 siblings, 1 reply; 2+ messages in thread
From: Armin Wolf @ 2024-07-09 14:38 UTC (permalink / raw)
To: coproscefalo; +Cc: hdegoede, ilpo.jarvinen, platform-driver-x86, linux-kernel
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")
Signed-off-by: Armin Wolf <W_Armin@gmx.de>
---
drivers/platform/x86/toshiba_acpi.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/drivers/platform/x86/toshiba_acpi.c b/drivers/platform/x86/toshiba_acpi.c
index 3a8d8df89186..d54bccec6ad6 100644
--- a/drivers/platform/x86/toshiba_acpi.c
+++ b/drivers/platform/x86/toshiba_acpi.c
@@ -3299,6 +3299,7 @@ static const struct dmi_system_id toshiba_dmi_quirks[] = {
},
.driver_data = (void *)(QUIRK_TURN_ON_PANEL_ON_RESUME | QUIRK_HCI_HOTKEY_QUICKSTART),
},
+ { }
};
static int toshiba_acpi_add(struct acpi_device *acpi_dev)
--
2.39.2
^ permalink raw reply [flat|nested] 2+ messages in thread* Re: [PATCH] drivers/platform: toshiba_acpi: Fix array out-of-bounds access
2024-07-09 14:38 [PATCH] drivers/platform: toshiba_acpi: Fix array out-of-bounds access Armin Wolf
@ 2024-07-10 14:23 ` Hans de Goede
0 siblings, 0 replies; 2+ messages in thread
From: Hans de Goede @ 2024-07-10 14:23 UTC (permalink / raw)
To: Armin Wolf, coproscefalo; +Cc: ilpo.jarvinen, platform-driver-x86, linux-kernel
Hi,
On 7/9/24 4:38 PM, Armin Wolf wrote:
> 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")
> Signed-off-by: Armin Wolf <W_Armin@gmx.de>
Thank you for your patch.
I have included this patch in the fixes pull-req to Linus
which I have just send out.
Regards,
Hans
> ---
> drivers/platform/x86/toshiba_acpi.c | 1 +
> 1 file changed, 1 insertion(+)
>
> diff --git a/drivers/platform/x86/toshiba_acpi.c b/drivers/platform/x86/toshiba_acpi.c
> index 3a8d8df89186..d54bccec6ad6 100644
> --- a/drivers/platform/x86/toshiba_acpi.c
> +++ b/drivers/platform/x86/toshiba_acpi.c
> @@ -3299,6 +3299,7 @@ static const struct dmi_system_id toshiba_dmi_quirks[] = {
> },
> .driver_data = (void *)(QUIRK_TURN_ON_PANEL_ON_RESUME | QUIRK_HCI_HOTKEY_QUICKSTART),
> },
> + { }
> };
>
> static int toshiba_acpi_add(struct acpi_device *acpi_dev)
> --
> 2.39.2
>
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2024-07-10 14:23 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-07-09 14:38 [PATCH] drivers/platform: toshiba_acpi: Fix array out-of-bounds access Armin Wolf
2024-07-10 14:23 ` Hans de Goede
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®