android_kernel_motorola_sm6375/net/bluetooth
Repository files (latest commit first)
Filename Latest commit message Latest commit date
Ruihan Li 48cdcb40d5 bluetooth: Perform careful capability checks in hci_sock_ioctl()
commit 25c150ac103a4ebeed0319994c742a90634ddf18 upstream.

Previously, capability was checked using capable(), which verified that the
caller of the ioctl system call had the required capability. In addition,
the result of the check would be stored in the HCI_SOCK_TRUSTED flag,
making it persistent for the socket.

However, malicious programs can abuse this approach by deliberately sharing
an HCI socket with a privileged task. The HCI socket will be marked as
trusted when the privileged task occasionally makes an ioctl call.

This problem can be solved by using sk_capable() to check capability, which
ensures that not only the current task but also the socket opener has the
specified capability, thus reducing the risk of privilege escalation
through the previously identified vulnerability.

Cc: stable@vger.kernel.org
Fixes: f81f5b2db8 ("Bluetooth: Send control open and close messages for HCI raw sockets")
Signed-off-by: Ruihan Li <lrh2000@pku.edu.cn>
Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2023-05-17 11:35:31 +02:00
..
bnep
cmtp Bluetooth: cmtp: fix possible panic when cmtp_init_sockets() fails 2022-01-27 09:19:29 +01:00
hidp Bluetooth: Fix race condition in hidp_session_thread 2023-04-20 12:07:35 +02:00
rfcomm Bluetooth: RFCOMM: don't call kfree_skb() under spin_lock_irqsave() 2023-01-18 11:41:16 +01:00
6lowpan.c Bluetooth: 6LoWPAN: add missing hci_dev_put() in get_l2cap_conn() 2022-12-14 11:30:45 +01:00
a2mp.c
a2mp.h
af_bluetooth.c Bluetooth: Fix not cleanup led when bt_init fails 2022-12-14 11:30:45 +01:00
amp.c
amp.h
ecdh_helper.c
ecdh_helper.h
hci_conn.c
hci_core.c Bluetooth: hci_sync: cancel cmd_timer if hci_open failed 2023-02-06 07:52:43 +01:00
hci_debugfs.c
hci_debugfs.h
hci_event.c Bluetooth: fix null ptr deref on hci_sync_conn_complete_evt 2023-02-06 07:52:51 +01:00
hci_request.c
hci_request.h
hci_sock.c bluetooth: Perform careful capability checks in hci_sock_ioctl() 2023-05-17 11:35:31 +02:00
hci_sysfs.c Bluetooth: hci_sysfs: Fix attempting to call device_add multiple times 2022-10-26 13:22:49 +02:00
Kconfig
l2cap_core.c Bluetooth: L2CAP: Fix use-after-free in l2cap_disconnect_{req,rsp} 2023-04-20 12:07:35 +02:00
l2cap_sock.c Bluetooth: L2CAP: Fix potential user-after-free 2023-03-11 16:43:41 +01:00
leds.c
leds.h
lib.c
Makefile
mgmt.c
mgmt_util.c
mgmt_util.h
sco.c Bluetooth: SCO: Fix sco_send_frame returning skb->len 2022-07-29 17:14:19 +02:00
selftest.c
selftest.h
smp.c
smp.h