summaryrefslogtreecommitdiff
path: root/net/ax25/ax25_uid.c
diff options
context:
space:
mode:
authorJeremy Cline <jcline@redhat.com>2019-02-06 20:54:16 +0300
committerMarcel Holtmann <marcel@holtmann.org>2019-02-18 15:54:53 +0300
commit32a7b4cbe93b0a0ef7e63d31ca69ce54736c4412 (patch)
tree7d576c23965430a2d3b65ff5ec107e867f7e1e07 /net/ax25/ax25_uid.c
parent035a960e7a279a59d74585105dcd263559d74f24 (diff)
downloadlinux-32a7b4cbe93b0a0ef7e63d31ca69ce54736c4412.tar.xz
Bluetooth: hci_ldisc: Initialize hci_dev before open()
The hci_dev struct hdev is referenced in work queues and timers started by open() in some protocols. This creates a race between the initialization function and the work or timer which can result hdev being dereferenced while it is still null. The syzbot report contains a reliable reproducer which causes a null pointer dereference of hdev in hci_uart_write_work() by making the memory allocation for hdev fail. To fix this, ensure hdev is valid from before calling a protocol's open() until after calling a protocol's close(). Reported-by: syzbot+257790c15bcdef6fe00c@syzkaller.appspotmail.com Signed-off-by: Jeremy Cline <jcline@redhat.com> Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
Diffstat (limited to 'net/ax25/ax25_uid.c')
0 files changed, 0 insertions, 0 deletions