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 E7F5D35BDDB; Wed, 3 Dec 2025 16:37:29 +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=1764779850; cv=none; b=Pke3c+5nDimAEyCQwTEwD6ZT3yjeoDUPqy5wmtk45KiBH8FaquOI4asMsRhfyege5G9F46lwON6bV+c/S8iOfKM8Pb5Clj5r1Lr6rDKWJCuzLFiqvS6NbH7j0cD9K5tRKq9wH4uWfOCbZZLxJQ3agQauAzkH4hugotbmsQLp+Vg= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1764779850; c=relaxed/simple; bh=EZlFj3InNuLfg+0RrRWorUUFP17ayXh7niEbYvBUvbc=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=nwU474cFqlxa/rZ4H4eLFDIybBwLPGkwstphTPVjIseSXKOc5T+2W+gRj2Oo+XVlNjz8alBt7+Yu/KPHrTmekm31I/BsqQFg22t8u6jJAMtNvkXNa3h3q1vUer2XrII2H3YqfzMvvDwj3qDlSBqREWO369eyoww6kf5/MyklpNs= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=EeC9omBO; 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="EeC9omBO" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 25F78C116C6; Wed, 3 Dec 2025 16:37:28 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1764779849; bh=EZlFj3InNuLfg+0RrRWorUUFP17ayXh7niEbYvBUvbc=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=EeC9omBO71Q/L/46ej2ukhR8KHEypqlLmTUv6FhqLgA3cdxRqIiYlfjJuvD4oWZrk EHbtJqMyBiq7t7+wSvT0usr2nGNnqoR4dt6lV06/7wZLerDXZPriGQeVpFpcJOqaTv N/lj7JL8Om/4XDl9+XJAi8CETQDntIkxtskXuhCs= From: Greg Kroah-Hartman To: stable@vger.kernel.org Cc: Greg Kroah-Hartman , patches@lists.linux.dev, Paul Menzel , Pauli Virtanen , Luiz Augusto von Dentz , Sasha Levin Subject: [PATCH 6.1 353/568] Bluetooth: 6lowpan: reset link-local header on ipv6 recv path Date: Wed, 3 Dec 2025 16:25:55 +0100 Message-ID: <20251203152453.634372416@linuxfoundation.org> X-Mailer: git-send-email 2.52.0 In-Reply-To: <20251203152440.645416925@linuxfoundation.org> References: <20251203152440.645416925@linuxfoundation.org> User-Agent: quilt/0.69 X-stable: review X-Patchwork-Hint: ignore Precedence: bulk X-Mailing-List: patches@lists.linux.dev List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 6.1-stable review patch. If anyone has any objections, please let me know. ------------------ From: Pauli Virtanen [ Upstream commit 3b78f50918276ab28fb22eac9aa49401ac436a3b ] Bluetooth 6lowpan.c netdev has header_ops, so it must set link-local header for RX skb, otherwise things crash, eg. with AF_PACKET SOCK_RAW Add missing skb_reset_mac_header() for uncompressed ipv6 RX path. For the compressed one, it is done in lowpan_header_decompress(). Log: (BlueZ 6lowpan-tester Client Recv Raw - Success) ------ kernel BUG at net/core/skbuff.c:212! Call Trace: ... packet_rcv (net/packet/af_packet.c:2152) ... __local_bh_enable_ip (kernel/softirq.c:407) netif_rx (net/core/dev.c:5648) chan_recv_cb (net/bluetooth/6lowpan.c:294 net/bluetooth/6lowpan.c:359) ------ Fixes: 18722c247023 ("Bluetooth: Enable 6LoWPAN support for BT LE devices") Reviewed-by: Paul Menzel Signed-off-by: Pauli Virtanen Signed-off-by: Luiz Augusto von Dentz Signed-off-by: Sasha Levin --- net/bluetooth/6lowpan.c | 1 + 1 file changed, 1 insertion(+) diff --git a/net/bluetooth/6lowpan.c b/net/bluetooth/6lowpan.c index db119071a0ea0..003c8ae104f29 100644 --- a/net/bluetooth/6lowpan.c +++ b/net/bluetooth/6lowpan.c @@ -288,6 +288,7 @@ static int recv_pkt(struct sk_buff *skb, struct net_device *dev, local_skb->pkt_type = PACKET_HOST; local_skb->dev = dev; + skb_reset_mac_header(local_skb); skb_set_transport_header(local_skb, sizeof(struct ipv6hdr)); if (give_skb_to_upper(local_skb, dev) != NET_RX_SUCCESS) { -- 2.51.0