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 33EE43812E8 for ; Tue, 12 May 2026 12:46:03 +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=1778589963; cv=none; b=Kq5EH1knFjF2/5zN9kcisrFeDpI+zXvE6YiUq8gdfeq2OL2y2ZavFUiuY8VG+b/y7g0fukjhukUqqXqeoSVd8R+3r+A5+OqhrsMdMoE5uHkYPstq9GtvQSS9zQJh12Dvy1TXUdYOZgJyF7XB57kON8j9Oql3X8zyuzGywx0Hyag= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1778589963; c=relaxed/simple; bh=IyBm8e0kb0++B3IhHuatNxouf7IWJsF6xD0/V0bvPLo=; h=Subject:To:Cc:From:Date:Message-ID:MIME-Version:Content-Type; b=U77HOrYQqbzJ7Y8ZUpoTWnO5lZ89qHnS7Ygve1UkKvXhBnUPnJfpicGZhJSodLiJmCsfjhN8RgyTHuGNFxHTd+5lUlR+qb2CCkiSFiMix7NCKshAFODjJBTkfKVETVH61NVl/OKwvJEnKFO9ZBVtcawucCI3msGv0zmBBLaMzK8= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=HWJmFd5b; 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="HWJmFd5b" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 098C1C2BCB0; Tue, 12 May 2026 12:46:01 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1778589962; bh=IyBm8e0kb0++B3IhHuatNxouf7IWJsF6xD0/V0bvPLo=; h=Subject:To:Cc:From:Date:From; b=HWJmFd5bzBvUa/gohpi9m1MWiv4H0e9yJDBczNXbv/n2GCCayYreYxiedSXHnmeDQ E25jYw9SHXTRyj2eJVKr1PPh/UEPnHExcnxrIj8IuXdnhHXbPqTjQ6D7y8cRU6UdqO aCBjncSJ1aM4vFDakotJFDbCLIvPg374G/poGQiI= Subject: FAILED: patch "[PATCH] Bluetooth: L2CAP: Fix null-ptr-deref in" failed to apply to 6.12-stable tree To: oss@fourdim.xyz,luiz.von.dentz@intel.com Cc: From: Date: Tue, 12 May 2026 14:43:16 +0200 Message-ID: <2026051216-harsh-pretender-53e0@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 6.12-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-6.12.y git checkout FETCH_HEAD git cherry-pick -x 78a88d43dab8d23aeef934ed8ce34d40e6b3d613 # git commit -s git send-email --to '' --in-reply-to '2026051216-harsh-pretender-53e0@gregkh' --subject-prefix 'PATCH 6.12.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); }