Skip to content

RFC xfrm: Fix bugs in supporting stacked XFRM-I tunnels

Benedict Wong netdev 1 version New

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 RFC Latest2 patches 0 repliesNew

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/2xfrm: Check policy for nested XFRM packets in xfrm_inputnet/xfrm/xfrm_input.c+7 -00 replies
2/2xfrm: Skip checking of already-verified secpath entriesinclude/net/xfrm.h net/xfrm/xfrm_input.c net/xfrm/xfrm_policy.c+13 -20 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.

Read the v1 thread

Cover letter [RFC ipsec 0/2] xfrm: Fix bugs in supporting stacked XFRM-I tunnels

This patch set fixes bugs that prevent stacked IPsec tunnels (via XFRM interfaces) from receiving packets properly. The apparent cause of the issues is that the inner tunnel’s policy checks fail to validate the outer tunnel’s secpath entries (since it no longer has a reference to the outer tunnel policies, and each call validates ALL secpath entries) prior to verifying the inner tunnel’s. This patch set fixes this by caching the list of verified secpath entries, and skipping them upon future validation runs.

PATCH 1/2 Ensures that policies for nested tunnel mode transforms are checked before additional decapsulation. This ensures that entries in the secpath are verified while the context (intermediate IP addresses, marks, etc) can be appropriately matched.

PATCH 2/2 Skips template matching for previously verified entries in the secpath. This ensures that each tunnel is responsible for incrementally verifying the secpath entries associated with it.