From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 6DEC2399886 for ; Tue, 12 May 2026 12:46:11 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1778589971; cv=none; b=C0dmAH6UwLtvZFFiyCZUQnQqOELHwNqiYXRIFb9EAYal4fK9zz3qapPewh/ts7wBzR6RXWQtf/zc1Wu10PVWHJFaAH52s4LsafoPL7AatVUef9f5tsjvcLBmD48KZZ8QATMUDhA5oRHBShsfCl7o4DL7Z6opUBsi3HsWYmWwOjM= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1778589971; c=relaxed/simple; bh=kND8hX4lW7aiA7s/ZDgCUiAUL1pocI60GGI0YZaJGas=; h=Subject:To:Cc:From:Date:Message-ID:MIME-Version:Content-Type; b=cKpc9R8xx026hCF8TqI2rljeRx5+O94vYT+MdccP5Zl3ggJ+rVDRWLwTXTVDcarao75kSgd29NPoXLNZw3ut+siMpXDICTNfTSqN/+fSUuBdAVJNNbYH7TuuZD1QeJ/4rdbctqqZg/mk2LezRPqeYWdJiq+A6B95q+sccaGvaH4= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=sxI1jskc; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b="sxI1jskc" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 38C7AC2BCFA; Tue, 12 May 2026 12:46:09 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1778589971; bh=kND8hX4lW7aiA7s/ZDgCUiAUL1pocI60GGI0YZaJGas=; h=Subject:To:Cc:From:Date:From; b=sxI1jskcCGmqVJcaXEE1EexRjP6Z7WdH/RhlRQTS+/RN3qU08MIiQPxSZQSUlAT0i L4TAWgh1z0oGn3uf65U4s3dGLCYN4rEwOWhemrynmg23bnh008OK+gXqRNPoVsPZyF AbDGY5GYLwL9UKwxqEOvMq7mpTFO+Dm9CtHOxaOQ= Subject: FAILED: patch "[PATCH] Bluetooth: L2CAP: Fix null-ptr-deref in" failed to apply to 5.15-stable tree To: oss@fourdim.xyz,luiz.von.dentz@intel.com Cc: From: Date: Tue, 12 May 2026 14:43:17 +0200 Message-ID: <2026051217-footing-cement-0817@gregkh> Precedence: bulk X-Mailing-List: stable@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=ANSI_X3.4-1968 Content-Transfer-Encoding: 8bit The patch below does not apply to the 5.15-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 . 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-5.15.y git checkout FETCH_HEAD git cherry-pick -x 78a88d43dab8d23aeef934ed8ce34d40e6b3d613 # git commit -s git send-email --to '' --in-reply-to '2026051217-footing-cement-0817@gregkh' --subject-prefix 'PATCH 5.15.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 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 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 Signed-off-by: Luiz Augusto von Dentz diff --git a/net/bluetooth/l2cap_sock.c b/net/bluetooth/l2cap_sock.c index fb3cb70a5a39..879c9f90269a 100644 --- 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); }