kernel_samsung_a53x/include/net/bluetooth
Luiz Augusto von Dentz ed3ce62784 Bluetooth: SCO: Fix not validating setsockopt user input
[ Upstream commit 51eda36d33e43201e7a4fd35232e069b2c850b01 ]

syzbot reported sco_sock_setsockopt() is copying data without
checking user input length.

BUG: KASAN: slab-out-of-bounds in copy_from_sockptr_offset
include/linux/sockptr.h:49 [inline]
BUG: KASAN: slab-out-of-bounds in copy_from_sockptr
include/linux/sockptr.h:55 [inline]
BUG: KASAN: slab-out-of-bounds in sco_sock_setsockopt+0xc0b/0xf90
net/bluetooth/sco.c:893
Read of size 4 at addr ffff88805f7b15a3 by task syz-executor.5/12578

Fixes: ad10b1a48754 ("Bluetooth: Add Bluetooth socket voice option")
Fixes: b96e9c671b05 ("Bluetooth: Add BT_DEFER_SETUP option to sco socket")
Fixes: 00398e1d5183 ("Bluetooth: Add support for BT_PKT_STATUS CMSG data for SCO connections")
Fixes: f6873401a608 ("Bluetooth: Allow setting of codec for HFP offload use case")
Reported-by: syzbot <syzkaller@googlegroups.com>
Signed-off-by: Eric Dumazet <edumazet@google.com>
Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2024-11-19 11:32:19 +01:00
..
bluetooth.h Bluetooth: SCO: Fix not validating setsockopt user input 2024-11-19 11:32:19 +01:00
hci.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
hci_core.h Bluetooth: Fix bogus check for re-auth no supported with non-ssp 2024-11-18 12:12:38 +01:00
hci_mon.h Bluetooth: hci_sock: Correctly bounds check and pad HCI_MON_NEW_INDEX name 2024-11-08 11:26:20 +01:00
hci_sock.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
l2cap.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
mgmt.h Bluetooth: use inclusive language in SMP 2024-11-18 12:12:01 +01:00
rfcomm.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
sco.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00