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_state_change_cb()

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

Fixes: 89bc500e41fc ("Bluetooth: Add state tracking to struct l2cap_chan")
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
2ff1a41a 91b5a598

+3
+3
net/bluetooth/l2cap_sock.c
··· 1657 1657 { 1658 1658 struct sock *sk = chan->data; 1659 1659 1660 + if (!sk) 1661 + return; 1662 + 1660 1663 sk->sk_state = state; 1661 1664 1662 1665 if (err)