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 3E37338D416 for ; Tue, 12 May 2026 12:46:07 +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=1778589967; cv=none; b=gTT9BLiTr+QlyFCy4HZNuGgMnMyY55WmUnc/HUpyQeQIm7Bdl4q/2X35riohwSAXAiNrRD/oud0Uzuc08B3ZjqWhFeBOTmGh5xDYbtFCq8CsP3wLaz9GinNJfHgpJuM9jlmosTc/K3N9i7qTP6lCM0H2cLwZ2euFLw1/wG9YaeY= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1778589967; c=relaxed/simple; bh=6QcM4w13EHSRXDNb5zYKEDhLrJwM+uPnNu6n1SU1gUQ=; h=Subject:To:Cc:From:Date:Message-ID:MIME-Version:Content-Type; b=FPl163NoINNkpNA/pSFUsDRiJPeWSn8Fb1ZnwCZtdQZZT0J419KIZH5MaEPZXIeAUX5AfrmVu3B9oxfXhzI+a2tblTtM0L0zeW8seVEM6fAQIOllvik0ITbchUgF/6hRUBPd6oMFKs4COW59C/2uiFffO3Pv7MSsZIP5KbyDlc8= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=uEsiezkx; 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="uEsiezkx" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 5409CC2BCF6; Tue, 12 May 2026 12:46:06 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1778589966; bh=6QcM4w13EHSRXDNb5zYKEDhLrJwM+uPnNu6n1SU1gUQ=; h=Subject:To:Cc:From:Date:From; b=uEsiezkx5NRZf+LerdphX2nArRTLBqTfJIK+A3KZ/WbBjCJG+wBZjosclw0/nQSpf tb7t863CMnmg4px2ctpHrHHAaYFCIIk/m8af7v+P3+Rb8WBqLpi3qvwfPCj/Q7IRuZ R/3q35JMYVnKbGUEquRn1cf1RXHKjY7qA9MbRfgw= Subject: FAILED: patch "[PATCH] Bluetooth: L2CAP: Fix null-ptr-deref in" failed to apply to 5.10-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-erasure-slick-6fb7@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.10-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.10.y git checkout FETCH_HEAD git cherry-pick -x 78a88d43dab8d23aeef934ed8ce34d40e6b3d613 # git commit -s git send-email --to '' --in-reply-to '2026051217-erasure-slick-6fb7@gregkh' --subject-prefix 'PATCH 5.10.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); }