android_kernel_motorola_sm6375/net
Repository files (latest commit first)
Filename Latest commit message Latest commit date
Luiz Augusto von Dentz fffb2b5bad BACKPORT: Bluetooth: L2CAP: Fix use-after-free caused by l2cap_chan_put
commit d0be8347c623e0ac4202a1d4e0373882821f56b0 upstream.

This fixes the following trace which is caused by hci_rx_work starting up
*after* the final channel reference has been put() during sock_close() but
*before* the references to the channel have been destroyed, so instead
the code now rely on kref_get_unless_zero/l2cap_chan_hold_unless_zero to
prevent referencing a channel that is about to be destroyed.

  refcount_t: increment on 0; use-after-free.
  BUG: KASAN: use-after-free in refcount_dec_and_test+0x20/0xd0
  Read of size 4 at addr ffffffc114f5bf18 by task kworker/u17:14/705

  CPU: 4 PID: 705 Comm: kworker/u17:14 Tainted: G S      W
  4.14.234-00003-g1fb6d0bd49a4-dirty #28
  Hardware name: Qualcomm Technologies, Inc. SM8150 V2 PM8150
  Google Inc. MSM sm8150 Flame DVT (DT)
  Workqueue: hci0 hci_rx_work
  Call trace:
   dump_backtrace+0x0/0x378
   show_stack+0x20/0x2c
   dump_stack+0x124/0x148
   print_address_description+0x80/0x2e8
   __kasan_report+0x168/0x188
   kasan_report+0x10/0x18
   __asan_load4+0x84/0x8c
   refcount_dec_and_test+0x20/0xd0
   l2cap_chan_put+0x48/0x12c
   l2cap_recv_frame+0x4770/0x6550
   l2cap_recv_acldata+0x44c/0x7a4
   hci_acldata_packet+0x100/0x188
   hci_rx_work+0x178/0x23c
   process_one_work+0x35c/0x95c
   worker_thread+0x4cc/0x960
   kthread+0x1a8/0x1c4
   ret_from_fork+0x10/0x18

Bug: 165329981
Cc: stable@kernel.org
Reported-by: Lee Jones <lee.jones@linaro.org>
Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
Tested-by: Lee Jones <lee.jones@linaro.org>
Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Lee Jones <joneslee@google.com>
Change-Id: I6efae55d8014740aebc8c3534846c2d249068b29
2022-08-03 13:09:03 +01:00
..
6lowpan
9p xen/9p: use alloc/free_pages_exact() 2022-03-11 11:22:39 +01:00
802
8021q net: vlan: fix underflow for the real_dev refcnt 2021-12-01 09:23:34 +01:00
appletalk
atm
ax25 ax25: Fix UAF bugs in ax25 timers 2022-04-20 09:19:40 +02:00
batman-adv batman-adv: Don't skb_split skbuffs with frag_list 2022-05-18 09:47:24 +02:00
bluetooth BACKPORT: Bluetooth: L2CAP: Fix use-after-free caused by l2cap_chan_put 2022-08-03 13:09:03 +01:00
bpf
bpfilter
bridge net: bridge: Clear offload_fwd_mark when passing frame up bridge interface. 2022-05-25 09:14:36 +02:00
caif
can This is the 5.4.164 stable release 2021-12-08 09:19:28 +01:00
ceph
core Merge tag 'android11-5.4.197_r00' into 'android11-5.4' 2022-07-27 11:19:48 +02:00
dcb net: dcb: disable softirqs in dcbnl_flush_dev() 2022-03-08 19:07:51 +01:00
dccp tcp: fix race condition when creating child sockets from syncookies 2022-04-27 13:50:45 +02:00
decnet
dns_resolver
dsa net: dsa: Add missing of_node_put() in dsa_port_parse_of 2022-03-23 09:12:07 +01:00
ethernet
hsr
ieee802154 net: ieee802154: Return meaningful error codes from the netlink helpers 2022-02-08 18:24:31 +01:00
ife
ipv4 This is the 5.4.197 stable release 2022-06-06 11:06:30 +02:00
ipv6 This is the 5.4.197 stable release 2022-06-06 11:06:30 +02:00
iucv
kcm
key UPSTREAM: Revert "net: af_key: add check for pfkey_broadcast in function pfkey_process" 2022-07-27 16:39:58 +02:00
l2tp
l3mdev l3mdev: l3mdev_master_upper_ifindex_by_index_rcu should be using netdev_master_upper_dev_get_rcu 2022-04-27 13:50:47 +02:00
lapb
llc llc: only change llc->dev when bind() succeeds 2022-03-28 08:46:48 +02:00
mac80211 This is the 5.4.196 stable release 2022-05-25 10:40:14 +02:00
mac802154
mpls net: mpls: Fix notifications when deleting a device 2021-12-08 09:01:12 +01:00
ncsi net/ncsi: check for error return from call to nla_put_u32 2022-01-05 12:37:45 +01:00
netfilter This is the 5.4.192 stable release 2022-05-09 09:42:49 +02:00
netlabel netlabel: fix out-of-bounds memory accesses 2022-04-15 14:18:35 +02:00
netlink netlink: do not reset transport header in netlink_recvmsg() 2022-05-18 09:47:25 +02:00
netrom
nfc NFC: nci: fix sleep in atomic context bugs caused by nci_skb_alloc 2022-05-25 09:14:36 +02:00
nsh
openvswitch openvswitch: fix OOB access in reserve_sfa_size() 2022-04-27 13:50:49 +02:00
packet BACKPORT: net/packet: fix slab-out-of-bounds access in packet_recvmsg() 2022-04-28 12:16:30 +00:00
phonet phonet: refcount leak in pep_sock_accep 2022-01-11 15:23:33 +01:00
psample
qrtr
rds rds: memory leak in __rds_conn_create() 2021-12-22 09:29:37 +01:00
rfkill
rose
rxrpc rxrpc: Restore removed timer deletion 2022-04-27 13:50:46 +02:00
sched This is the 5.4.196 stable release 2022-05-25 10:40:14 +02:00
sctp This is the 5.4.192 stable release 2022-05-09 09:42:49 +02:00
smc net/smc: non blocking recvmsg() return -EAGAIN when no data and signal_pending 2022-05-18 09:47:25 +02:00
strparser bpf: sockmap, strparser, and tls are reusing qdisc_skb_cb and colliding 2021-11-17 09:48:48 +01:00
sunrpc SUNRPC: Ensure we flush any closed sockets before xs_xprt_free() 2022-05-25 09:14:34 +02:00
switchdev
tipc tipc: fix the timer expires after interval 100ms 2022-04-15 14:18:17 +02:00
tls tls: Skip tls_append_frag on zero copy size 2022-05-09 09:03:26 +02:00
unix af_unix: annote lockless accesses to unix_tot_inflight & gc_in_progress 2022-01-27 09:19:53 +01:00
vmw_vsock This is the 5.4.181 stable release 2022-02-23 12:17:54 +01:00
wimax
wireless This is the 5.4.197 stable release 2022-06-06 11:06:30 +02:00
x25 net/x25: Fix null-ptr-deref caused by x25_disconnect 2022-04-15 14:18:21 +02:00
xdp Revert "xsk: Do not sleep in poll() when need_wakeup set" 2021-12-22 09:29:40 +01:00
xfrm This is the 5.4.189 stable release 2022-04-19 16:29:31 +02:00
compat.c
Kconfig
Makefile
OWNERS
socket.c
sysctl_net.c