)]}'
{
  "commit": "f7c9f8e3607440fe39300efbaf46cf7b5eecb23f",
  "tree": "6b7c7087ad29b7a10281c13ec5307f473a0fe1e6",
  "parents": [
    "f0373e9317bc904e7bdb123d3106fe4f3cea2fb7"
  ],
  "author": {
    "name": "Jiayuan Chen",
    "email": "jiayuan.chen@shopee.com",
    "time": "Wed Mar 04 19:38:13 2026 +0800"
  },
  "committer": {
    "name": "Greg Kroah-Hartman",
    "email": "gregkh@linuxfoundation.org",
    "time": "Fri Mar 13 17:20:46 2026 +0100"
  },
  "message": "net: ipv6: fix panic when IPv4 route references loopback IPv6 nexthop\n\n[ Upstream commit 21ec92774d1536f71bdc90b0e3d052eff99cf093 ]\n\nWhen a standalone IPv6 nexthop object is created with a loopback device\n(e.g., \"ip -6 nexthop add id 100 dev lo\"), fib6_nh_init() misclassifies\nit as a reject route. This is because nexthop objects have no destination\nprefix (fc_dst\u003d::), causing fib6_is_reject() to match any loopback\nnexthop. The reject path skips fib_nh_common_init(), leaving\nnhc_pcpu_rth_output unallocated. If an IPv4 route later references this\nnexthop, __mkroute_output() dereferences NULL nhc_pcpu_rth_output and\npanics.\n\nSimplify the check in fib6_nh_init() to only match explicit reject\nroutes (RTF_REJECT) instead of using fib6_is_reject(). The loopback\npromotion heuristic in fib6_is_reject() is handled separately by\nip6_route_info_create_nh(). After this change, the three cases behave\nas follows:\n\n1. Explicit reject route (\"ip -6 route add unreachable 2001:db8::/64\"):\n   RTF_REJECT is set, enters reject path, skips fib_nh_common_init().\n   No behavior change.\n\n2. Implicit loopback reject route (\"ip -6 route add 2001:db8::/32 dev lo\"):\n   RTF_REJECT is not set, takes normal path, fib_nh_common_init() is\n   called. ip6_route_info_create_nh() still promotes it to reject\n   afterward. nhc_pcpu_rth_output is allocated but unused, which is\n   harmless.\n\n3. Standalone nexthop object (\"ip -6 nexthop add id 100 dev lo\"):\n   RTF_REJECT is not set, takes normal path, fib_nh_common_init() is\n   called. nhc_pcpu_rth_output is properly allocated, fixing the crash\n   when IPv4 routes reference this nexthop.\n\nSuggested-by: Ido Schimmel \u003cidosch@nvidia.com\u003e\nFixes: 493ced1ac47c (\"ipv4: Allow routes to use nexthop objects\")\nReported-by: syzbot+334190e097a98a1b81bb@syzkaller.appspotmail.com\nCloses: https://lore.kernel.org/all/698f8482.a70a0220.2c38d7.00ca.GAE@google.com/T/\nSigned-off-by: Jiayuan Chen \u003cjiayuan.chen@shopee.com\u003e\nReviewed-by: Ido Schimmel \u003cidosch@nvidia.com\u003e\nReviewed-by: David Ahern \u003cdsahern@kernel.org\u003e\nLink: https://patch.msgid.link/20260304113817.294966-2-jiayuan.chen@linux.dev\nSigned-off-by: Jakub Kicinski \u003ckuba@kernel.org\u003e\nSigned-off-by: Sasha Levin \u003csashal@kernel.org\u003e\n",
  "tree_diff": [
    {
      "type": "modify",
      "old_id": "0f741aa154fafde917880c8dbac9ffdd71fa5ad3",
      "old_mode": 33188,
      "old_path": "net/ipv6/route.c",
      "new_id": "7b9279d4c363cdca05faf0ceb1925ff995f33cd0",
      "new_mode": 33188,
      "new_path": "net/ipv6/route.c"
    }
  ]
}
