Re: [PATCH net-next v3 06/12] net/sched: add act_psp for psp transport mode

From: Todd Bert Freed

Date: Fri Dec 04 2026 - 18:57:32 EST


> [Severity: Medium]
> Can the METADATA_PSP dst and skb->decrypted come apart after
> tcf_psp_act() has paired them here?
>
> The backstop in this comment only works if both stay together, but the
> fragmentation paths copy only one of them.
>
> Suppose act_ct defragmented the packet earlier, so
> tc_skb_cb(skb)->mru is set. A later mirred redirect then goes through
> tcf_dev_queue_xmit() -> sch_frag_xmit_hook() -> sch_fragment().
> ip_do_fragment() and ip6_fragment() build the fragments with
> ip_copy_metadata() / ip6_copy_metadata(). Those copy the dst and the
> skb extensions, but not skb->decrypted.
>
> This action can also reach the same state a second way.
> ip_copy_metadata() copies SKB_EXT_PSP without decrypted too, so a
> fragmented Rx PSP packet can arrive with SKB_EXT_PSP and
> decrypted == 0:

Neither path can be reached once the PSP fixes in net are applied.
"net: don't fragment decrypted skbs" makes ip_do_fragment() and
ip6_fragment() fail with -EMSGSIZE for an skb with skb->decrypted set,
before any fragment is built:

See

https://lore.kernel.org/netdev/20261124010601.3995693-4-toddfreed@xxxxxxxx

-Todd