Re: [PATCH net v4] xfrm: fix ip_rt_bug race in icmp_route_lookup reverse path

From: patchwork-bot+netdevbpf

Date: Tue Feb 10 2026 - 09:20:36 EST


Hello:

This patch was applied to netdev/net.git (main)
by Paolo Abeni <pabeni@xxxxxxxxxx>:

On Fri, 6 Feb 2026 13:02:19 +0800 you wrote:
> From: Jiayuan Chen <jiayuan.chen@xxxxxxxxxx>
>
> icmp_route_lookup() performs multiple route lookups to find a suitable
> route for sending ICMP error messages, with special handling for XFRM
> (IPsec) policies.
>
> The lookup sequence is:
> 1. First, lookup output route for ICMP reply (dst = original src)
> 2. Pass through xfrm_lookup() for policy check
> 3. If blocked (-EPERM) or dst is not local, enter "reverse path"
> 4. In reverse path, call xfrm_decode_session_reverse() to get fl4_dec
> which reverses the original packet's flow (saddr<->daddr swapped)
> 5. If fl4_dec.saddr is local (we are the original destination), use
> __ip_route_output_key() for output route lookup
> 6. If fl4_dec.saddr is NOT local (we are a forwarding node), use
> ip_route_input() to simulate the reverse packet's input path
> 7. Finally, pass rt2 through xfrm_lookup() with XFRM_LOOKUP_ICMP flag
>
> [...]

Here is the summary with links:
- [net,v4] xfrm: fix ip_rt_bug race in icmp_route_lookup reverse path
https://git.kernel.org/netdev/net/c/81b84de32bb2

You are awesome, thank you!
--
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html