]> git.baikalelectronics.ru Git - kernel.git/commit
Bluetooth: Fix skb allocation in mgmt_remote_name() & mgmt_device_connected()
authorRadoslaw Biernacki <rad@semihalf.com>
Tue, 1 Feb 2022 20:10:32 +0000 (20:10 +0000)
committerMarcel Holtmann <marcel@holtmann.org>
Fri, 4 Mar 2022 15:10:49 +0000 (16:10 +0100)
commit7eb0beed1162b592811c1e925f21b3550f37d616
treec0a044ebf28c3a2ad141c6db786f75a77e4c8ad1
parenta5be35305c47be65453e9225f515f6ec5d0472ec
Bluetooth: Fix skb allocation in mgmt_remote_name() & mgmt_device_connected()

This patch fixes skb allocation, as lack of space for ev might push skb
tail beyond its end.
Also introduce eir_precalc_len() that can be used instead of magic
numbers for similar eir operations on skb.

Fixes: fa7768d6c9994 ("Bluetooth: mgmt: Make use of mgmt_send_event_skb in MGMT_EV_DEVICE_FOUND")
Fixes: aee7658b1aedc ("Bluetooth: mgmt: Make use of mgmt_send_event_skb in MGMT_EV_DEVICE_CONNECTED")
Signed-off-by: Angela Czubak <acz@semihalf.com>
Signed-off-by: Marek Maslanka <mm@semihalf.com>
Signed-off-by: Radoslaw Biernacki <rad@semihalf.com>
Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
net/bluetooth/eir.h
net/bluetooth/mgmt.c