)]}'
{
  "commit": "826857516faaa35811986eae48ea4eb8c7faf51b",
  "tree": "cc544047d8074132b0c72b8e98b950335533ff61",
  "parents": [
    "700bf9b523d21865edf7c54488ccead850892e64"
  ],
  "author": {
    "name": "Nikolay Aleksandrov",
    "email": "razor@blackwall.org",
    "time": "Fri Aug 02 11:07:30 2024 +0300"
  },
  "committer": {
    "name": "Shuo Yang",
    "email": "gshuoy@google.com",
    "time": "Fri Aug 30 05:33:37 2024 +0000"
  },
  "message": "net: bridge: mcast: wait for previous gc cycles when removing port\n\n[ Upstream commit 92c4ee25208d0f35dafc3213cdf355fbe449e078 ]\n\nsyzbot hit a use-after-free[1] which is caused because the bridge doesn\u0027t\nmake sure that all previous garbage has been collected when removing a\nport. What happens is:\n      CPU 1                   CPU 2\n start gc cycle           remove port\n                         acquire gc lock first\n wait for lock\n                         call br_multicasg_gc() directly\n acquire lock now but    free port\n the port can be freed\n while grp timers still\n running\n\nMake sure all previous gc cycles have finished by using flush_work before\nfreeing the port.\n\n[1]\n  BUG: KASAN: slab-use-after-free in br_multicast_port_group_expired+0x4c0/0x550 net/bridge/br_multicast.c:861\n  Read of size 8 at addr ffff888071d6d000 by task syz.5.1232/9699\n\n  CPU: 1 PID: 9699 Comm: syz.5.1232 Not tainted 6.10.0-rc5-syzkaller-00021-g24ca36a562d6 #0\n  Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 06/07/2024\n  Call Trace:\n   \u003cIRQ\u003e\n   __dump_stack lib/dump_stack.c:88 [inline]\n   dump_stack_lvl+0x116/0x1f0 lib/dump_stack.c:114\n   print_address_description mm/kasan/report.c:377 [inline]\n   print_report+0xc3/0x620 mm/kasan/report.c:488\n   kasan_report+0xd9/0x110 mm/kasan/report.c:601\n   br_multicast_port_group_expired+0x4c0/0x550 net/bridge/br_multicast.c:861\n   call_timer_fn+0x1a3/0x610 kernel/time/timer.c:1792\n   expire_timers kernel/time/timer.c:1843 [inline]\n   __run_timers+0x74b/0xaf0 kernel/time/timer.c:2417\n   __run_timer_base kernel/time/timer.c:2428 [inline]\n   __run_timer_base kernel/time/timer.c:2421 [inline]\n   run_timer_base+0x111/0x190 kernel/time/timer.c:2437\n\nBUG\u003db/362701782\nTEST\u003dpresubmit\nRELEASE_NOTE\u003dFixes CVE-2024-44934 in the Linux kernel.\n\ncos-patch:security-high\nReported-by: syzbot+263426984509be19c9a0@syzkaller.appspotmail.com\nCloses: https://syzkaller.appspot.com/bug?extid\u003d263426984509be19c9a0\nFixes: e12cec65b554 (\"net: bridge: mcast: destroy all entries via gc\")\nChange-Id: I7ac915addb5b78472331e9f62c12b004900531af\nSigned-off-by: Nikolay Aleksandrov \u003crazor@blackwall.org\u003e\nLink: https://patch.msgid.link/20240802080730.3206303-1-razor@blackwall.org\nSigned-off-by: Jakub Kicinski \u003ckuba@kernel.org\u003e\nSigned-off-by: Sasha Levin \u003csashal@kernel.org\u003e\nSigned-off-by: Shuo Yang \u003cgshuoy@google.com\u003e\nReviewed-on: https://cos-review.googlesource.com/c/third_party/kernel/+/79343\nReviewed-by: Oleksandr Tymoshenko \u003covt@google.com\u003e\nReviewed-by: Kevin Berry \u003ckpberry@google.com\u003e\nTested-by: Cusky Presubmit Bot \u003cpresubmit@cos-infra-prod.iam.gserviceaccount.com\u003e\n",
  "tree_diff": [
    {
      "type": "modify",
      "old_id": "38373b4fb7ddf75b971322364dd63c4cc3a4de83",
      "old_mode": 33188,
      "old_path": "net/bridge/br_multicast.c",
      "new_id": "c38244d60ff86e334f7327fce92ffc321c9fccb0",
      "new_mode": 33188,
      "new_path": "net/bridge/br_multicast.c"
    }
  ]
}
