projects
/
linux-2.6-microblaze.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
2ff1a41
)
Bluetooth: L2CAP: Fix null-ptr-deref in l2cap_sock_get_sndtimeo_cb()
author
Siwei Zhang
<oss@fourdim.xyz>
Wed, 15 Apr 2026 20:53:36 +0000
(16:53 -0400)
committer
Luiz Augusto von Dentz
<luiz.von.dentz@intel.com>
Wed, 6 May 2026 20:21:07 +0000
(16:21 -0400)
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>
net/bluetooth/l2cap_sock.c
patch
|
blob
|
history
diff --git
a/net/bluetooth/l2cap_sock.c
b/net/bluetooth/l2cap_sock.c
index
fb3cb70
..
879c9f9
100644
(file)
--- a/
net/bluetooth/l2cap_sock.c
+++ b/
net/bluetooth/l2cap_sock.c
@@
-1761,6
+1761,9
@@
static long l2cap_sock_get_sndtimeo_cb(struct l2cap_chan *chan)
{
struct sock *sk = chan->data;
+ if (!sk)
+ return 0;
+
return READ_ONCE(sk->sk_sndtimeo);
}