)]}'
{
  "commit": "fdec80191ba24cfa4f6f374156efa2dab3828bc1",
  "tree": "cf66b70f76705cc9176f2fff8acd018b3ab93c11",
  "parents": [
    "f0e68014f4ac1653b2980ab76744f4dfdffdbac5"
  ],
  "author": {
    "name": "Sewook Seo",
    "email": "sewookseo@google.com",
    "time": "Tue Nov 10 09:25:12 2026 +0000"
  },
  "committer": {
    "name": "Steffen Klassert",
    "email": "steffen.klassert@secunet.com",
    "time": "Thu Nov 19 08:42:08 2026 +0100"
  },
  "message": "xfrm: check inner family via skb_dst for small_ipv6 DF clearing\n\nCommit 6821ad877034 (\"xfrm: do not set IPv4 DF flag when encapsulating\nIPv6 frames \u003c\u003d 1280 bytes.\") intended to clear the outer IPv4 DF bit in\nxfrm4_tunnel_encap_add() when encapsulating inner IPv6 frames of at most\nIPV6_MIN_MTU (1280) bytes, by checking skb-\u003eprotocol \u003d\u003d htons(ETH_P_IPV6).\n\nHowever, its caller xfrm4_prepare_output() overwrites skb-\u003eprotocol with\nhtons(ETH_P_IP) before invoking xfrm4_tunnel_encap_add(), since\ncommit 0c620e97b349 (\"xfrm: remove output indirection from xfrm_mode\").\nAs a result, small_ipv6 always evaluates to false, leaving IP_DF set on\nouter IPv4 tunnel packets even when encapsulating \u003c\u003d 1280-byte IPv6\nframes.\n\nThis issue was observed on devices in production use over IPv6-in-IPv4\nESP-in-UDP tunnels where an intermediate IPv4 link has an MTU smaller\nthan the encapsulated packet size (e.g. \u003c 1362 bytes) and ICMPv4\nFragmentation Needed errors are either filtered or not actionable below\nIPV6_MIN_MTU, causing encapsulated \u003c\u003d 1280-byte IPv6 packets to be\ndropped instead of fragmented by the outer IPv4 router.\n\nAt the time xfrm4_tunnel_encap_add() runs, skb_dst(skb) has not been\npopped yet and still represents the inner packet destination entry, as\nalready used a few lines below to set top_iph-\u003eprotocol via\nxfrm_af2proto(skb_dst(skb)-\u003eops-\u003efamily), while skb-\u003elen still holds the\nunencapsulated inner packet length. Check dst-\u003eops-\u003efamily \u003d\u003d AF_INET6\ninstead of skb-\u003eprotocol so small_ipv6 works as intended.\n\nTested on User-Mode Linux (ARCH\u003dum) with a four-namespace IPv6-over-IPv4\nXFRM ESP tunnel reproducer across a 1300-byte MTU router link with ICMPv4\nFragmentation Needed filtered (verifying 1280-byte inner IPv6 frames fail\nbefore the fix and pass via outer IPv4 fragmentation with the fix, while\nlarger frames still preserve outer IP_DF), and verified all tests pass in\ntools/testing/selftests/net/xfrm_state.sh.\n\nFixes: 6821ad877034 (\"xfrm: do not set IPv4 DF flag when encapsulating IPv6 frames \u003c\u003d 1280 bytes.\")\nCc: stable@vger.kernel.org\nCc: Maciej Żenczykowski \u003cmaze@google.com\u003e\nCc: Lorenzo Colitti \u003clorenzo@google.com\u003e\nAssisted-by: LLM\nSigned-off-by: Sewook Seo \u003csewookseo@google.com\u003e\nSigned-off-by: Steffen Klassert \u003csteffen.klassert@secunet.com\u003e\n",
  "tree_diff": [
    {
      "type": "modify",
      "old_id": "f1f612cd7b438ddb760022645fed9997fbeeb534",
      "old_mode": 33188,
      "old_path": "net/xfrm/xfrm_output.c",
      "new_id": "60ffe9549c0946196a34351f72b28d15199f7e09",
      "new_mode": 33188,
      "new_path": "net/xfrm/xfrm_output.c"
    }
  ]
}
