public inbox for linux-bluetooth@vger.kernel.org
 help / color / mirror / Atom feed
From: Wentao Guan <guanwentao@uniontech.com>
To: stable@vger.kernel.org
Cc: linux-bluetooth@vger.kernel.org, guanwentao@uniontech.com,
	Jaganath Kanakkassery <jaganath.k.os@gmail.com>
Subject: [PATCH 4.19] Bluetooth: Fix incorrect pointer arithmatic in ext_adv_report_evt
Date: Fri,  5 Jul 2024 18:01:06 +0800	[thread overview]
Message-ID: <20240705100106.25403-1-guanwentao@uniontech.com> (raw)

From: Jaganath Kanakkassery <jaganath.k.os@gmail.com>

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.

Cc: stable@vger.kernel.org # 4.19-
Signed-off-by: Jaganath Kanakkassery <jaganath.kanakkassery@intel.com>
Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
Signed-off-by: Wentao Guan <guanwentao@uniontech.com>
---
 net/bluetooth/hci_event.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/net/bluetooth/hci_event.c b/net/bluetooth/hci_event.c
index 3e7badb3ac2d..4f972c9e9dbe 100644
--- a/net/bluetooth/hci_event.c
+++ b/net/bluetooth/hci_event.c
@@ -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);
-- 
2.20.1


             reply	other threads:[~2024-07-05 10:01 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-07-05 10:01 Wentao Guan [this message]
2024-07-05 10:15 ` [4.19] Bluetooth: Fix incorrect pointer arithmatic in ext_adv_report_evt bluez.test.bot
2024-07-08 12:38 ` [PATCH 4.19] " Greg KH

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20240705100106.25403-1-guanwentao@uniontech.com \
    --to=guanwentao@uniontech.com \
    --cc=jaganath.k.os@gmail.com \
    --cc=linux-bluetooth@vger.kernel.org \
    --cc=stable@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox