android_kernel_motorola_sm6375/net
Repository files (latest commit first)
Filename Latest commit message Latest commit date
Ying Hsu 98fb98fd37 Bluetooth: Avoid potential use-after-free in hci_error_reset
[ Upstream commit 2449007d3f73b2842c9734f45f0aadb522daf592 ]

While handling the HCI_EV_HARDWARE_ERROR event, if the underlying
BT controller is not responding, the GPIO reset mechanism would
free the hci_dev and lead to a use-after-free in hci_error_reset.

Here's the call trace observed on a ChromeOS device with Intel AX201:
   queue_work_on+0x3e/0x6c
   __hci_cmd_sync_sk+0x2ee/0x4c0 [bluetooth <HASH:3b4a6>]
   ? init_wait_entry+0x31/0x31
   __hci_cmd_sync+0x16/0x20 [bluetooth <HASH:3b4a 6>]
   hci_error_reset+0x4f/0xa4 [bluetooth <HASH:3b4a 6>]
   process_one_work+0x1d8/0x33f
   worker_thread+0x21b/0x373
   kthread+0x13a/0x152
   ? pr_cont_work+0x54/0x54
   ? kthread_blkcg+0x31/0x31
    ret_from_fork+0x1f/0x30

This patch holds the reference count on the hci_dev while processing
a HCI_EV_HARDWARE_ERROR event to avoid potential crash.

Fixes: c7741d16a5 ("Bluetooth: Perform a power cycle when receiving hardware error event")
Signed-off-by: Ying Hsu <yinghsu@chromium.org>
Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2024-03-06 14:36:09 +00:00
..
6lowpan
9p net: 9p: avoid freeing uninit memory in p9pdu_vreadf 2024-01-08 11:29:47 +01:00
802
8021q vlan: skip nested type that is not IFLA_VLAN_QOS_MAPPING 2024-02-23 08:24:50 +01:00
appletalk appletalk: Fix Use-After-Free in atalk_ioctl 2023-12-20 15:41:18 +01:00
atm atm: Fix Use-After-Free in do_vcc_ioctl 2023-12-20 15:41:15 +01:00
ax25
batman-adv
bluetooth Bluetooth: Avoid potential use-after-free in hci_error_reset 2024-03-06 14:36:09 +00:00
bpf
bpfilter
bridge net: bridge: clear bridge's private skb space on xmit 2024-03-01 13:13:35 +01:00
caif
can can: j1939: Fix UAF in j1939_sk_match_filter during setsockopt(SO_J1939_FILTER) 2024-02-23 08:25:13 +01:00
ceph libceph: use kernel_connect() 2023-10-25 11:53:19 +02:00
core net: prevent mss overflow in skb_segment() 2024-02-23 08:25:14 +01:00
dcb
dccp dccp/tcp: Call security_inet_conn_request() after setting IPv6 addresses. 2023-11-20 10:30:15 +01:00
decnet
dns_resolver
dsa
ethernet
hsr
ieee802154
ife net: sched: ife: fix potential use-after-free 2024-01-08 11:29:44 +01:00
ipv4 net: ip_tunnel: prevent perpetual headroom growth 2024-03-06 14:36:08 +00:00
ipv6 ipv6: fix potential "struct net" leak in inet6_rtm_getaddr() 2024-03-06 14:36:08 +00:00
iucv net/af_iucv: clean up a try_then_request_module() 2024-02-23 08:25:07 +01:00
kcm kcm: Fix error handling for SOCK_DGRAM in kcm_sendmsg(). 2023-09-23 11:00:02 +02:00
key
l2tp l2tp: pass correct message length to ip6_append_data 2024-03-01 13:13:36 +01:00
l3mdev
lapb
llc llc: call sock_orphan() at release time 2024-02-23 08:25:04 +01:00
mac80211 wifi: mac80211: fix race condition on enabling fast-xmit 2024-03-01 13:13:33 +01:00
mac802154
mpls
ncsi net/ncsi: Fix netlink major/minor version numbers 2024-01-25 14:34:25 -08:00
netfilter netfilter: nf_tables: set dormant flag on hook register failure 2024-03-01 13:13:37 +01:00
netlabel calipso: fix memory leak in netlbl_calipso_add_pass() 2024-01-25 14:34:23 -08:00
netlink netlink: Fix kernel-infoleak-after-free in __skb_datagram_iter 2024-03-06 14:36:08 +00:00
netrom netrom: Deny concurrent connect(). 2023-09-23 10:59:43 +02:00
nfc nfc: nci: free rx_data_reassembly skb on NCI device cleanup 2024-02-23 08:25:11 +01:00
nsh
openvswitch
packet packet: move from strlcpy with unused retval to strscpy 2024-03-01 13:13:37 +01:00
phonet
psample psample: Require 'CAP_NET_ADMIN' when joining "packets" group 2023-12-13 18:18:17 +01:00
qrtr
rds net/rds: Fix UBSAN: array-index-out-of-bounds in rds_cmsg_recv 2024-02-23 08:24:50 +01:00
rfkill net: rfkill: gpio: set GPIO direction 2024-01-08 11:29:47 +01:00
rose net/rose: fix races in rose_kill_by_device() 2024-01-08 11:29:44 +01:00
rxrpc rxrpc: Fix response to PING RESPONSE ACKs to a dead call 2024-02-23 08:25:07 +01:00
sched net/sched: Retire dsmark qdisc 2024-03-01 13:13:32 +01:00
sctp sctp: update hb timer immediately after users change hb_interval 2023-10-10 21:46:45 +02:00
smc net/smc: fix illegal rmb_desc access in SMC-D connection dump 2024-02-23 08:24:50 +01:00
strparser
sunrpc SUNRPC: Fix a suspicious RCU usage warning 2024-02-23 08:24:56 +01:00
switchdev
tipc tipc: Check the bearer type before calling tipc_udp_nl_bearer_add() 2024-02-23 08:25:07 +01:00
tls tls: stop recv() if initial process_rx_list gave us non-DATA 2024-03-01 13:13:37 +01:00
unix af_unix: fix lockdep positive in sk_diag_dump_icons() 2024-02-23 08:25:05 +01:00
vmw_vsock virtio/vsock: fix logic which reduces credit update messages 2024-01-25 14:34:25 -08:00
wimax
wireless wifi: cfg80211: fix missing interfaces when dumping 2024-03-01 13:13:33 +01:00
x25
xdp
xfrm xfrm: interface: use DEV_STATS_INC() 2023-10-25 11:53:21 +02:00
compat.c
Kconfig
Makefile
socket.c net: Save and restore msg_namelen in sock_sendmsg 2024-01-15 18:25:26 +01:00
sysctl_net.c