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

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

Fixes: 8d836d71e222 ("Bluetooth: Access sk_sndtimeo indirectly in l2cap_core.c")
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
78a88d43 2ff1a41a

+3
+3
net/bluetooth/l2cap_sock.c
··· 1761 1761 { 1762 1762 struct sock *sk = chan->data; 1763 1763 1764 + if (!sk) 1765 + return 0; 1766 + 1764 1767 return READ_ONCE(sk->sk_sndtimeo); 1765 1768 } 1766 1769