]> git.proxmox.com Git - mirror_ubuntu-disco-kernel.git/commit
nfc: Ensure presence of required attributes in the deactivate_target handler
authorYoung Xiao <92siuyang@gmail.com>
Wed, 10 Jul 2019 06:12:25 +0000 (06:12 +0000)
committerStefan Bader <stefan.bader@canonical.com>
Tue, 30 Jul 2019 10:58:17 +0000 (12:58 +0200)
commitf8ebbdc9bdc8b417405697c30bf789a23a657e2a
tree9f8de1d763044890bd49cdf396acf94bc6d99ff7
parentb6077475c35f309035e268447e43ee4e62bd94d7
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>
CVE-2019-12984

(cherry picked from commit 385097a3675749cbc9e97c085c0e5dfe4269ca51)
Signed-off-by: Tyler Hicks <tyhicks@canonical.com>
Acked-by: Connor Kuehl <connor.kuehl@canonical.com>
Acked-by: Kleber Souza <kleber.souza@canonical.com>
Signed-off-by: Khalid Elmously <khalid.elmously@canonical.com>
net/nfc/netlink.c