================================================================== BUG: KASAN: slab-use-after-free in __list_del_entry_valid_or_report+0x8c/0x1b4 lib/list_debug.c:62 Read of size 8 at addr ffff0000dcbbf558 by task kworker/u9:1/6126 CPU: 1 UID: 0 PID: 6126 Comm: kworker/u9:1 Not tainted 6.17.0-rc1-syzkaller-g8f5ae30d69d7 #0 PREEMPT Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 06/30/2025 Workqueue: hci1 hci_error_reset Call trace: show_stack+0x2c/0x3c arch/arm64/kernel/stacktrace.c:499 (C) __dump_stack+0x30/0x40 lib/dump_stack.c:94 dump_stack_lvl+0xd8/0x12c lib/dump_stack.c:120 print_address_description+0xa8/0x238 mm/kasan/report.c:378 print_report+0x68/0x84 mm/kasan/report.c:482 kasan_report+0xb0/0x110 mm/kasan/report.c:595 __asan_report_load8_noabort+0x20/0x2c mm/kasan/report_generic.c:381 __list_del_entry_valid_or_report+0x8c/0x1b4 lib/list_debug.c:62 __list_del_entry_valid include/linux/list.h:124 [inline] __list_del_entry include/linux/list.h:215 [inline] list_del_init include/linux/list.h:287 [inline] bt_accept_unlink+0x40/0x248 net/bluetooth/af_bluetooth.c:259 l2cap_sock_teardown_cb+0x148/0x360 net/bluetooth/l2cap_sock.c:1613 l2cap_chan_del+0xb8/0x470 net/bluetooth/l2cap_core.c:655 l2cap_conn_del+0x2f8/0x5f0 net/bluetooth/l2cap_core.c:1787 l2cap_disconn_cfm+0x90/0xe0 net/bluetooth/l2cap_core.c:7325 hci_disconn_cfm include/net/bluetooth/hci_core.h:2065 [inline] hci_conn_hash_flush+0x108/0x218 net/bluetooth/hci_conn.c:2564 hci_dev_close_sync+0x89c/0x1154 net/bluetooth/hci_sync.c:5294 hci_dev_do_close net/bluetooth/hci_core.c:501 [inline] hci_error_reset+0xfc/0x358 net/bluetooth/hci_core.c:1034 process_one_work+0x7e8/0x155c kernel/workqueue.c:3236 process_scheduled_works kernel/workqueue.c:3319 [inline] worker_thread+0x958/0xed8 kernel/workqueue.c:3400 kthread+0x5fc/0x75c kernel/kthread.c:463 ret_from_fork+0x10/0x20 arch/arm64/kernel/entry.S:844 Allocated by task 8806: kasan_save_stack mm/kasan/common.c:47 [inline] kasan_save_track+0x40/0x78 mm/kasan/common.c:68 kasan_save_alloc_info+0x44/0x54 mm/kasan/generic.c:562 poison_kmalloc_redzone mm/kasan/common.c:388 [inline] __kasan_kmalloc+0x9c/0xb4 mm/kasan/common.c:405 kasan_kmalloc include/linux/kasan.h:260 [inline] __kmalloc_cache_noprof+0x2a4/0x3fc mm/slub.c:4396 kmalloc_noprof include/linux/slab.h:905 [inline] kzalloc_noprof include/linux/slab.h:1039 [inline] bch2_move_extent+0x328/0x149c fs/bcachefs/move.c:362 __bch2_move_data_phys+0xd84/0x144c fs/bcachefs/move.c:985 bch2_evacuate_bucket+0x220/0x34c fs/bcachefs/move.c:1082 bch2_copygc+0x2d80/0x3570 fs/bcachefs/movinggc.c:234 bch2_copygc_thread+0x898/0xd8c fs/bcachefs/movinggc.c:409 kthread+0x5fc/0x75c kernel/kthread.c:463 ret_from_fork+0x10/0x20 arch/arm64/kernel/entry.S:844 Freed by task 8806: kasan_save_stack mm/kasan/common.c:47 [inline] kasan_save_track+0x40/0x78 mm/kasan/common.c:68 kasan_save_free_info+0x58/0x70 mm/kasan/generic.c:576 poison_slab_object mm/kasan/common.c:243 [inline] __kasan_slab_free+0x74/0x98 mm/kasan/common.c:275 kasan_slab_free include/linux/kasan.h:233 [inline] slab_free_hook mm/slub.c:2417 [inline] slab_free mm/slub.c:4680 [inline] kfree+0x17c/0x474 mm/slub.c:4879 bch2_move_extent+0x680/0x149c fs/bcachefs/move.c:437 __bch2_move_data_phys+0xd84/0x144c fs/bcachefs/move.c:985 bch2_evacuate_bucket+0x220/0x34c fs/bcachefs/move.c:1082 bch2_copygc+0x2d80/0x3570 fs/bcachefs/movinggc.c:234 bch2_copygc_thread+0x898/0xd8c fs/bcachefs/movinggc.c:409 kthread+0x5fc/0x75c kernel/kthread.c:463 ret_from_fork+0x10/0x20 arch/arm64/kernel/entry.S:844 The buggy address belongs to the object at ffff0000dcbbf000 which belongs to the cache kmalloc-2k of size 2048 The buggy address is located 1368 bytes inside of freed 2048-byte region [ffff0000dcbbf000, ffff0000dcbbf800) The buggy address belongs to the physical page: page: refcount:0 mapcount:0 mapping:0000000000000000 index:0xffff0000dcbb9000 pfn:0x11cbb8 head: order:3 mapcount:0 entire_mapcount:0 nr_pages_mapped:0 pincount:0 flags: 0x5ffc00000000240(workingset|head|node=0|zone=2|lastcpupid=0x7ff) page_type: f5(slab) raw: 05ffc00000000240 ffff0000c0002000 fffffdffc332e010 fffffdffc3e58210 raw: ffff0000dcbb9000 0000000000080001 00000000f5000000 0000000000000000 head: 05ffc00000000240 ffff0000c0002000 fffffdffc332e010 fffffdffc3e58210 head: ffff0000dcbb9000 0000000000080001 00000000f5000000 0000000000000000 head: 05ffc00000000003 fffffdffc372ee01 00000000ffffffff 00000000ffffffff head: ffffffffffffffff 0000000000000000 00000000ffffffff 0000000000000008 page dumped because: kasan: bad access detected Memory state around the buggy address: ffff0000dcbbf400: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ffff0000dcbbf480: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb >ffff0000dcbbf500: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ^ ffff0000dcbbf580: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ffff0000dcbbf600: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ================================================================== slab kmalloc-2k start ffff0000dcbbf000 pointer offset 1368 size 2048 list_del corruption. prev->next should be ffff0000d3dca558, but was 0000000000000000. (prev=ffff0000dcbbf558) ------------[ cut here ]------------ kernel BUG at lib/list_debug.c:64! Internal error: Oops - BUG: 00000000f2000800 [#1] SMP Modules linked in: CPU: 1 UID: 0 PID: 6126 Comm: kworker/u9:1 Tainted: G B 6.17.0-rc1-syzkaller-g8f5ae30d69d7 #0 PREEMPT Tainted: [B]=BAD_PAGE Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 06/30/2025 Workqueue: hci1 hci_error_reset pstate: 63400005 (nZCv daif +PAN -UAO +TCO +DIT -SSBS BTYPE=--) pc : __list_del_entry_valid_or_report+0x17c/0x1b4 lib/list_debug.c:62 lr : __list_del_entry_valid_or_report+0x17c/0x1b4 lib/list_debug.c:62 sp : ffff8000a4b07710 x29: ffff8000a4b07710 x28: 0000000000000003 x27: ffff0000d3dc800c x26: ffff0000d3dc8000 x25: 1fffe0001a7b9002 x24: dfff800000000000 x23: 1fffe0001b977eab x22: dfff800000000000 x21: ffff0000dcbbf558 x20: ffff0000dcbbf558 x19: ffff0000d3dca558 x18: 00000000ffffffff x17: 20747562202c3835 x16: ffff80008b007230 x15: 0000000000000001 x14: 1ffff00014960e1c x13: 0000000000000000 x12: 0000000000000000 x11: ffff700014960e1d x10: 0000000000ff0100 x9 : 10286ef45e8eea00 x8 : 10286ef45e8eea00 x7 : 0000000000000001 x6 : ffff800080563af4 x5 : 0000000000000000 x4 : 0000000000000000 x3 : 0000000000000002 x2 : 0000000000000002 x1 : 0000000100000000 x0 : 000000000000006d Call trace: __list_del_entry_valid_or_report+0x17c/0x1b4 lib/list_debug.c:62 (P) __list_del_entry_valid include/linux/list.h:124 [inline] __list_del_entry include/linux/list.h:215 [inline] list_del_init include/linux/list.h:287 [inline] bt_accept_unlink+0x40/0x248 net/bluetooth/af_bluetooth.c:259 l2cap_sock_teardown_cb+0x148/0x360 net/bluetooth/l2cap_sock.c:1613 l2cap_chan_del+0xb8/0x470 net/bluetooth/l2cap_core.c:655 l2cap_conn_del+0x2f8/0x5f0 net/bluetooth/l2cap_core.c:1787 l2cap_disconn_cfm+0x90/0xe0 net/bluetooth/l2cap_core.c:7325 hci_disconn_cfm include/net/bluetooth/hci_core.h:2065 [inline] hci_conn_hash_flush+0x108/0x218 net/bluetooth/hci_conn.c:2564 hci_dev_close_sync+0x89c/0x1154 net/bluetooth/hci_sync.c:5294 hci_dev_do_close net/bluetooth/hci_core.c:501 [inline] hci_error_reset+0xfc/0x358 net/bluetooth/hci_core.c:1034 process_one_work+0x7e8/0x155c kernel/workqueue.c:3236 process_scheduled_works kernel/workqueue.c:3319 [inline] worker_thread+0x958/0xed8 kernel/workqueue.c:3400 kthread+0x5fc/0x75c kernel/kthread.c:463 ret_from_fork+0x10/0x20 arch/arm64/kernel/entry.S:844 Code: 91310000 aa1303e1 aa1503e3 973f8a10 (d4210000) ---[ end trace 0000000000000000 ]---