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 C07022F83CB; Tue, 12 Aug 2025 17:56:09 +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=1755021369; cv=none; b=DDrRxpH96vOoDuy9fcSQwArDV5bpc2vYWdxChcQs885oIA5fkiN7SgoUnpMPNXv1Ckx9+AI7MaW0eVqVGP8xBkWnlk1ePuuHgTrPEeyCu5+VkraC8tdDxA0R/3gm+k+uSVBFYFluAw71KmWTOkkvZI6Vxj/qgvwT8BDs5NNh7IM= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1755021369; c=relaxed/simple; bh=XWL/43R1U4ue7dMLsU22qaIRMTLpQdX9Jm0y0kPgnqM=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=nvlfLfNW9vlzDM2GXIfJ1kgPhyJwM3XCdxTYEmj9Kpyb0aCSK8tp7Twmw+eu5UAzd2BTkfpAzgTSlWYcxLxRQgono8Wr0N8ut5v+WnWCMvO+HAuiyKcb0hwMYsEGlF29UWFGZGwyNs50h6ZckukIu2rQgmqACsGS9Hfyhm1U3RU= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=hV7Jw+ag; 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="hV7Jw+ag" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 47D04C4CEF1; Tue, 12 Aug 2025 17:56:09 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1755021369; bh=XWL/43R1U4ue7dMLsU22qaIRMTLpQdX9Jm0y0kPgnqM=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=hV7Jw+agY6lM3Uvm6nd1vf112MbVe4zHX344JSZ2LyZ3Z30sVjZdAkjfYFL5bVIZ8 cKos/sh2ZU/PRHEqWqDgmslacVxwWA90pgMZX4pgYrZ4B/S5FsOM/Xbhd+s+6mwyxS Kr4GBuMKrgc5/E9RYed45ye524blOCuPbNusIJXs= From: Greg Kroah-Hartman To: stable@vger.kernel.org Cc: Greg Kroah-Hartman , patches@lists.linux.dev, David Ahern , Ido Schimmel , Stanislav Fomichev , Jakub Kicinski , Sasha Levin Subject: [PATCH 6.6 102/262] vrf: Drop existing dst reference in vrf_ip6_input_dst Date: Tue, 12 Aug 2025 19:28:10 +0200 Message-ID: <20250812172957.434672125@linuxfoundation.org> X-Mailer: git-send-email 2.50.1 In-Reply-To: <20250812172952.959106058@linuxfoundation.org> References: <20250812172952.959106058@linuxfoundation.org> User-Agent: quilt/0.68 X-stable: review X-Patchwork-Hint: ignore Precedence: bulk X-Mailing-List: stable@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 6.6-stable review patch. If anyone has any objections, please let me know. ------------------ From: Stanislav Fomichev [ Upstream commit f388f807eca1de9e6e70f9ffb1a573c3811c4215 ] Commit ff3fbcdd4724 ("selftests: tc: Add generic erspan_opts matching support for tc-flower") started triggering the following kmemleak warning: unreferenced object 0xffff888015fb0e00 (size 512): comm "softirq", pid 0, jiffies 4294679065 hex dump (first 32 bytes): 00 00 00 00 00 00 00 00 40 d2 85 9e ff ff ff ff ........@....... 41 69 59 9d ff ff ff ff 00 00 00 00 00 00 00 00 AiY............. backtrace (crc 30b71e8b): __kmalloc_noprof+0x359/0x460 metadata_dst_alloc+0x28/0x490 erspan_rcv+0x4f1/0x1160 [ip_gre] gre_rcv+0x217/0x240 [ip_gre] gre_rcv+0x1b8/0x400 [gre] ip_protocol_deliver_rcu+0x31d/0x3a0 ip_local_deliver_finish+0x37d/0x620 ip_local_deliver+0x174/0x460 ip_rcv+0x52b/0x6b0 __netif_receive_skb_one_core+0x149/0x1a0 process_backlog+0x3c8/0x1390 __napi_poll.constprop.0+0xa1/0x390 net_rx_action+0x59b/0xe00 handle_softirqs+0x22b/0x630 do_softirq+0xb1/0xf0 __local_bh_enable_ip+0x115/0x150 vrf_ip6_input_dst unconditionally sets skb dst entry, add a call to skb_dst_drop to drop any existing entry. Cc: David Ahern Reviewed-by: Ido Schimmel Fixes: 9ff74384600a ("net: vrf: Handle ipv6 multicast and link-local addresses") Signed-off-by: Stanislav Fomichev Link: https://patch.msgid.link/20250725160043.350725-1-sdf@fomichev.me Signed-off-by: Jakub Kicinski Signed-off-by: Sasha Levin --- drivers/net/vrf.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/net/vrf.c b/drivers/net/vrf.c index 5968a3ab8177..64114e98d75d 100644 --- a/drivers/net/vrf.c +++ b/drivers/net/vrf.c @@ -1345,6 +1345,8 @@ static void vrf_ip6_input_dst(struct sk_buff *skb, struct net_device *vrf_dev, struct net *net = dev_net(vrf_dev); struct rt6_info *rt6; + skb_dst_drop(skb); + rt6 = vrf_ip6_route_lookup(net, vrf_dev, &fl6, ifindex, skb, RT6_LOOKUP_F_HAS_SADDR | RT6_LOOKUP_F_IFACE); if (unlikely(!rt6)) -- 2.39.5