]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
Bluetooth: btusb: use skb_pull to avoid unsafe access in QCA dump handling
authorEn-Wei Wu <en-wei.wu@canonical.com>
Thu, 8 May 2025 14:15:20 +0000 (22:15 +0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 29 May 2025 09:13:57 +0000 (11:13 +0200)
commita95c5982814cd1bef73fa9c23dc1bf45a098713d
tree12a705c29f209c38a58df13000a42f8e6208e074
parent9c2afd452041fe4c21d7b6a59b1f4f0bc030f54c
Bluetooth: btusb: use skb_pull to avoid unsafe access in QCA dump handling

[ Upstream commit 4bcb0c7dc25446b99fc7a8fa2a143d69f3314162 ]

Use skb_pull() and skb_pull_data() to safely parse QCA dump packets.

This avoids direct pointer math on skb->data, which could lead to
invalid access if the packet is shorter than expected.

Fixes: 20981ce2d5a5 ("Bluetooth: btusb: Add WCN6855 devcoredump support")
Signed-off-by: En-Wei Wu <en-wei.wu@canonical.com>
Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/bluetooth/btusb.c