Netdev List
 help / color / mirror / Atom feed
From: Ido Schimmel <idosch@nvidia.com>
To: Zhiling Zou <zhilinz@nebusec.ai>
Cc: namangulati@google.com, netdev@vger.kernel.org,
	dsahern@kernel.org, davem@davemloft.net, edumazet@kernel.org,
	pabeni@redhat.com, horms@kernel.org, vega@nebusec.ai
Subject: Re: [PATCH net v3 1/1] ipmr: drop packets with unknown ingress VIF
Date: Thu, 22 Oct 2026 10:55:27 +0300	[thread overview]
Message-ID: <20261022075527.GA3591482@shredder> (raw)
In-Reply-To: <5271fcb94a4d9e697ed64a348e92ea9e74faab1c.1792608753.git.zhilinz@nebusec.ai>

On Thu, Oct 22, 2026 at 03:01:16AM +0800, Zhiling Zou wrote:
> A packet can race with VIF publication and make ipmr_find_vif() return
> -1 even though the VIF device pointer is already visible. The parent VIF
> device check can then pass with an invalid ingress VIF. For (*,G)
> entries, this can also let the packet be forwarded back out its ingress
> VIF.
> 
> Drop packets whose ingress VIF lookup fails in both IPv4 and IPv6
> forwarding, before checking the MFC parent device. This prevents
> forwarding with an unknown ingress VIF and avoids the (*,G) hairpin.
> 
> Without the early check, the negative index can reach the IPv4 offload
> lookup only for an skb marked for L3 forwarding offload, currently done
> by mlxsw. The race is rare; the supplied PoC reports only the UBSAN
> negative-index diagnostic.
> 
> Fixes: 4eadb88244d1 ("ipmr: do not acquire mrt_lock while calling ip_mr_forward()")
> Fixes: 9b1c21d898fd ("ip6mr: do not acquire mrt_lock while calling ip6_mr_forward()")
> Cc: stable@vger.kernel.org
> Reported-by: Vega <vega@nebusec.ai>
> Link: https://lore.kernel.org/netdev/b966eb102e98f299e45be59ada033a8766e4c6df.1791899747.git.zhilinz@nebusec.ai/
> Suggested-by: Ido Schimmel <idosch@nvidia.com>
> Suggested-by: Naman Gulati <namangulati@google.com>
> Assisted-by: LLM
> Signed-off-by: Zhiling Zou <zhilinz@nebusec.ai>

Reviewed-by: Ido Schimmel <idosch@nvidia.com>

  parent reply	other threads:[~2026-10-22  7:55 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-10-21 19:01 [PATCH net v3 0/1] ipmr: drop packets with unknown ingress VIF Zhiling Zou
2026-10-21 19:01 ` [PATCH net v3 1/1] " Zhiling Zou
2026-10-21 19:34   ` Naman Gulati
2026-10-22  7:55   ` Ido Schimmel [this message]
2026-10-26 23:50 ` [PATCH net v3 0/1] " patchwork-bot+netdevbpf

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20261022075527.GA3591482@shredder \
    --to=idosch@nvidia.com \
    --cc=davem@davemloft.net \
    --cc=dsahern@kernel.org \
    --cc=edumazet@kernel.org \
    --cc=horms@kernel.org \
    --cc=namangulati@google.com \
    --cc=netdev@vger.kernel.org \
    --cc=pabeni@redhat.com \
    --cc=vega@nebusec.ai \
    --cc=zhilinz@nebusec.ai \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox