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 1E57F35206F; Tue, 26 Aug 2025 14:09:35 +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=1756217375; cv=none; b=QfLQGZn8NE8/EgrNx3xWAwAmlPMUccMcK66wFxuJQCiWySWYh0r4QfHw73q5cRLvrukKFKmdgpLYBKUC4V7NhCUYughFsg/mx4GgZFzVE2r57VczTRT5jhayEASQY0uH6XEyWuY45Cc7ygtNEhQilBqe7ghTD5TqyVNFDSE9KGg= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1756217375; c=relaxed/simple; bh=Xs9kXbuGlqiseav31ZzMeaTN9v/AN374z3Psx9R5KtA=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=jmUhhIiZDdJ2zK7s+QRdS3+11FYPlX0dddfudw0KEyHhDv7oO7A6a9+HdePMd1aSWWlvP1rpBrNi/iyV4U2SwuIHxfXPvPMZtS4NYxC9Hk7GJ1yRFfq9kU95jyfEfXaIyVrjvwJKtMhbyXNN5NSYcxLR6C9MOQOkd4j+RQl9kuY= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=LnneMj2S; 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="LnneMj2S" Received: by smtp.kernel.org (Postfix) with ESMTPSA id A00F4C113D0; Tue, 26 Aug 2025 14:09:34 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1756217375; bh=Xs9kXbuGlqiseav31ZzMeaTN9v/AN374z3Psx9R5KtA=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=LnneMj2SkVGI3fM8M5jJnixHebxBE0GvvQC+jnsntkvx4T/42XzF32tAQR4UW7aEG zmx7J/v6r1KeEopZ0s7kgR6Jo3cLB1zYgenEv5sqWPjdhTd96wfC0z9I4Za8BM3uYp su1ieJkixV+4kgyqH6/J4PznVfM6Knz0Xk4lC7YA= 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 5.10 119/523] vrf: Drop existing dst reference in vrf_ip6_input_dst Date: Tue, 26 Aug 2025 13:05:29 +0200 Message-ID: <20250826110927.452781080@linuxfoundation.org> X-Mailer: git-send-email 2.50.1 In-Reply-To: <20250826110924.562212281@linuxfoundation.org> References: <20250826110924.562212281@linuxfoundation.org> User-Agent: quilt/0.68 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 5.10-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 c801185ade2b..b43e8041fda3 100644 --- a/drivers/net/vrf.c +++ b/drivers/net/vrf.c @@ -1316,6 +1316,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