================================================================== BUG: KASAN: slab-use-after-free in instrument_atomic_read_write include/linux/instrumented.h:96 [inline] BUG: KASAN: slab-use-after-free in atomic_fetch_add_relaxed include/linux/atomic/atomic-instrumented.h:252 [inline] BUG: KASAN: slab-use-after-free in __refcount_add include/linux/refcount.h:182 [inline] BUG: KASAN: slab-use-after-free in __refcount_inc include/linux/refcount.h:239 [inline] BUG: KASAN: slab-use-after-free in refcount_inc include/linux/refcount.h:256 [inline] BUG: KASAN: slab-use-after-free in sock_hold include/net/sock.h:760 [inline] BUG: KASAN: slab-use-after-free in sco_conn_del+0x9c/0x498 net/bluetooth/sco.c:195 Write of size 4 at addr ffff0000e84b0080 by task syz-executor.3/23309 CPU: 0 PID: 23309 Comm: syz-executor.3 Not tainted 6.8.0-rc7-syzkaller-g707081b61156 #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/25/2024 Call trace: dump_backtrace+0x1b8/0x1e4 arch/arm64/kernel/stacktrace.c:291 show_stack+0x2c/0x3c arch/arm64/kernel/stacktrace.c:298 __dump_stack lib/dump_stack.c:88 [inline] dump_stack_lvl+0xd0/0x124 lib/dump_stack.c:106 print_address_description mm/kasan/report.c:377 [inline] print_report+0x178/0x518 mm/kasan/report.c:488 kasan_report+0xd8/0x138 mm/kasan/report.c:601 kasan_check_range+0x254/0x294 mm/kasan/generic.c:189 __kasan_check_write+0x20/0x30 mm/kasan/shadow.c:37 instrument_atomic_read_write include/linux/instrumented.h:96 [inline] atomic_fetch_add_relaxed include/linux/atomic/atomic-instrumented.h:252 [inline] __refcount_add include/linux/refcount.h:182 [inline] __refcount_inc include/linux/refcount.h:239 [inline] refcount_inc include/linux/refcount.h:256 [inline] sock_hold include/net/sock.h:760 [inline] sco_conn_del+0x9c/0x498 net/bluetooth/sco.c:195 sco_disconn_cfm+0x8c/0xdc net/bluetooth/sco.c:1371 hci_disconn_cfm include/net/bluetooth/hci_core.h:2001 [inline] hci_conn_hash_flush+0x100/0x220 net/bluetooth/hci_conn.c:2645 hci_dev_close_sync+0x7d8/0xf20 net/bluetooth/hci_sync.c:4957 hci_dev_do_close net/bluetooth/hci_core.c:554 [inline] hci_unregister_dev+0x1e4/0x4a8 net/bluetooth/hci_core.c:2740 vhci_release+0x7c/0xd0 drivers/bluetooth/hci_vhci.c:674 __fput+0x30c/0x738 fs/file_table.c:376 ____fput+0x20/0x30 fs/file_table.c:404 task_work_run+0x230/0x2e0 kernel/task_work.c:180 exit_task_work include/linux/task_work.h:38 [inline] do_exit+0x618/0x1f64 kernel/exit.c:871 do_group_exit+0x194/0x22c kernel/exit.c:1020 get_signal+0x1500/0x15ec kernel/signal.c:2893 do_signal+0x238/0x3e8c arch/arm64/kernel/signal.c:1308 do_notify_resume+0x74/0x1f4 arch/arm64/kernel/entry-common.c:148 exit_to_user_mode_prepare arch/arm64/kernel/entry-common.c:169 [inline] exit_to_user_mode arch/arm64/kernel/entry-common.c:178 [inline] el0_svc+0xac/0x168 arch/arm64/kernel/entry-common.c:713 el0t_64_sync_handler+0x84/0xfc arch/arm64/kernel/entry-common.c:730 el0t_64_sync+0x190/0x194 arch/arm64/kernel/entry.S:598 Allocated by task 5773: kasan_save_stack mm/kasan/common.c:47 [inline] kasan_save_track+0x40/0x78 mm/kasan/common.c:68 kasan_save_alloc_info+0x40/0x50 mm/kasan/generic.c:575 poison_kmalloc_redzone mm/kasan/common.c:370 [inline] __kasan_kmalloc+0xac/0xc4 mm/kasan/common.c:387 kasan_kmalloc include/linux/kasan.h:211 [inline] kmalloc_trace+0x26c/0x49c mm/slub.c:4012 kmalloc include/linux/slab.h:590 [inline] syslog_print+0x10c/0x96c kernel/printk/printk.c:1550 do_syslog+0x304/0x784 kernel/printk/printk.c:1728 __do_sys_syslog kernel/printk/printk.c:1820 [inline] __se_sys_syslog kernel/printk/printk.c:1818 [inline] __arm64_sys_syslog+0x80/0x98 kernel/printk/printk.c:1818 __invoke_syscall arch/arm64/kernel/syscall.c:34 [inline] invoke_syscall+0x98/0x2b8 arch/arm64/kernel/syscall.c:48 el0_svc_common+0x130/0x23c arch/arm64/kernel/syscall.c:133 do_el0_svc+0x48/0x58 arch/arm64/kernel/syscall.c:152 el0_svc+0x54/0x168 arch/arm64/kernel/entry-common.c:712 el0t_64_sync_handler+0x84/0xfc arch/arm64/kernel/entry-common.c:730 el0t_64_sync+0x190/0x194 arch/arm64/kernel/entry.S:598 Freed by task 5773: kasan_save_stack mm/kasan/common.c:47 [inline] kasan_save_track+0x40/0x78 mm/kasan/common.c:68 kasan_save_free_info+0x54/0x6c mm/kasan/generic.c:589 poison_slab_object+0x124/0x18c mm/kasan/common.c:240 __kasan_slab_free+0x3c/0x70 mm/kasan/common.c:256 kasan_slab_free include/linux/kasan.h:184 [inline] slab_free_hook mm/slub.c:2121 [inline] slab_free mm/slub.c:4299 [inline] kfree+0x144/0x3cc mm/slub.c:4409 syslog_print+0x8e4/0x96c kernel/printk/printk.c:1642 do_syslog+0x304/0x784 kernel/printk/printk.c:1728 __do_sys_syslog kernel/printk/printk.c:1820 [inline] __se_sys_syslog kernel/printk/printk.c:1818 [inline] __arm64_sys_syslog+0x80/0x98 kernel/printk/printk.c:1818 __invoke_syscall arch/arm64/kernel/syscall.c:34 [inline] invoke_syscall+0x98/0x2b8 arch/arm64/kernel/syscall.c:48 el0_svc_common+0x130/0x23c arch/arm64/kernel/syscall.c:133 do_el0_svc+0x48/0x58 arch/arm64/kernel/syscall.c:152 el0_svc+0x54/0x168 arch/arm64/kernel/entry-common.c:712 el0t_64_sync_handler+0x84/0xfc arch/arm64/kernel/entry-common.c:730 el0t_64_sync+0x190/0x194 arch/arm64/kernel/entry.S:598 The buggy address belongs to the object at ffff0000e84b0000 which belongs to the cache kmalloc-2k of size 2048 The buggy address is located 128 bytes inside of freed 2048-byte region [ffff0000e84b0000, ffff0000e84b0800) The buggy address belongs to the physical page: page:00000000ac05e915 refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x1284b0 head:00000000ac05e915 order:3 entire_mapcount:0 nr_pages_mapped:0 pincount:0 flags: 0x5ffc00000000840(slab|head|node=0|zone=2|lastcpupid=0x7ff) page_type: 0xffffffff() raw: 05ffc00000000840 ffff0000c0002000 dead000000000100 dead000000000122 raw: 0000000000000000 0000000000080008 00000001ffffffff 0000000000000000 page dumped because: kasan: bad access detected Memory state around the buggy address: ffff0000e84aff80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ffff0000e84b0000: fa fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb >ffff0000e84b0080: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ^ ffff0000e84b0100: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ffff0000e84b0180: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ================================================================== ------------[ cut here ]------------ refcount_t: addition on 0; use-after-free. WARNING: CPU: 0 PID: 23309 at lib/refcount.c:25 refcount_warn_saturate+0x1a8/0x20c lib/refcount.c:25 Modules linked in: CPU: 0 PID: 23309 Comm: syz-executor.3 Tainted: G B 6.8.0-rc7-syzkaller-g707081b61156 #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/25/2024 pstate: 60400005 (nZCv daif +PAN -UAO -TCO -DIT -SSBS BTYPE=--) pc : refcount_warn_saturate+0x1a8/0x20c lib/refcount.c:25 lr : refcount_warn_saturate+0x1a8/0x20c lib/refcount.c:25 sp : ffff800099747460 x29: ffff800099747460 x28: dfff800000000000 x27: 0000000000000067 x26: 1fffe0001e4f9550 x25: 0000000000000000 x24: ffff0000e91ce408 x23: ffff800091ac8880 x22: ffff0000e84b0000 x21: 0000000000000002 x20: ffff0000e84b0080 x19: ffff800091cc2000 x18: ffff0001b4014f28 x17: 0000000000000000 x16: ffff80008aca6b80 x15: 0000000000000001 x14: 1ffff000132e8da8 x13: 0000000000000000 x12: 0000000000000000 x11: 0000000000000003 x10: 0000000000ff0100 x9 : f2361dca73e2e300 x8 : f2361dca73e2e300 x7 : 0000000000150108 x6 : 00000000001500a0 x5 : ffff800099746d58 x4 : ffff80008ed6f570 x3 : ffff80008036f0d8 x2 : 0000000000000001 x1 : 0000000000000001 x0 : 0000000000000000 Call trace: refcount_warn_saturate+0x1a8/0x20c lib/refcount.c:25 __refcount_inc include/linux/refcount.h:239 [inline] refcount_inc include/linux/refcount.h:256 [inline] sock_hold include/net/sock.h:760 [inline] sco_conn_del+0x240/0x498 net/bluetooth/sco.c:195 sco_disconn_cfm+0x8c/0xdc net/bluetooth/sco.c:1371 hci_disconn_cfm include/net/bluetooth/hci_core.h:2001 [inline] hci_conn_hash_flush+0x100/0x220 net/bluetooth/hci_conn.c:2645 hci_dev_close_sync+0x7d8/0xf20 net/bluetooth/hci_sync.c:4957 hci_dev_do_close net/bluetooth/hci_core.c:554 [inline] hci_unregister_dev+0x1e4/0x4a8 net/bluetooth/hci_core.c:2740 vhci_release+0x7c/0xd0 drivers/bluetooth/hci_vhci.c:674 __fput+0x30c/0x738 fs/file_table.c:376 ____fput+0x20/0x30 fs/file_table.c:404 task_work_run+0x230/0x2e0 kernel/task_work.c:180 exit_task_work include/linux/task_work.h:38 [inline] do_exit+0x618/0x1f64 kernel/exit.c:871 do_group_exit+0x194/0x22c kernel/exit.c:1020 get_signal+0x1500/0x15ec kernel/signal.c:2893 do_signal+0x238/0x3e8c arch/arm64/kernel/signal.c:1308 do_notify_resume+0x74/0x1f4 arch/arm64/kernel/entry-common.c:148 exit_to_user_mode_prepare arch/arm64/kernel/entry-common.c:169 [inline] exit_to_user_mode arch/arm64/kernel/entry-common.c:178 [inline] el0_svc+0xac/0x168 arch/arm64/kernel/entry-common.c:713 el0t_64_sync_handler+0x84/0xfc arch/arm64/kernel/entry-common.c:730 el0t_64_sync+0x190/0x194 arch/arm64/kernel/entry.S:598 irq event stamp: 775449 hardirqs last enabled at (775449): [] __exit_to_kernel_mode arch/arm64/kernel/entry-common.c:85 [inline] hardirqs last enabled at (775449): [] exit_to_kernel_mode+0xdc/0x10c arch/arm64/kernel/entry-common.c:95 hardirqs last disabled at (775448): [] __do_softirq+0x958/0xce4 kernel/softirq.c:569 softirqs last enabled at (769686): [] softirq_handle_end kernel/softirq.c:399 [inline] softirqs last enabled at (769686): [] __do_softirq+0xac8/0xce4 kernel/softirq.c:582 softirqs last disabled at (769569): [] ____do_softirq+0x14/0x20 arch/arm64/kernel/irq.c:81 ---[ end trace 0000000000000000 ]--- Unable to handle kernel NULL pointer dereference at virtual address 0000000000000000 Mem abort info: ESR = 0x0000000086000004 EC = 0x21: IABT (current EL), IL = 32 bits SET = 0, FnV = 0 EA = 0, S1PTW = 0 FSC = 0x04: level 0 translation fault user pgtable: 4k pages, 48-bit VAs, pgdp=000000014b5ba000 [0000000000000000] pgd=0000000000000000, p4d=0000000000000000 Internal error: Oops: 0000000086000004 [#1] PREEMPT SMP Modules linked in: CPU: 0 PID: 23309 Comm: syz-executor.3 Tainted: G B W 6.8.0-rc7-syzkaller-g707081b61156 #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/25/2024 pstate: 00400005 (nzcv daif +PAN -UAO -TCO -DIT -SSBS BTYPE=--) pc : 0x0 lr : sco_chan_del net/bluetooth/sco.c:176 [inline] lr : sco_conn_del+0x30c/0x498 net/bluetooth/sco.c:201 sp : ffff800099747490 x29: ffff8000997474a0 x28: dfff800000000000 x27: 0000000000000067 x26: 1fffe0001e4f9550 x25: 0000000000000000 x24: ffff0000e84b0550 x23: 1fffe0001d0960aa x22: ffff0000e84b0000 x21: ffff0000e84b0080 x20: ffff0000e91ce400 x19: ffff0000f27caa80 x18: 1fffe000367fff96 x17: ffff80008ec9d000 x16: ffff8000809fd6d8 x15: ffff60001d096013 x14: 1fffe0001d096013 x13: 00000000000000fb x12: ffffffffffffffff x11: ffff80009973ffff x10: 0000000000ff0100 x9 : ffff800093486880 x8 : 0000000000000000 x7 : 1fffe000367fff97 x6 : ffff800088eaf8bc x5 : 0000000000000000 x4 : 0000000000000001 x3 : ffff800089fa402c x2 : 0000000000000000 x1 : 0000000000000008 x0 : ffff0000e84b0000 Call trace: 0x0 sco_disconn_cfm+0x8c/0xdc net/bluetooth/sco.c:1371 hci_disconn_cfm include/net/bluetooth/hci_core.h:2001 [inline] hci_conn_hash_flush+0x100/0x220 net/bluetooth/hci_conn.c:2645 hci_dev_close_sync+0x7d8/0xf20 net/bluetooth/hci_sync.c:4957 hci_dev_do_close net/bluetooth/hci_core.c:554 [inline] hci_unregister_dev+0x1e4/0x4a8 net/bluetooth/hci_core.c:2740 vhci_release+0x7c/0xd0 drivers/bluetooth/hci_vhci.c:674 __fput+0x30c/0x738 fs/file_table.c:376 ____fput+0x20/0x30 fs/file_table.c:404 task_work_run+0x230/0x2e0 kernel/task_work.c:180 exit_task_work include/linux/task_work.h:38 [inline] do_exit+0x618/0x1f64 kernel/exit.c:871 do_group_exit+0x194/0x22c kernel/exit.c:1020 get_signal+0x1500/0x15ec kernel/signal.c:2893 do_signal+0x238/0x3e8c arch/arm64/kernel/signal.c:1308 do_notify_resume+0x74/0x1f4 arch/arm64/kernel/entry-common.c:148 exit_to_user_mode_prepare arch/arm64/kernel/entry-common.c:169 [inline] exit_to_user_mode arch/arm64/kernel/entry-common.c:178 [inline] el0_svc+0xac/0x168 arch/arm64/kernel/entry-common.c:713 el0t_64_sync_handler+0x84/0xfc arch/arm64/kernel/entry-common.c:730 el0t_64_sync+0x190/0x194 arch/arm64/kernel/entry.S:598 Code: ???????? ???????? ???????? ???????? (????????) ---[ end trace 0000000000000000 ]---