projects
/
platform
/
kernel
/
linux-starfive.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
db3f1f9
)
Bluetooth: msft: fix null pointer deref on msft_monitor_device_evt
author
Soenke Huster
<soenke.huster@eknoes.de>
Sun, 23 Jan 2022 05:57:09 +0000
(06:57 +0100)
committer
Marcel Holtmann
<marcel@holtmann.org>
Sun, 23 Jan 2022 14:30:18 +0000
(15:30 +0100)
msft_find_handle_data returns NULL if it can't find the handle.
Therefore, handle_data must be checked, otherwise a null pointer
is dereferenced.
Signed-off-by: Soenke Huster <soenke.huster@eknoes.de>
Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
net/bluetooth/msft.c
patch
|
blob
|
history
diff --git
a/net/bluetooth/msft.c
b/net/bluetooth/msft.c
index
4845408
..
9a3d77d
100644
(file)
--- a/
net/bluetooth/msft.c
+++ b/
net/bluetooth/msft.c
@@
-704,6
+704,8
@@
static void msft_monitor_device_evt(struct hci_dev *hdev, struct sk_buff *skb)
ev->monitor_state, &ev->bdaddr);
handle_data = msft_find_handle_data(hdev, ev->monitor_handle, false);
+ if (!handle_data)
+ return;
switch (ev->addr_type) {
case ADDR_LE_DEV_PUBLIC: