linux/drivers/platform
HyeongJun An a89f07db0c
platform/x86: ISST: Validate socket ID in clos_assoc ioctl
isst_if_clos_assoc() validates the user-supplied socket_id with
'socket_id > topology_max_packages()', but isst_common.sst_inst[] is
allocated with topology_max_packages() entries, so the valid index range
is [0, topology_max_packages()).  The '>' comparison lets
socket_id == topology_max_packages() pass and index one entry past the
array.

In addition, isst_common.sst_inst[socket_id] is NULL for an in-range
package that has no bound TPMI SST instance, and the pointer is used
without a NULL check.  Both the out-of-bounds entry and the NULL pointer
are then dereferenced by map_partition_power_domain_id() and the
following power_domain_info access.

Reject socket_id >= topology_max_packages() and a NULL sst_inst, matching
the checks already performed by get_instance().

Fixes: 12a7d2cb81 ("platform/x86: ISST: Add SST-CP support via TPMI")
Cc: stable@vger.kernel.org
Assisted-by: Claude:claude-opus-5
Signed-off-by: HyeongJun An <sammiee5311@gmail.com>
Acked-by: Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com>
Link: https://patch.msgid.link/20260807144003.3498972-2-sammiee5311@gmail.com
Reviewed-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com>
Signed-off-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com>
History 2026-08-18 17:30:12 +03:00
..
arm64 platform: arm64: qcom-hamoa-ec: reject incomplete responses 2026-08-03 20:02:53 +03:00
chrome Replace <linux/mod_devicetable.h> by more specific <linux/device-id/*.h> (c files) 2026-07-03 07:38:17 +02:00
cznic platform: cznic: turris-omnia-mcu: replace use of system_wq with system_percpu_wq 2026-05-07 11:29:59 -10:00
goldfish Replace <linux/mod_devicetable.h> by more specific <linux/device-id/*.h> (c files) 2026-07-03 07:38:17 +02:00
loongarch platform/loongarch: laptop: Unregister generic_sub_drivers on exit 2025-06-07 11:37:15 +08:00
mellanox platform/mellanox: mlxbf-pmc: Check ACPI_COMPANION() against NULL 2026-07-10 16:33:55 +03:00
mips platform: mips: cpu_hwmon: Disable driver on unsupported hardware 2024-06-21 10:22:10 +02:00
olpc platform/olpc: olpc-xo175-ec: Fix overflow error message to print inlen 2026-03-23 14:49:00 +02:00
raspberrypi Convert 'alloc_obj' family to use the new default GFP_KERNEL argument 2026-02-21 17:09:51 -08:00
surface platform/surface: acpi-notify: Check ACPI companion before use 2026-07-10 16:36:55 +03:00
wmi platform/wmi: Make sysfs attributes const 2026-06-12 16:01:53 +03:00
x86 platform/x86: ISST: Validate socket ID in clos_assoc ioctl 2026-08-18 17:30:12 +03:00
Kconfig platform-drivers-x86 for v6.19-1 2025-12-10 06:38:17 +09:00
Makefile platform-drivers-x86 for v6.19-1 2025-12-10 06:38:17 +09:00