]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
nfc: Ensure presence of required attributes in the deactivate_target handler
authorYoung Xiao <92siuyang@gmail.com>
Fri, 14 Jun 2019 07:13:02 +0000 (15:13 +0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sat, 22 Jun 2019 06:15:14 +0000 (08:15 +0200)
commit4bb4ba362cc1ed3acb181a6d0b68c6de22be78e2
tree0e76554aed89ed82c362e963ca4ad8bfe1e43b16
parent7530c3f3d5b9035c445885f3f52b16533654e9dc
nfc: Ensure presence of required attributes in the deactivate_target handler

[ Upstream commit 385097a3675749cbc9e97c085c0e5dfe4269ca51 ]

Check that the NFC_ATTR_TARGET_INDEX attributes (in addition to
NFC_ATTR_DEVICE_INDEX) are provided by the netlink client prior to
accessing them. This prevents potential unhandled NULL pointer dereference
exceptions which can be triggered by malicious user-mode programs,
if they omit one or both of these attributes.

Signed-off-by: Young Xiao <92siuyang@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
net/nfc/netlink.c