diff options
author | Dan Williams <dan.j.williams@intel.com> | 2020-11-23 17:43:53 -0800 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2020-12-30 11:54:05 +0100 |
commit | 36fdd770c037e8292e4184eb2a36054c16d08739 (patch) | |
tree | 0ac6c02bac357b91c2cd1c9b27b096dce2fe672a /drivers/pci/pci-acpi.c | |
parent | 3e437f7e7a7672b15d5959212ac256cc411b93a6 (diff) | |
download | kernel_replicant_linux-36fdd770c037e8292e4184eb2a36054c16d08739.tar.gz kernel_replicant_linux-36fdd770c037e8292e4184eb2a36054c16d08739.tar.bz2 kernel_replicant_linux-36fdd770c037e8292e4184eb2a36054c16d08739.zip |
ACPI: NFIT: Fix input validation of bus-family
commit 9a7e3d7f056831a6193d6d737fb7a26dfdceb04b upstream.
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: 6450ddbd5d8e ("ACPI: NFIT: Define runtime firmware activation commands")
Cc: <stable@vger.kernel.org>
Signed-off-by: Dan Williams <dan.j.williams@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/pci/pci-acpi.c')
0 files changed, 0 insertions, 0 deletions