Bluetooth: refactor malicious adv data check
authorBrian Gix <brian.gix@intel.com>
Wed, 24 Nov 2021 20:16:28 +0000 (12:16 -0800)
committerMarcel Holtmann <marcel@holtmann.org>
Wed, 24 Nov 2021 16:29:12 +0000 (17:29 +0100)
commit899663be5e75dc0174dc8bda0b5e6826edf0b29a
tree36438f3acd4d31a48494192a2ed28849cdbbf131
parent21a241b3bc153b346987a28cc132674646589e02
Bluetooth: refactor malicious adv data check

Check for out-of-bound read was being performed at the end of while
num_reports loop, and would fill journal with false positives. Added
check to beginning of loop processing so that it doesn't get checked
after ptr has been advanced.

Signed-off-by: Brian Gix <brian.gix@intel.com>
Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
net/bluetooth/hci_event.c