android_kernel_oneplus_msm8998/net/nfc
Andrey Konovalov 2e48675890 NFC: fix attrs checks in netlink interface
commit 18917d51472fe3b126a3a8f756c6b18085eb8130 upstream.

nfc_genl_deactivate_target() relies on the NFC_ATTR_TARGET_INDEX
attribute being present, but doesn't check whether it is actually
provided by the user. Same goes for nfc_genl_fw_download() and
NFC_ATTR_FIRMWARE_NAME.

This patch adds appropriate checks.

Found with syzkaller.

Signed-off-by: Andrey Konovalov <andreyknvl@google.com>
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-10-07 21:01:07 +02:00
..
hci NFC: Fix possible memory corruption when handling SHDLC I-Frame commands 2018-09-29 03:08:51 -07:00
nci nfc: fix potential illegal memory access 2019-08-04 09:34:54 +02:00
af_nfc.c net: Pass kern from net_proto_family.create to sk_alloc 2015-05-11 10:50:17 -04:00
core.c NFC: fix device-allocation error return 2017-11-30 08:37:23 +00:00
digital.h
digital_core.c NFC: netlink: Add mode parameter to deactivate_target functions 2015-10-27 03:55:12 +01:00
digital_dep.c
digital_technology.c
Kconfig
llcp.h net: Pass kern from net_proto_family.create to sk_alloc 2015-05-11 10:50:17 -04:00
llcp_commands.c net: nfc: Fix NULL dereference on nfc_llcp_build_tlv fails 2019-03-23 08:44:22 +01:00
llcp_core.c net: nfc: Fix NULL dereference on nfc_llcp_build_tlv fails 2019-03-23 08:44:22 +01:00
llcp_sock.c nfc: fix memory leak in llcp_sock_bind() 2019-10-07 21:01:05 +02:00
Makefile
netlink.c NFC: fix attrs checks in netlink interface 2019-10-07 21:01:07 +02:00
nfc.h NFC: netlink: Add mode parameter to deactivate_target functions 2015-10-27 03:55:12 +01:00
rawsock.c NFC: netlink: Add mode parameter to deactivate_target functions 2015-10-27 03:55:12 +01:00