================================================================== 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:774 [inline] BUG: KASAN: slab-use-after-free in sco_conn_del+0xb9/0x2d0 net/bluetooth/sco.c:199 Write of size 4 at addr ffff888011a3f080 by task syz-executor.1/12582 CPU: 3 PID: 12582 Comm: syz-executor.1 Not tainted 6.9.0-syzkaller-12277-g56fb6f92854f #0 Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.2-debian-1.16.2-1 04/01/2014 Call Trace: __dump_stack lib/dump_stack.c:88 [inline] dump_stack_lvl+0x116/0x1f0 lib/dump_stack.c:114 print_address_description mm/kasan/report.c:377 [inline] print_report+0xc3/0x620 mm/kasan/report.c:488 kasan_report+0xd9/0x110 mm/kasan/report.c:601 check_region_inline mm/kasan/generic.c:183 [inline] kasan_check_range+0xef/0x1a0 mm/kasan/generic.c:189 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:774 [inline] sco_conn_del+0xb9/0x2d0 net/bluetooth/sco.c:199 sco_disconn_cfm+0x76/0xb0 net/bluetooth/sco.c:1374 hci_disconn_cfm include/net/bluetooth/hci_core.h:1985 [inline] hci_conn_hash_flush+0x114/0x260 net/bluetooth/hci_conn.c:2584 hci_dev_close_sync+0x534/0x11c0 net/bluetooth/hci_sync.c:5062 hci_dev_do_close+0x2e/0x90 net/bluetooth/hci_core.c:556 hci_unregister_dev+0x1e3/0x5f0 net/bluetooth/hci_core.c:2760 vhci_release+0x7f/0x100 drivers/bluetooth/hci_vhci.c:666 __fput+0x408/0xbb0 fs/file_table.c:422 task_work_run+0x14e/0x250 kernel/task_work.c:180 exit_task_work include/linux/task_work.h:38 [inline] do_exit+0xa9b/0x2ba0 kernel/exit.c:874 do_group_exit+0xd3/0x2a0 kernel/exit.c:1023 __do_sys_exit_group kernel/exit.c:1034 [inline] __se_sys_exit_group kernel/exit.c:1032 [inline] __ia32_sys_exit_group+0x3e/0x50 kernel/exit.c:1032 do_syscall_32_irqs_on arch/x86/entry/common.c:165 [inline] __do_fast_syscall_32+0x73/0x120 arch/x86/entry/common.c:386 do_fast_syscall_32+0x32/0x80 arch/x86/entry/common.c:411 entry_SYSENTER_compat_after_hwframe+0x84/0x8e RIP: 0023:0xf7268579 Code: Unable to access opcode bytes at 0xf726854f. RSP: 002b:00000000ffecd57c EFLAGS: 00000282 ORIG_RAX: 00000000000000fc RAX: ffffffffffffffda RBX: 0000000000000001 RCX: 00000000ffecd680 RDX: 00000000f7294997 RSI: 0000000000000000 RDI: 00000000f730f159 RBP: 00000000ffecd5d8 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000293 R12: 0000000000000000 R13: 0000000000000000 R14: 0000000000000000 R15: 0000000000000000 Allocated by task 13102: kasan_save_stack+0x33/0x60 mm/kasan/common.c:47 kasan_save_track+0x14/0x30 mm/kasan/common.c:68 poison_kmalloc_redzone mm/kasan/common.c:370 [inline] __kasan_kmalloc+0xaa/0xb0 mm/kasan/common.c:387 kasan_kmalloc include/linux/kasan.h:211 [inline] __do_kmalloc_node mm/slub.c:4121 [inline] __kmalloc_noprof+0x1ec/0x420 mm/slub.c:4134 kmalloc_noprof include/linux/slab.h:664 [inline] sk_prot_alloc+0x1a8/0x2a0 net/core/sock.c:2080 sk_alloc+0x36/0xb90 net/core/sock.c:2133 bt_sock_alloc+0x3b/0x3a0 net/bluetooth/af_bluetooth.c:148 sco_sock_alloc net/bluetooth/sco.c:500 [inline] sco_sock_create+0xe3/0x3c0 net/bluetooth/sco.c:531 bt_sock_create+0x182/0x350 net/bluetooth/af_bluetooth.c:132 __sock_create+0x32e/0x800 net/socket.c:1571 sock_create net/socket.c:1622 [inline] __sys_socket_create net/socket.c:1659 [inline] __sys_socket+0x14f/0x260 net/socket.c:1706 __do_sys_socket net/socket.c:1720 [inline] __se_sys_socket net/socket.c:1718 [inline] __ia32_sys_socket+0x72/0xb0 net/socket.c:1718 do_syscall_32_irqs_on arch/x86/entry/common.c:165 [inline] __do_fast_syscall_32+0x73/0x120 arch/x86/entry/common.c:386 do_fast_syscall_32+0x32/0x80 arch/x86/entry/common.c:411 entry_SYSENTER_compat_after_hwframe+0x84/0x8e Freed by task 13102: kasan_save_stack+0x33/0x60 mm/kasan/common.c:47 kasan_save_track+0x14/0x30 mm/kasan/common.c:68 kasan_save_free_info+0x3b/0x60 mm/kasan/generic.c:579 poison_slab_object+0xf7/0x160 mm/kasan/common.c:240 __kasan_slab_free+0x32/0x50 mm/kasan/common.c:256 kasan_slab_free include/linux/kasan.h:184 [inline] slab_free_hook mm/slub.c:2195 [inline] slab_free mm/slub.c:4436 [inline] kfree+0x12a/0x3b0 mm/slub.c:4557 sk_prot_free net/core/sock.c:2116 [inline] __sk_destruct+0x5d8/0x730 net/core/sock.c:2208 sk_destruct+0xc2/0xf0 net/core/sock.c:2223 __sk_free+0xf4/0x3e0 net/core/sock.c:2234 sk_free+0x7c/0xa0 net/core/sock.c:2245 sock_put include/net/sock.h:1879 [inline] sco_sock_kill net/bluetooth/sco.c:431 [inline] sco_sock_kill+0x19d/0x1c0 net/bluetooth/sco.c:421 sco_sock_release+0x154/0x2d0 net/bluetooth/sco.c:1259 __sock_release+0xb0/0x270 net/socket.c:659 sock_close+0x1c/0x30 net/socket.c:1421 __fput+0x408/0xbb0 fs/file_table.c:422 task_work_run+0x14e/0x250 kernel/task_work.c:180 get_signal+0x1d3/0x2670 kernel/signal.c:2681 arch_do_signal_or_restart+0x90/0x7e0 arch/x86/kernel/signal.c:310 exit_to_user_mode_loop kernel/entry/common.c:111 [inline] exit_to_user_mode_prepare include/linux/entry-common.h:328 [inline] __syscall_exit_to_user_mode_work kernel/entry/common.c:207 [inline] syscall_exit_to_user_mode+0x14a/0x2a0 kernel/entry/common.c:218 __do_fast_syscall_32+0x80/0x120 arch/x86/entry/common.c:389 do_fast_syscall_32+0x32/0x80 arch/x86/entry/common.c:411 entry_SYSENTER_compat_after_hwframe+0x84/0x8e The buggy address belongs to the object at ffff888011a3f000 which belongs to the cache kmalloc-2k of size 2048 The buggy address is located 128 bytes inside of freed 2048-byte region [ffff888011a3f000, ffff888011a3f800) The buggy address belongs to the physical page: page: refcount:1 mapcount:0 mapping:0000000000000000 index:0xffff888011a3f000 pfn:0x11a38 head: order:3 mapcount:0 entire_mapcount:0 nr_pages_mapped:0 pincount:0 flags: 0xfff00000000240(workingset|head|node=0|zone=1|lastcpupid=0x7ff) page_type: 0xffffefff(slab) raw: 00fff00000000240 ffff888015442f00 ffffea0000a7c210 ffffea000046da10 raw: ffff888011a3f000 0000000000080002 00000001ffffefff 0000000000000000 head: 00fff00000000240 ffff888015442f00 ffffea0000a7c210 ffffea000046da10 head: ffff888011a3f000 0000000000080002 00000001ffffefff 0000000000000000 head: 00fff00000000003 ffffea0000468e01 ffffffffffffffff 0000000000000000 head: 0000000000000008 0000000000000000 00000000ffffffff 0000000000000000 page dumped because: kasan: bad access detected page_owner tracks the page as allocated page last allocated via order 3, migratetype Unmovable, gfp_mask 0x1d20c0(__GFP_IO|__GFP_FS|__GFP_NOWARN|__GFP_NORETRY|__GFP_COMP|__GFP_NOMEMALLOC|__GFP_HARDWALL), pid 6362, tgid 6362 (syz-executor.0), ts 87151220495, free_ts 87143239848 set_page_owner include/linux/page_owner.h:32 [inline] post_alloc_hook+0x2d1/0x350 mm/page_alloc.c:1468 prep_new_page mm/page_alloc.c:1476 [inline] get_page_from_freelist+0x136a/0x2df0 mm/page_alloc.c:3402 __alloc_pages_noprof+0x22b/0x2460 mm/page_alloc.c:4660 __alloc_pages_node_noprof include/linux/gfp.h:269 [inline] alloc_pages_node_noprof include/linux/gfp.h:296 [inline] alloc_slab_page+0x56/0x110 mm/slub.c:2264 allocate_slab mm/slub.c:2427 [inline] new_slab+0x84/0x260 mm/slub.c:2480 ___slab_alloc+0xdac/0x1870 mm/slub.c:3666 __slab_alloc.constprop.0+0x56/0xb0 mm/slub.c:3756 __slab_alloc_node mm/slub.c:3809 [inline] slab_alloc_node mm/slub.c:3988 [inline] __do_kmalloc_node mm/slub.c:4120 [inline] __kmalloc_node_noprof+0x36c/0x450 mm/slub.c:4128 kmalloc_node_noprof include/linux/slab.h:681 [inline] qdisc_alloc+0xb3/0xbd0 net/sched/sch_generic.c:944 qdisc_create_dflt+0x73/0x440 net/sched/sch_generic.c:1006 attach_one_default_qdisc net/sched/sch_generic.c:1172 [inline] netdev_for_each_tx_queue include/linux/netdevice.h:2504 [inline] attach_default_qdiscs net/sched/sch_generic.c:1190 [inline] dev_activate+0x667/0x1310 net/sched/sch_generic.c:1249 __dev_open+0x396/0x4e0 net/core/dev.c:1481 __dev_change_flags+0x561/0x720 net/core/dev.c:8780 dev_change_flags+0x8f/0x160 net/core/dev.c:8852 do_setlink+0x19a6/0x3ea0 net/core/rtnetlink.c:2900 __rtnl_newlink+0xc3a/0x1960 net/core/rtnetlink.c:3696 page last free pid 5267 tgid 5267 stack trace: reset_page_owner include/linux/page_owner.h:25 [inline] free_pages_prepare mm/page_alloc.c:1088 [inline] free_unref_page+0x64a/0xe40 mm/page_alloc.c:2565 __put_partials+0x14c/0x170 mm/slub.c:2994 qlink_free mm/kasan/quarantine.c:163 [inline] qlist_free_all+0x4e/0x140 mm/kasan/quarantine.c:179 kasan_quarantine_reduce+0x192/0x1e0 mm/kasan/quarantine.c:286 __kasan_slab_alloc+0x69/0x90 mm/kasan/common.c:322 kasan_slab_alloc include/linux/kasan.h:201 [inline] slab_post_alloc_hook mm/slub.c:3940 [inline] slab_alloc_node mm/slub.c:4000 [inline] __do_kmalloc_node mm/slub.c:4120 [inline] __kmalloc_noprof+0x19d/0x420 mm/slub.c:4134 kmalloc_noprof include/linux/slab.h:664 [inline] kzalloc_noprof include/linux/slab.h:778 [inline] fib6_info_alloc+0x40/0x160 net/ipv6/ip6_fib.c:155 ip6_route_info_create+0x337/0x1ae0 net/ipv6/route.c:3759 ip6_route_add+0x26/0x190 net/ipv6/route.c:3851 addrconf_add_mroute+0x1de/0x350 net/ipv6/addrconf.c:2549 addrconf_add_dev+0x14e/0x1c0 net/ipv6/addrconf.c:2567 addrconf_dev_config net/ipv6/addrconf.c:3481 [inline] addrconf_init_auto_addrs+0x380/0x820 net/ipv6/addrconf.c:3569 addrconf_notify+0x6ef/0x19e0 net/ipv6/addrconf.c:3742 notifier_call_chain+0xb9/0x410 kernel/notifier.c:93 call_netdevice_notifiers_info+0xbe/0x140 net/core/dev.c:1992 netdev_state_change net/core/dev.c:1374 [inline] netdev_state_change+0x115/0x150 net/core/dev.c:1367 Memory state around the buggy address: ffff888011a3ef80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ffff888011a3f000: fa fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb >ffff888011a3f080: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ^ ffff888011a3f100: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ffff888011a3f180: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ==================================================================