linux-stable/drivers/platform
Dan Carpenter 72e4d07d94 platform/x86: think-lmi: Prevent underflow in index_store()
There needs to be a check to prevent negative offsets for
setting->index.  I have reviewed this code and I think that the
"if (block->instance_count <= instance)" check in __query_block() will
prevent this from resulting in an out of bounds access.  But it's
still worth fixing.

Fixes: 640a5fa50a ("platform/x86: think-lmi: Opcode support")
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Link: https://lore.kernel.org/r/20211217071209.GF26548@kili
Reviewed-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
2021-12-21 18:57:14 +01:00
..
chrome platform/chrome: cros_ec_proto: Use ec_command for check_features 2021-10-31 15:52:55 -07:00
goldfish
mellanox platform/mellanox: mlxbf-pmc: Fix an IS_ERR() vs NULL bug in mlxbf_pmc_map_counters 2021-12-21 18:52:26 +01:00
mips
olpc Platform: OLPC: Constify static struct regulator_ops 2021-02-08 16:59:21 +01:00
surface platform: surface: Propagate ACPI Dependency 2021-12-07 12:21:01 +01:00
x86 platform/x86: think-lmi: Prevent underflow in index_store() 2021-12-21 18:57:14 +01:00
Kconfig
Makefile