TencentOS-kernel/net
Gopal Tiwari 325f3e6549 Bluetooth: Fix null pointer dereference in amp_read_loc_assoc_final_data
[ Upstream commit e8bd76ede155fd54d8c41d045dda43cd3174d506 ]

kernel panic trace looks like:

 #5 [ffffb9e08698fc80] do_page_fault at ffffffffb666e0d7
 #6 [ffffb9e08698fcb0] page_fault at ffffffffb70010fe
    [exception RIP: amp_read_loc_assoc_final_data+63]
    RIP: ffffffffc06ab54f  RSP: ffffb9e08698fd68  RFLAGS: 00010246
    RAX: 0000000000000000  RBX: ffff8c8845a5a000  RCX: 0000000000000004
    RDX: 0000000000000000  RSI: ffff8c8b9153d000  RDI: ffff8c8845a5a000
    RBP: ffffb9e08698fe40   R8: 00000000000330e0   R9: ffffffffc0675c94
    R10: ffffb9e08698fe58  R11: 0000000000000001  R12: ffff8c8b9cbf6200
    R13: 0000000000000000  R14: 0000000000000000  R15: ffff8c8b2026da0b
    ORIG_RAX: ffffffffffffffff  CS: 0010  SS: 0018
 #7 [ffffb9e08698fda8] hci_event_packet at ffffffffc0676904 [bluetooth]
 #8 [ffffb9e08698fe50] hci_rx_work at ffffffffc06629ac [bluetooth]
 #9 [ffffb9e08698fe98] process_one_work at ffffffffb66f95e7

hcon->amp_mgr seems NULL triggered kernel panic in following line inside
function amp_read_loc_assoc_final_data

        set_bit(READ_LOC_AMP_ASSOC_FINAL, &mgr->state);

Fixed by checking NULL for mgr.

Signed-off-by: Gopal Tiwari <gtiwari@redhat.com>
Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2021-04-12 12:52:46 +08:00
..
6lowpan Init Repo base on linux 5.4.32 long term, and add base tlinux kernel interfaces. 2021-03-16 11:01:34 +08:00
9p net: 9p: initialize sun_server.sun_path to have addr's value only when addr is valid 2021-03-16 16:39:51 +08:00
802 Init Repo base on linux 5.4.32 long term, and add base tlinux kernel interfaces. 2021-03-16 11:01:34 +08:00
8021q net: vlan: avoid leaks on register_vlan_dev() failures 2021-04-12 12:51:15 +08:00
appletalk appletalk: Fix atalk_proc_init() return path 2021-03-16 16:33:09 +08:00
atm atm: fix a memory leak of vcc->user_back 2021-03-16 16:37:15 +08:00
ax25 AX.25: Prevent integer overflows in connect and sendmsg 2021-03-16 16:32:42 +08:00
batman-adv batman-adv: set .owner to THIS_MODULE 2021-03-16 16:41:41 +08:00
bluetooth Bluetooth: Fix null pointer dereference in amp_read_loc_assoc_final_data 2021-04-12 12:52:46 +08:00
bpf Init Repo base on linux 5.4.32 long term, and add base tlinux kernel interfaces. 2021-03-16 11:01:34 +08:00
bpfilter net/bpfilter: remove superfluous testing message 2021-03-16 16:26:23 +08:00
bridge net: bridge: use switchdev for port flags set through sysfs too 2021-04-12 12:52:45 +08:00
caif Init Repo base on linux 5.4.32 long term, and add base tlinux kernel interfaces. 2021-03-16 11:01:34 +08:00
can can: af_can: can_rx_unregister(): remove WARN() statement from list operation sanity check 2021-03-16 16:42:06 +08:00
ceph libceph: clear con->out_msg on Policy::stateful_server faults 2021-03-16 16:40:11 +08:00
core pktgen: fix misuse of BUG_ON() in pktgen_thread_worker() 2021-04-12 12:52:46 +08:00
dcb net: dcb: Accept RTM_GETDCB messages carrying set-like DCB commands 2021-04-12 12:51:30 +08:00
dccp dccp: Fix possible memleak in dccp_init and dccp_fini 2021-03-16 16:29:07 +08:00
decnet Init Repo base on linux 5.4.32 long term, and add base tlinux kernel interfaces. 2021-03-16 11:01:34 +08:00
dns_resolver KEYS: Don't write out to userspace while holding key semaphore 2021-03-16 16:26:42 +08:00
dsa net: dsa: call teardown method on probe failure 2021-04-12 12:52:06 +08:00
ethernet Init Repo base on linux 5.4.32 long term, and add base tlinux kernel interfaces. 2021-03-16 11:01:34 +08:00
hsr hsr: check protocol version in hsr_newlink() 2021-03-16 16:26:20 +08:00
ieee802154 Init Repo base on linux 5.4.32 long term, and add base tlinux kernel interfaces. 2021-03-16 11:01:34 +08:00
ife Init Repo base on linux 5.4.32 long term, and add base tlinux kernel interfaces. 2021-03-16 11:01:34 +08:00
ipv4 net: icmp: pass zeroed opts from icmp{,v6}_ndo_send before sending 2021-04-12 12:52:42 +08:00
ipv6 net: icmp: pass zeroed opts from icmp{,v6}_ndo_send before sending 2021-04-12 12:52:42 +08:00
iucv net/af_iucv: remove WARN_ONCE on malformed RX packets 2021-04-12 12:52:44 +08:00
kcm Init Repo base on linux 5.4.32 long term, and add base tlinux kernel interfaces. 2021-03-16 11:01:34 +08:00
key af_key: relax availability checks for skb size calculation 2021-04-12 12:51:58 +08:00
l2tp l2tp: remove skb_dst_set() from l2tp_xmit_skb() 2021-03-16 16:31:43 +08:00
l3mdev Init Repo base on linux 5.4.32 long term, and add base tlinux kernel interfaces. 2021-03-16 11:01:34 +08:00
lapb net: lapb: Copy the skb before sending a packet 2021-04-12 12:51:53 +08:00
llc net: silence data-races on sk_backlog.tail 2021-03-16 16:36:36 +08:00
mac80211 mac80211: fix potential overflow when multiplying to u32 integers 2021-04-12 12:52:15 +08:00
mac802154 mac802154: tx: fix use-after-free 2021-03-16 16:37:33 +08:00
mpls Init Repo base on linux 5.4.32 long term, and add base tlinux kernel interfaces. 2021-03-16 11:01:34 +08:00
ncsi net/ncsi: Use real net-device for response handler 2021-04-12 12:51:08 +08:00
netfilter netfilter: conntrack: skip identical origin tuple in same zone only 2021-04-12 12:52:04 +08:00
netlabel netlabel: fix an uninitialized warning in netlbl_unlabel_staticlist() 2021-03-16 16:41:06 +08:00
netlink genetlink: remove genl_bind 2021-03-16 16:31:42 +08:00
netrom net: netrom: Fix potential nr_neigh refcnt leak in nr_add_node 2021-03-16 16:26:51 +08:00
nfc NFC: fix possible resource leak 2021-04-12 12:51:48 +08:00
nsh Init Repo base on linux 5.4.32 long term, and add base tlinux kernel interfaces. 2021-03-16 11:01:34 +08:00
openvswitch net: openvswitch: ensure LSE is pullable before reading it 2021-03-16 16:41:57 +08:00
packet af_packet: TPACKET_V3: fix fill status rwlock imbalance 2021-03-16 16:33:48 +08:00
phonet Init Repo base on linux 5.4.32 long term, and add base tlinux kernel interfaces. 2021-03-16 11:01:34 +08:00
psample Init Repo base on linux 5.4.32 long term, and add base tlinux kernel interfaces. 2021-03-16 11:01:34 +08:00
qrtr net: qrtr: Fix memory leak in qrtr_tun_open 2021-04-12 12:52:42 +08:00
rds net/rds: restrict iovecs length for RDS_CMSG_RDMA_ARGS 2021-04-12 12:52:06 +08:00
rfkill rfkill: Fix use-after-free in rfkill_resume() 2021-03-16 16:41:16 +08:00
rose rose: Fix Null pointer dereference in rose_send_frame() 2021-03-16 16:41:52 +08:00
rxrpc rxrpc: Fix clearance of Tx/Rx ring when releasing a call 2021-04-12 12:52:05 +08:00
sched net: sched: fix police ext initialization 2021-04-12 12:52:42 +08:00
sctp net: fix iteration for sctp transport seq_files 2021-04-12 12:52:06 +08:00
smc net/smc: fix direct access to ib_gid_addr->ndev in smc_ib_determine_gid() 2021-03-16 16:41:07 +08:00
strparser Init Repo base on linux 5.4.32 long term, and add base tlinux kernel interfaces. 2021-03-16 11:01:34 +08:00
sunrpc SUNRPC: Handle 0 length opaque XDR object data properly 2021-04-12 12:52:00 +08:00
switchdev net: switchdev: don't set port_obj_info->handled true when -EOPNOTSUPP 2021-04-12 12:51:48 +08:00
tipc tipc: fix NULL deref in tipc_link_xmit() 2021-04-12 12:51:31 +08:00
tls net/tls: Protect from calling tls_dev_del for TLS RX twice 2021-03-16 16:41:52 +08:00
toa Init Repo base on linux 5.4.32 long term, and add base tlinux kernel interfaces. 2021-03-16 11:01:34 +08:00
unix skbuff: fix a data race in skb_queue_len() 2021-03-16 16:36:50 +08:00
vmw_vsock vsock: fix locking in vsock_shutdown() 2021-04-12 12:52:06 +08:00
wimax Init Repo base on linux 5.4.32 long term, and add base tlinux kernel interfaces. 2021-03-16 11:01:34 +08:00
wireless wext: fix NULL-ptr-dereference with cfg80211's lack of commit() 2021-04-12 12:51:43 +08:00
x25 net/x25: prevent a couple of overflows 2021-03-16 16:41:56 +08:00
xdp xsk: Replace datagram_poll by sock_poll_wait 2021-03-16 16:42:25 +08:00
xfrm xfrm: interface: use icmp_ndo_send helper 2021-04-12 12:52:42 +08:00
Kconfig Init Repo base on linux 5.4.32 long term, and add base tlinux kernel interfaces. 2021-03-16 11:01:34 +08:00
Makefile Init Repo base on linux 5.4.32 long term, and add base tlinux kernel interfaces. 2021-03-16 11:01:34 +08:00
compat.c net/compat: Add missing sock updates for SCM_RIGHTS 2021-03-16 16:34:05 +08:00
socket.c net: Set fput_needed iff FDPUT_FPUT is set 2021-03-16 16:33:49 +08:00
sysctl_net.c Init Repo base on linux 5.4.32 long term, and add base tlinux kernel interfaces. 2021-03-16 11:01:34 +08:00