]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
ACPICA: Fix largest possible resource descriptor index
authorDmitry Antipov <dmantipov@yandex.ru>
Fri, 12 Sep 2025 20:03:16 +0000 (22:03 +0200)
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>
Mon, 15 Sep 2025 10:20:13 +0000 (12:20 +0200)
ACPI_RESOURCE_NAME_LARGE_MAX should be equal to the last actually
used resource descriptor index (ACPI_RESOURCE_NAME_CLOCK_INPUT).

Otherwise 'resource_index' in 'acpi_ut_validate_resource()' may be
clamped incorrectly and resulting value may issue an out-of-bounds
access for 'acpi_gbl_resource_types' array. Compile tested only.

Fixes: 520d4a0ee5b6 ("ACPICA: add support for ClockInput resource (v6.5)")
Link: https://github.com/acpica/acpica/commit/cf00116c
Link: https://marc.info/?l=linux-acpi&m=175449676131260&w=2
Signed-off-by: Dmitry Antipov <dmantipov@yandex.ru>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
drivers/acpi/acpica/aclocal.h

index 0c41f0097e8d71f49653eae537914797be5b342e..f98640086f4ef3cbf237b81dba614792383028b4 100644 (file)
@@ -1141,7 +1141,7 @@ struct acpi_port_info {
 #define ACPI_RESOURCE_NAME_PIN_GROUP_FUNCTION   0x91
 #define ACPI_RESOURCE_NAME_PIN_GROUP_CONFIG     0x92
 #define ACPI_RESOURCE_NAME_CLOCK_INPUT          0x93
-#define ACPI_RESOURCE_NAME_LARGE_MAX            0x94
+#define ACPI_RESOURCE_NAME_LARGE_MAX            0x93
 
 /*****************************************************************************
  *