Bluetooth: hci_event: Fix not checking if HCI_OP_INQUIRY has been sent
authorLuiz Augusto von Dentz <luiz.von.dentz@intel.com>
Mon, 20 Nov 2023 15:04:39 +0000 (10:04 -0500)
committerLuiz Augusto von Dentz <luiz.von.dentz@intel.com>
Fri, 15 Dec 2023 16:50:34 +0000 (11:50 -0500)
commit99e67d46e5ff3c7c901af6009edec72d3d363be8
tree39e38a4c907fd1e838db0d7f1c21dad965b60e5f
parent769bf60e17ee1a56a81e7c031192c3928312c52e
Bluetooth: hci_event: Fix not checking if HCI_OP_INQUIRY has been sent

Before setting HCI_INQUIRY bit check if HCI_OP_INQUIRY was really sent
otherwise the controller maybe be generating invalid events or, more
likely, it is a result of fuzzing tools attempting to test the right
behavior of the stack when unexpected events are generated.

Cc: stable@vger.kernel.org
Link: https://bugzilla.kernel.org/show_bug.cgi?id=218151
Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
net/bluetooth/hci_event.c