projects
/
wrapfs-3.14.y.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
cc09a53
)
Bluetooth: Prevent out-of-bounds read in hci_inquiry_result_evt()
author
Peilin Ye
<yepeilin.cs@gmail.com>
Fri, 10 Jul 2020 21:39:18 +0000
(17:39 -0400)
committer
Greg Kroah-Hartman
<gregkh@linuxfoundation.org>
Tue, 11 Aug 2020 13:48:08 +0000
(15:48 +0200)
commit
75bbd2ea50ba1c5d9da878a17e92eac02fe0fd3a
upstream.
Check `num_rsp` before using it as for-loop counter.
Cc: stable@vger.kernel.org
Signed-off-by: Peilin Ye <yepeilin.cs@gmail.com>
Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
net/bluetooth/hci_event.c
patch
|
blob
|
history
diff --git
a/net/bluetooth/hci_event.c
b/net/bluetooth/hci_event.c
index 2331fe0de7ad6ec8d644a1d2b7cbe06ca972c2b2..6aed4283ab135737aa0b0399de50e0e7aa846bb8 100644
(file)
--- a/
net/bluetooth/hci_event.c
+++ b/
net/bluetooth/hci_event.c
@@
-2520,7
+2520,7
@@
static void hci_inquiry_result_evt(struct hci_dev *hdev, struct sk_buff *skb)
BT_DBG("%s num_rsp %d", hdev->name, num_rsp);
- if (!num_rsp)
+ if (!num_rsp
|| skb->len < num_rsp * sizeof(*info) + 1
)
return;
if (hci_dev_test_flag(hdev, HCI_PERIODIC_INQ))