linux-sg2042/drivers/acpi/nfit
Dan Williams 9a7e3d7f05 ACPI: NFIT: Fix input validation of bus-family
Dan reports that smatch thinks userspace can craft an out-of-bound bus
family number. However, nd_cmd_clear_to_send() blocks all non-zero
values of bus-family since only the kernel can initiate these commands.
However, in the speculation path, family is a user controlled array
index value so mask it for speculation safety. Also, since the
nd_cmd_clear_to_send() safety is non-obvious and possibly may change in
the future include input validation as if userspace could get past the
nd_cmd_clear_to_send() gatekeeper.

Link: http://lore.kernel.org/r/20201111113000.GA1237157@mwanda
Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
Fixes: 6450ddbd5d ("ACPI: NFIT: Define runtime firmware activation commands")
Cc: <stable@vger.kernel.org>
Signed-off-by: Dan Williams <dan.j.williams@intel.com>
2020-11-23 17:43:53 -08:00
..
Kconfig acpi/nfit: Add support for Intel DSM 1.8 commands 2018-12-04 10:31:11 -08:00
Makefile treewide: Add SPDX license identifier - Makefile/Kconfig 2019-05-21 10:50:46 +02:00
core.c ACPI: NFIT: Fix input validation of bus-family 2020-11-23 17:43:53 -08:00
intel.c ACPI: NFIT: Add runtime firmware activate support 2020-07-28 19:29:22 -06:00
intel.h ACPI: NFIT: Add runtime firmware activate support 2020-07-28 19:29:22 -06:00
mce.c x86/mce: Fix all mce notifiers to update the mce->kflags bitmask 2020-04-14 15:59:26 +02:00
nfit.h libnvdimm for 5.9 2020-08-11 10:59:19 -07:00