]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
Bluetooth: purge error queues in socket destructors
authorHeitor Alves de Siqueira <halves@igalia.com>
Wed, 11 Feb 2026 18:03:35 +0000 (15:03 -0300)
committerLuiz Augusto von Dentz <luiz.von.dentz@intel.com>
Mon, 23 Feb 2026 20:30:16 +0000 (15:30 -0500)
commit21e4271e65094172aadd5beb8caea95dd0fbf6d7
treeafb27f5571579e165f336cf6af6cadfd244c243b
parentc28d2bff70444a85b3b86aaf241ece9408c7858c
Bluetooth: purge error queues in socket destructors

When TX timestamping is enabled via SO_TIMESTAMPING, SKBs may be queued
into sk_error_queue and will stay there until consumed. If userspace never
gets to read the timestamps, or if the controller is removed unexpectedly,
these SKBs will leak.

Fix by adding skb_queue_purge() calls for sk_error_queue in affected
bluetooth destructors. RFCOMM does not currently use sk_error_queue.

Fixes: 134f4b39df7b ("Bluetooth: add support for skb TX SND/COMPLETION timestamping")
Reported-by: syzbot+7ff4013eabad1407b70a@syzkaller.appspotmail.com
Closes: https://syzbot.org/bug?extid=7ff4013eabad1407b70a
Cc: stable@vger.kernel.org
Signed-off-by: Heitor Alves de Siqueira <halves@igalia.com>
Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
net/bluetooth/hci_sock.c
net/bluetooth/iso.c
net/bluetooth/l2cap_sock.c
net/bluetooth/sco.c