]> git.baikalelectronics.ru Git - kernel.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)
committerDavid S. Miller <davem@davemloft.net>
Fri, 14 Jun 2019 15:48:08 +0000 (08:48 -0700)
commitfb3623109eb781cdcf43ed36b48efcb60090e172
tree415306dcaa37476b85400ab59c1413c818450238
parent2d1eecf5a13f5b8b5f270f392652b6176b733ada
nfc: Ensure presence of required attributes in the deactivate_target handler

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>
net/nfc/netlink.c