]> git.proxmox.com Git - mirror_ubuntu-zesty-kernel.git/commit
nfc: Ensure presence of required attributes in the activate_target handler
authorMateusz Jurczyk <mjurczyk@google.com>
Wed, 24 May 2017 10:42:26 +0000 (12:42 +0200)
committerKleber Sacilotto de Souza <kleber.souza@canonical.com>
Fri, 11 Aug 2017 10:37:27 +0000 (12:37 +0200)
commite47c270e6fff55dafa05793b98ede70f0b1d934c
treeb07a0344b2f7c1f2ecadd61bc4691f4babae746d
parentf5984be5909dd5a3075f0db2f21212a4421efc3c
nfc: Ensure presence of required attributes in the activate_target handler

BugLink: http://bugs.launchpad.net/bugs/1707233
commit a0323b979f81ad2deb2c8836eab506534891876a upstream.

Check that the NFC_ATTR_TARGET_INDEX and NFC_ATTR_PROTOCOLS 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: Mateusz Jurczyk <mjurczyk@google.com>
Acked-by: Kees Cook <keescook@chromium.org>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Stefan Bader <stefan.bader@canonical.com>
Signed-off-by: Thadeu Lima de Souza Cascardo <cascardo@canonical.com>
net/nfc/netlink.c