linux/drivers/platform/wmi
Kurt Borja d3b7a868f1
platform/wmi: Fix unchecked min_size in wmidev_invoke_method()
After calling wmidev_evaluate_method(), if the ACPI core does not return
an out object, then wmidev_invoke_method() bypasses the min_size check
and returns 0. Add a check for min_size if there is not an out object.

Fixes: 1aeded2f55 ("platform/wmi: Extend wmidev_query_block() to reject undersized data")
Closes: https://sashiko.dev/#/patchset/20260406203237.2970-1-W_Armin%40gmx.de
Signed-off-by: Kurt Borja <kuurtb@gmail.com>
Reviewed-by: Armin Wolf <W_Armin@gmx.de>
Link: https://patch.msgid.link/20260429-invoke-fix-v1-1-ce938eb80cd3@gmail.com
Reviewed-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com>
Signed-off-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com>
2026-04-30 15:33:32 +03:00
..
tests platform/wmi: Prepare to reject undersized unmarshalling results 2026-04-13 14:11:22 +03:00
core.c platform/wmi: Fix unchecked min_size in wmidev_invoke_method() 2026-04-30 15:33:32 +03:00
internal.h platform/wmi: Prepare to reject undersized unmarshalling results 2026-04-13 14:11:22 +03:00
Kconfig platform/wmi: Add helper functions for WMI string conversions 2026-01-20 15:47:51 +02:00
Makefile platform/wmi: Add helper functions for WMI string conversions 2026-01-20 15:47:51 +02:00
marshalling.c platform/wmi: Prepare to reject undersized unmarshalling results 2026-04-13 14:11:22 +03:00
string.c platform/wmi: Add helper functions for WMI string conversions 2026-01-20 15:47:51 +02:00