FAILED: patch "[PATCH] Bluetooth: L2CAP: Fix null-ptr-deref in" failed to apply to 6.1-stable tree
Subsystems (2)
[email protected]
maintainerThe patch below does not apply to the 6.1-stable tree.
If someone wants it applied there, or to any other stable or longterm tree, then please email the backport, including the original git commit id to <[email protected]>.
To reproduce the conflict and resubmit, you may use the following commands:
git fetch https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/ linux-6.1.y
git checkout FETCH_HEAD
git cherry-pick -x 78a88d43dab8d23aeef934ed8ce34d40e6b3d613
# <resolve conflicts, build, test, etc.>
git commit -s
git send-email --to '<[email protected]>' --in-reply-to '2026051216-resource-trading-20ac@gregkh' --subject-prefix 'PATCH 6.1.y' HEAD^..
Possible dependencies:
thanks,
greg k-h
------------------ original commit in Linus's tree ------------------
From 78a88d43dab8d23aeef934ed8ce34d40e6b3d613 Mon Sep 17 00:00:00 2001
From: Siwei Zhang <[email protected]>
Date: Wed, 15 Apr 2026 16:53:36 -0400
Subject: [PATCH] Bluetooth: L2CAP: Fix null-ptr-deref in
l2cap_sock_get_sndtimeo_cb()
Add the same NULL guard already present inl2cap_sock_resume_cb() and l2cap_sock_ready_cb().
net/bluetooth/l2cap_sock.c +3 -0
@@ -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); }
PATCH 1/1 Bluetooth: L2CAP: Fix null-ptr-deref in l2cap_sock_get_sndtimeo_cb()
Add the same NULL guard already present inl2cap_sock_resume_cb() and l2cap_sock_ready_cb().
--- net/bluetooth/l2cap_sock.c | 3 +++ 1 file changed, 3 insertions(+)
net/bluetooth/l2cap_sock.c +3 -0
@@ -1725,6 +1725,9 @@ static long l2cap_sock_get_sndtimeo_cb(struct l2cap_chan *chan) {struct sock *sk = chan->data; +if (!sk) +return 0 ; +return sk->sk_sndtimeo; }
Signature · 1 line
2.54.0
PATCH 1/1 Bluetooth: L2CAP: Fix null-ptr-deref in l2cap_sock_get_sndtimeo_cb()
In reply to [email protected]commit 78a88d43dab8d23aeef934ed8ce34d40e6b3d613 upstream.
Adjusted as stable does not have READ_ONCE aroundsk->sk_sndtimeo.
Add the same NULL guard already present inl2cap_sock_resume_cb() and l2cap_sock_ready_cb().
--- net/bluetooth/l2cap_sock.c | 3 +++ 1 file changed, 3 insertions(+)
net/bluetooth/l2cap_sock.c +3 -0
@@ -1725,6 +1725,9 @@ static long l2cap_sock_get_sndtimeo_cb(struct l2cap_chan *chan) {struct sock *sk = chan->data; +if (!sk) +return 0 ; +return sk->sk_sndtimeo; }
Signature · 1 line
2.54.0