Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

Bluetooth: L2CAP: Fix null-ptr-deref in l2cap_sock_new_connection_cb()

Add the same NULL guard already present in
l2cap_sock_resume_cb() and l2cap_sock_ready_cb().

Fixes: 80808e431e1e ("Bluetooth: Add l2cap_chan_ops abstraction")
Cc: stable@kernel.org
Signed-off-by: Siwei Zhang <oss@fourdim.xyz>
Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>

authored by

Siwei Zhang and committed by
Luiz Augusto von Dentz
0a120d96 78a88d43

+3
+3
net/bluetooth/l2cap_sock.c
··· 1498 1498 { 1499 1499 struct sock *sk, *parent = chan->data; 1500 1500 1501 + if (!parent) 1502 + return NULL; 1503 + 1501 1504 lock_sock(parent); 1502 1505 1503 1506 /* Check for backlog size */