================================================================== 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:184 [inline] BUG: KASAN: slab-use-after-free in __refcount_inc include/linux/refcount.h:241 [inline] BUG: KASAN: slab-use-after-free in refcount_inc include/linux/refcount.h:258 [inline] BUG: KASAN: slab-use-after-free in sock_hold include/net/sock.h:779 [inline] BUG: KASAN: slab-use-after-free in sco_sock_timeout+0x84/0x284 net/bluetooth/sco.c:92 Write of size 4 at addr ffff0000d5805080 by task kworker/0:4/6496 CPU: 0 UID: 0 PID: 6496 Comm: kworker/0:4 Not tainted 6.11.0-rc7-syzkaller-g5f5673607153 #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 08/06/2024 Workqueue: events sco_sock_timeout Call trace: dump_backtrace+0x1b8/0x1e4 arch/arm64/kernel/stacktrace.c:319 show_stack+0x2c/0x3c arch/arm64/kernel/stacktrace.c:326 __dump_stack lib/dump_stack.c:93 [inline] dump_stack_lvl+0xe4/0x150 lib/dump_stack.c:119 print_address_description mm/kasan/report.c:377 [inline] print_report+0x198/0x538 mm/kasan/report.c:488 kasan_report+0xd8/0x138 mm/kasan/report.c:601 kasan_check_range+0x268/0x2a8 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:184 [inline] __refcount_inc include/linux/refcount.h:241 [inline] refcount_inc include/linux/refcount.h:258 [inline] sock_hold include/net/sock.h:779 [inline] sco_sock_timeout+0x84/0x284 net/bluetooth/sco.c:92 process_one_work+0x79c/0x15b8 kernel/workqueue.c:3231 process_scheduled_works kernel/workqueue.c:3312 [inline] worker_thread+0x978/0xec4 kernel/workqueue.c:3389 kthread+0x288/0x310 kernel/kthread.c:389 ret_from_fork+0x10/0x20 arch/arm64/kernel/entry.S:860 Allocated by task 6013: 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:565 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_cache_noprof+0x244/0x374 mm/slub.c:4193 kmalloc_noprof include/linux/slab.h:681 [inline] syslog_print+0x10c/0x96c kernel/printk/printk.c:1556 do_syslog+0x274/0x704 kernel/printk/printk.c:1734 __do_sys_syslog kernel/printk/printk.c:1826 [inline] __se_sys_syslog kernel/printk/printk.c:1824 [inline] __arm64_sys_syslog+0x80/0x98 kernel/printk/printk.c:1824 __invoke_syscall arch/arm64/kernel/syscall.c:35 [inline] invoke_syscall+0x98/0x2b8 arch/arm64/kernel/syscall.c:49 el0_svc_common+0x130/0x23c arch/arm64/kernel/syscall.c:132 do_el0_svc+0x48/0x58 arch/arm64/kernel/syscall.c:151 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 6013: 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:579 poison_slab_object+0x128/0x180 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:2256 [inline] slab_free mm/slub.c:4477 [inline] kfree+0x154/0x3e0 mm/slub.c:4598 syslog_print+0x8e4/0x96c kernel/printk/printk.c:1648 do_syslog+0x274/0x704 kernel/printk/printk.c:1734 __do_sys_syslog kernel/printk/printk.c:1826 [inline] __se_sys_syslog kernel/printk/printk.c:1824 [inline] __arm64_sys_syslog+0x80/0x98 kernel/printk/printk.c:1824 __invoke_syscall arch/arm64/kernel/syscall.c:35 [inline] invoke_syscall+0x98/0x2b8 arch/arm64/kernel/syscall.c:49 el0_svc_common+0x130/0x23c arch/arm64/kernel/syscall.c:132 do_el0_svc+0x48/0x58 arch/arm64/kernel/syscall.c:151 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 ffff0000d5805000 which belongs to the cache kmalloc-2k of size 2048 The buggy address is located 128 bytes inside of freed 2048-byte region [ffff0000d5805000, ffff0000d5805800) The buggy address belongs to the physical page: page: refcount:1 mapcount:0 mapping:0000000000000000 index:0xffff0000d5800000 pfn:0x115800 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: 0xfdffffff(slab) raw: 05ffc00000000240 ffff0000c0002000 fffffdffc3328a10 fffffdffc34df810 raw: ffff0000d5800000 0000000000080002 00000001fdffffff 0000000000000000 head: 05ffc00000000240 ffff0000c0002000 fffffdffc3328a10 fffffdffc34df810 head: ffff0000d5800000 0000000000080002 00000001fdffffff 0000000000000000 head: 05ffc00000000003 fffffdffc3560001 ffffffffffffffff 0000000000000000 head: 0000000000000008 0000000000000000 00000000ffffffff 0000000000000000 page dumped because: kasan: bad access detected Memory state around the buggy address: ffff0000d5804f80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ffff0000d5805000: fa fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb >ffff0000d5805080: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ^ ffff0000d5805100: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ffff0000d5805180: 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: 6496 at lib/refcount.c:25 refcount_warn_saturate+0x1a8/0x20c lib/refcount.c:25 Modules linked in: CPU: 0 UID: 0 PID: 6496 Comm: kworker/0:4 Tainted: G B 6.11.0-rc7-syzkaller-g5f5673607153 #0 Tainted: [B]=BAD_PAGE Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 08/06/2024 Workqueue: events sco_sock_timeout 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 : ffff8000aefc7ab0 x29: ffff8000aefc7ab0 x28: ffff700015df8f80 x27: ffff0000cc98a918 x26: 1fffe00018210001 x25: ffff0000c1080000 x24: dfff800000000000 x23: dfff800000000000 x22: 0000000000000000 x21: 0000000000000002 x20: ffff0000d5805080 x19: ffff8000927b7000 x18: 0000000000000008 x17: 0000000000000000 x16: ffff80008b274630 x15: ffff700011ebd1e8 x14: 1ffff00011ebd1e8 x13: 0000000000000004 x12: ffffffffffffffff x11: 0000000000000003 x10: 0000000000ff0100 x9 : 7ddc04d36f81e900 x8 : 7ddc04d36f81e900 x7 : 0000000000000001 x6 : 0000000000000001 x5 : ffff8000aefc71f8 x4 : ffff80008f65b620 x3 : ffff800080383398 x2 : 0000000000000000 x1 : 0000000000000001 x0 : 0000000000000000 Call trace: refcount_warn_saturate+0x1a8/0x20c lib/refcount.c:25 __refcount_inc include/linux/refcount.h:241 [inline] refcount_inc include/linux/refcount.h:258 [inline] sock_hold include/net/sock.h:779 [inline] sco_sock_timeout+0x1c4/0x284 net/bluetooth/sco.c:92 process_one_work+0x79c/0x15b8 kernel/workqueue.c:3231 process_scheduled_works kernel/workqueue.c:3312 [inline] worker_thread+0x978/0xec4 kernel/workqueue.c:3389 kthread+0x288/0x310 kernel/kthread.c:389 ret_from_fork+0x10/0x20 arch/arm64/kernel/entry.S:860 irq event stamp: 512367 hardirqs last enabled at (512367): [] __exit_to_kernel_mode arch/arm64/kernel/entry-common.c:85 [inline] hardirqs last enabled at (512367): [] exit_to_kernel_mode+0xdc/0x10c arch/arm64/kernel/entry-common.c:95 hardirqs last disabled at (512366): [] handle_softirqs+0x8bc/0xbfc kernel/softirq.c:569 softirqs last enabled at (512050): [] spin_unlock_bh include/linux/spinlock.h:396 [inline] softirqs last enabled at (512050): [] nsim_dev_trap_report drivers/net/netdevsim/dev.c:820 [inline] softirqs last enabled at (512050): [] nsim_dev_trap_report_work+0x620/0x924 drivers/net/netdevsim/dev.c:850 softirqs last disabled at (512048): [] spin_lock_bh include/linux/spinlock.h:356 [inline] softirqs last disabled at (512048): [] nsim_dev_trap_report drivers/net/netdevsim/dev.c:816 [inline] softirqs last disabled at (512048): [] nsim_dev_trap_report_work+0x59c/0x924 drivers/net/netdevsim/dev.c:850 ---[ 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=0000000107d9d000 [0000000000000000] pgd=0000000000000000, p4d=0000000000000000 Internal error: Oops: 0000000086000004 [#1] PREEMPT SMP Modules linked in: CPU: 0 UID: 0 PID: 6496 Comm: kworker/0:4 Tainted: G B W 6.11.0-rc7-syzkaller-g5f5673607153 #0 Tainted: [B]=BAD_PAGE, [W]=WARN Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 08/06/2024 Workqueue: events sco_sock_timeout pstate: 00400005 (nzcv daif +PAN -UAO -TCO -DIT -SSBS BTYPE=--) pc : 0x0 lr : sco_sock_timeout+0x114/0x284 net/bluetooth/sco.c:102 sp : ffff8000aefc7ae0 x29: ffff8000aefc7ae0 x28: ffff700015df8f80 x27: ffff0000cc98a918 x26: 1fffe00018210001 x25: ffff0000c1080000 x24: dfff800000000000 x23: dfff800000000000 x22: 0000000000000000 x21: ffff0000c5072608 x20: ffff0000d5805000 x19: ffff0000d5805080 x18: 1fffe000366d31ee x17: ffff80008b41af3c x16: ffff800080a86fd8 x15: ffff60001ab00a38 x14: 1fffe0001ab00a38 x13: 00000000000000fb x12: ffffffffffffffff x11: ffff8000aefbffff x10: 0000000000ff0100 x9 : ffff8000970a6140 x8 : 0000000000000000 x7 : ffff800080a86878 x6 : ffff800089448624 x5 : 0000000000000000 x4 : 0000000000000001 x3 : ffff80008a578cf4 x2 : 0000000000000000 x1 : 0000000000000008 x0 : ffff0000d5805000 Call trace: 0x0 process_one_work+0x79c/0x15b8 kernel/workqueue.c:3231 process_scheduled_works kernel/workqueue.c:3312 [inline] worker_thread+0x978/0xec4 kernel/workqueue.c:3389 kthread+0x288/0x310 kernel/kthread.c:389 ret_from_fork+0x10/0x20 arch/arm64/kernel/entry.S:860 Code: ???????? ???????? ???????? ???????? (????????) ---[ end trace 0000000000000000 ]---