)]}'
{
  "commit": "37dfd0efbfffc20a57e41c2eb349ac49b1ca1ff8",
  "tree": "93660a34fd000cd14f4a2e6a0e1a9b6c5c89718b",
  "parents": [
    "6d9b7c85af57305ec2bd5907124478867edcc60b"
  ],
  "author": {
    "name": "Cheng Yongkang",
    "email": "teel4res@gmail.com",
    "time": "Sat Oct 31 21:48:40 2026 -0700"
  },
  "committer": {
    "name": "Paolo Abeni",
    "email": "pabeni@redhat.com",
    "time": "Thu Nov 05 12:14:28 2026 +0100"
  },
  "message": "net: bridge: disable MRP ports before the FDB flush in del_nbp()\n\ndel_nbp() flushes the port\u0027s FDB entries before it unregisters the RX\nhandler. For a normal port, br_stp_disable_port() moves the port to\nBR_STATE_DISABLED before this cleanup.\n\nThat does not hold for an MRP ring port. br_set_state() ignores state\nchanges while BR_MRP_AWARE_BIT is set, so br_stp_disable_port() leaves\nthe port state alone. br_mrp_port_del() then restores forwarding when\nthe bridge is up before clearing the bit. A frame received between\nbr_fdb_cleanup_by_dst() and netdev_rx_handler_unregister() can therefore\ncreate a new FDB entry referencing the dying port. Nothing removes that\nentry before destroy_nbp_rcu() frees the port, so a later frame to the\nlearned MAC can be forwarded through the freed port.\n\nRemove the MRP and CFM instances before disabling the port, so that\nbr_stp_disable_port() actually transitions it to BR_STATE_DISABLED.\nWith CONFIG_BRIDGE_VLAN_FILTERING\u003dy, synchronize_net() in\nnbp_vlan_group_unpublish() also drains receive paths that could still\nlearn with the old state before the final FDB cleanup.\n\nFound through an LLM-assisted source code analysis workflow and\nreproduced on net with KASAN and CONFIG_BRIDGE_VLAN_FILTERING\u003dy in QEMU.\nA diagnostic switchdev module accepts MRP objects and delays the\nNETDEV_CHANGEUPPER callback for 1.5 s, holding del_nbp() after the FDB\ncleanup and before RX handler removal. The reproducer floods the MRP\nport with rotating source MACs, waits for the port\u0027s RCU callback\nthrough the module\u0027s rcu_barrier(), then sends frames to those MACs\nfrom another port. The unpatched kernel reports:\n\n  BUG: KASAN: slab-use-after-free in br_forward+0xb1/0x820\n  Call Trace:\n   \u003cIRQ\u003e\n   br_forward+0xb1/0x820\n   br_handle_frame_finish+0x148b/0x1e50\n   br_handle_frame+0x90a/0x15c0\n\nWith this patch, three runs of six cycles each reach the delay without\na KASAN report.\n\nFixes: 6536993371fa (\"bridge: mrp: Integrate MRP into the bridge\")\nSuggested-by: Ido Schimmel \u003cidosch@nvidia.com\u003e\nLink: https://lore.kernel.org/netdev/20261012123051.GA714215@shredder/\nCloses: https://lore.kernel.org/netdev/20261022090431.3641707-1-teel4res@gmail.com/\nSigned-off-by: Cheng Yongkang \u003cteel4res@gmail.com\u003e\nReviewed-by: Ido Schimmel \u003cidosch@nvidia.com\u003e\nLink: https://patch.msgid.link/20261101044840.1595584-1-1020691186@qq.com\nSigned-off-by: Paolo Abeni \u003cpabeni@redhat.com\u003e\n",
  "tree_diff": [
    {
      "type": "modify",
      "old_id": "2c05ebc1299d12610a9a72a0c310bf55a9bcda08",
      "old_mode": 33188,
      "old_path": "net/bridge/br_if.c",
      "new_id": "fb25ce3e5e646f8fbe417edba1bf5ee591ff3da6",
      "new_mode": 33188,
      "new_path": "net/bridge/br_if.c"
    }
  ]
}
