diff options
| author | Jeremy Cline <jcline@redhat.com> | 2019-02-06 12:54:16 -0500 |
|---|---|---|
| committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2019-03-27 14:14:42 +0900 |
| commit | f67202f78fe3e96f409a9322e235d0863e589e21 (patch) | |
| tree | 90ab69c4e8bbc252d78978b8d09086137236f21f /drivers/gpu | |
| parent | 4b39051363a0a374afd073e2fcaaa8602b1befa2 (diff) | |
Bluetooth: hci_ldisc: Initialize hci_dev before open()
commit 32a7b4cbe93b0a0ef7e63d31ca69ce54736c4412 upstream.
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>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/gpu')
0 files changed, 0 insertions, 0 deletions
