Skip to contentSkip to conversation

Bluetooth: Fix incorrect pointer arithmatic in ext_adv_report_evt

PATCH In review Wentao Guan 3 participants 3 messages Jul 5, 2024 – Jul 8, 2024

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 Bluetooth: Fix incorrect pointer arithmatic in ext_adv_report_evt

From: Jaganath Kanakkassery <[email protected]>

Please apply the upstream commit:
commit cd9151b618da ("Bluetooth: Fix incorrect pointer arithmatic in ext_adv_report_evt")

Solved kernel BT Err "Bluetooth: Unknown advertising packet type: 0x100"

-------------------------------------------------------------------------

In ext_adv_report_event rssi comes before data (not after data as in legacy adv_report_evt) so "+ 1" is not required in the ptr arithmatic to point to next report.

---
 net/bluetooth/hci_event.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
net/bluetooth/hci_event.c +1 -1
index 3e7badb3ac2d..4f972c9e9dbe 100644
@@ -5402,7 +5402,7 @@ static void hci_le_ext_adv_report_evt(struct hci_dev *hdev, struct sk_buff *skb)
 					   ev->data, ev->length);
 		}
 
-		ptr += sizeof(*ev) + ev->length + 1;
+		ptr += sizeof(*ev) + ev->length;
 	}
 
 	hci_dev_unlock(hdev);
Signature · 1 line
2.20.1
#1 lore raw

RE: [4.19] Bluetooth: Fix incorrect pointer arithmatic in ext_adv_report_evt

This is an automated email and please do not reply to this email.

Dear Submitter,

Thank you for submitting the patches to the linux bluetooth mailing list.
While preparing the CI tests, the patches you submitted couldn't be applied to the current HEAD of the repository.

----- Output -----

error: patch failed: net/bluetooth/hci_event.c:5402
error: net/bluetooth/hci_event.c: patch does not apply
hint: Use 'git am --show-current-patch' to see the failed patch

Please resolve the issue and submit the patches again.

---
Regards,
Linux Bluetooth

maintainer
#2 lore raw
In reply to Wentao Guan
Quoted 6 lines · Wentao Guan

From: Jaganath Kanakkassery <[email protected]>

Please apply the upstream commit:
commit cd9151b618da ("Bluetooth: Fix incorrect pointer arithmatic in ext_adv_report_evt")

Solved kernel BT Err "Bluetooth: Unknown advertising packet type: 0x100"

Now queued up, thanks!

greg k-h