)]}'
{
  "commit": "1ad5ef488d42320cdec2cdaeef1ea4741c3207d6",
  "tree": "d8d733787b2c11a5dc087f0598d15f3ff536a946",
  "parents": [
    "04ca6fe63d63bafec1e97c187c108f2ddf2328ce"
  ],
  "author": {
    "name": "Andrew Stellman",
    "email": "astellman@stellman-greene.com",
    "time": "Wed Nov 25 10:54:11 2026 -0500"
  },
  "committer": {
    "name": "Willem de Bruijn",
    "email": "willemb@google.com",
    "time": "Tue Dec 01 21:26:45 2026 -0500"
  },
  "message": "tipc: free the tunnel packets when failover tunnelling stops early\n\ntipc_link_tnl_prepare() returns from the middle of its tunnelling loop\nwhen a packet does not fit the tunnel link MTU and the peer lacks\nTIPC_TUNNEL_ENHANCED, when fragmenting such a packet fails, and when a\ntunnel packet cannot be allocated. The tunnel packets already built on\nthe local tnlq are leaked, and for FAILOVER_MSG the receive side\nhand-over at the end of the function (drop_point, failover_reasm_skb,\ndeferdq) is skipped.\n\nPurge tnlq on these paths and go on with the hand-over. The earlier\nreturn taken when the dummy tunnel packet can\u0027t be allocated leaks\nnothing but skips the same hand-over, so take the same exit there.\n\nReproduced on net (af6737b90668) under QEMU with kmemleak, with two\nguests joined by two TIPC eth links: MTU 9000 (active) and MTU 1500\n(standby). The receiving guest runs the same kernel with\nTIPC_TUNNEL_ENHANCED removed from TIPC_NODE_CAPABILITIES, to stand in\nfor a peer whose kernel predates that capability; the sending guest\u0027s\nkernel is unmodified. The sender blocks the MTU 9000 link in both\ndirections with tc, sends three 100 byte messages and one 4000 byte\nmessage, and waits for the link to fail. Without this patch that logs\n\n  tipc: Link tunneling error, too large msg \u003c0, 2\u003e: 4040!\n\nIn four runs without this patch, kmemleak reported three skbs (six\nobjects) allocated by tipc_link_tnl_prepare() in two, five leaks whose\ndetails were not captured in one, and nothing in one. From one of the\ntwo, run on a rebuild of the same commit with debug info enabled,\ndecoded and trimmed:\n\n  unreferenced object 0xff11000005117b80 (size 472):\n    backtrace (crc 539599dc):\n      __alloc_skb (net/core/skbuff.c:705 (discriminator 2))\n      tipc_buf_acquire (include/linux/skbuff.h:1441 net/tipc/msg.c:72)\n      tipc_link_tnl_prepare (net/tipc/link.c:2055)\n      __tipc_node_link_down (net/tipc/node.c:1053)\n      tipc_rcv (net/tipc/node.c:2008 net/tipc/node.c:2186)\n      tipc_l2_rcv_msg (net/tipc/bearer.c:721 (discriminator 1))\n\nIn one run with this patch the same test logs the warning and kmemleak\nreports nothing. With a 1000 byte message instead of the 4000 byte one,\nall four messages reach the receiver over the tunnel with and without\nthis patch. The allocation failure paths and the skipped hand-over were\nfound by reading the code and were not exercised. Apart from the\nreceiver\u0027s capability change, no kernel changes, fault injection, debug\ncode or delays were used. There are no TIPC selftests to run.\n\nFixes: 2320bcdae628 (\"tipc: fix changeover issues due to large packet\")\nSigned-off-by: Andrew Stellman \u003castellman@stellman-greene.com\u003e\nReviewed-by: Tung Nguyen \u003ctung.quang.nguyen@est.tech\u003e\nLink: https://patch.msgid.link/20261125155411.66090-1-astellman@stellman-greene.com\nSigned-off-by: Willem de Bruijn \u003cwillemb@google.com\u003e\n",
  "tree_diff": [
    {
      "type": "modify",
      "old_id": "6427c69f892942c5d0d47369546da2c4f2e6d36e",
      "old_mode": 33188,
      "old_path": "net/tipc/link.c",
      "new_id": "ce6739d6cbba65ee8be399d63f212a763b53ea47",
      "new_mode": 33188,
      "new_path": "net/tipc/link.c"
    }
  ]
}
