================================================================== BUG: KASAN: use-after-free in instrument_atomic_read_write include/linux/instrumented.h:96 [inline] BUG: KASAN: use-after-free in atomic_fetch_add_relaxed include/linux/atomic/atomic-instrumented.h:252 [inline] BUG: KASAN: use-after-free in __refcount_add include/linux/refcount.h:184 [inline] BUG: KASAN: use-after-free in __refcount_inc include/linux/refcount.h:241 [inline] BUG: KASAN: use-after-free in refcount_inc include/linux/refcount.h:258 [inline] BUG: KASAN: use-after-free in sock_hold include/net/sock.h:781 [inline] BUG: KASAN: use-after-free in sco_conn_del+0xa5/0x310 net/bluetooth/sco.c:199 Write of size 4 at addr ffff888062671080 by task syz-executor/7095 CPU: 0 UID: 0 PID: 7095 Comm: syz-executor Not tainted 6.12.0-rc1-syzkaller-00163-gb63c755cb65d #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 09/13/2024 Call Trace: __dump_stack lib/dump_stack.c:94 [inline] dump_stack_lvl+0x241/0x360 lib/dump_stack.c:120 print_address_description mm/kasan/report.c:377 [inline] print_report+0x169/0x550 mm/kasan/report.c:488 kasan_report+0x143/0x180 mm/kasan/report.c:601 kasan_check_range+0x282/0x290 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:781 [inline] sco_conn_del+0xa5/0x310 net/bluetooth/sco.c:199 hci_disconn_cfm include/net/bluetooth/hci_core.h:1975 [inline] hci_conn_hash_flush+0xff/0x240 net/bluetooth/hci_conn.c:2589 hci_dev_close_sync+0x9ef/0x11a0 net/bluetooth/hci_sync.c:5195 hci_dev_do_close net/bluetooth/hci_core.c:483 [inline] hci_unregister_dev+0x20b/0x510 net/bluetooth/hci_core.c:2698 vhci_release+0x80/0xd0 drivers/bluetooth/hci_vhci.c:664 __fput+0x23f/0x880 fs/file_table.c:431 task_work_run+0x24f/0x310 kernel/task_work.c:228 exit_task_work include/linux/task_work.h:40 [inline] do_exit+0xa2f/0x28e0 kernel/exit.c:939 do_group_exit+0x207/0x2c0 kernel/exit.c:1088 __do_sys_exit_group kernel/exit.c:1099 [inline] __se_sys_exit_group kernel/exit.c:1097 [inline] __x64_sys_exit_group+0x3f/0x40 kernel/exit.c:1097 x64_sys_call+0x2634/0x2640 arch/x86/include/generated/asm/syscalls_64.h:232 do_syscall_x64 arch/x86/entry/common.c:52 [inline] do_syscall_64+0xf3/0x230 arch/x86/entry/common.c:83 entry_SYSCALL_64_after_hwframe+0x77/0x7f RIP: 0033:0x7f703237dff9 Code: Unable to access opcode bytes at 0x7f703237dfcf. RSP: 002b:00007ffc783632c8 EFLAGS: 00000246 ORIG_RAX: 00000000000000e7 RAX: ffffffffffffffda RBX: 0000000000000000 RCX: 00007f703237dff9 RDX: 0000000000000000 RSI: 0000000000000000 RDI: 0000000000000043 RBP: 00007f70323dd588 R08: 00007ffc78361067 R09: 0000000000000003 R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000001 R13: 0000000000000003 R14: 00000000ffffffff R15: 00007ffc78363470 The buggy address belongs to the physical page: page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x8 pfn:0x62671 flags: 0xfff00000000000(node=0|zone=1|lastcpupid=0x7ff) raw: 00fff00000000000 0000000000000000 ffffffffffffffff 0000000000000000 raw: 0000000000000008 0000000000000000 00000000ffffffff 0000000000000000 page dumped because: kasan: bad access detected page_owner tracks the page as freed page last allocated via order 3, migratetype Unmovable, gfp_mask 0xd20c0(__GFP_IO|__GFP_FS|__GFP_NOWARN|__GFP_NORETRY|__GFP_COMP|__GFP_NOMEMALLOC), pid 4684, tgid 4684 (udevd), ts 194248591082, free_ts 206675022469 set_page_owner include/linux/page_owner.h:32 [inline] post_alloc_hook+0x1f3/0x230 mm/page_alloc.c:1537 prep_new_page mm/page_alloc.c:1545 [inline] get_page_from_freelist+0x3045/0x3190 mm/page_alloc.c:3457 __alloc_pages_noprof+0x256/0x6c0 mm/page_alloc.c:4733 alloc_pages_mpol_noprof+0x3e8/0x680 mm/mempolicy.c:2265 alloc_slab_page+0x6a/0x120 mm/slub.c:2413 allocate_slab+0x5a/0x2f0 mm/slub.c:2579 new_slab mm/slub.c:2632 [inline] ___slab_alloc+0xcd1/0x14b0 mm/slub.c:3819 __slab_alloc+0x58/0xa0 mm/slub.c:3909 __slab_alloc_node mm/slub.c:3962 [inline] slab_alloc_node mm/slub.c:4123 [inline] kmem_cache_alloc_noprof+0x1c1/0x2a0 mm/slub.c:4142 getname_flags+0xb7/0x540 fs/namei.c:139 getname fs/namei.c:225 [inline] __do_sys_unlink fs/namei.c:4581 [inline] __se_sys_unlink fs/namei.c:4579 [inline] __x64_sys_unlink+0x3a/0x50 fs/namei.c:4579 do_syscall_x64 arch/x86/entry/common.c:52 [inline] do_syscall_64+0xf3/0x230 arch/x86/entry/common.c:83 entry_SYSCALL_64_after_hwframe+0x77/0x7f page last free pid 2870 tgid 2870 stack trace: reset_page_owner include/linux/page_owner.h:25 [inline] free_pages_prepare mm/page_alloc.c:1108 [inline] free_unref_page+0xcfb/0xf20 mm/page_alloc.c:2638 discard_slab mm/slub.c:2678 [inline] __put_partials+0xeb/0x130 mm/slub.c:3146 put_cpu_partial+0x17c/0x250 mm/slub.c:3221 __slab_free+0x2ea/0x3d0 mm/slub.c:4450 qlink_free mm/kasan/quarantine.c:163 [inline] qlist_free_all+0x9a/0x140 mm/kasan/quarantine.c:179 kasan_quarantine_reduce+0x14f/0x170 mm/kasan/quarantine.c:286 __kasan_slab_alloc+0x23/0x80 mm/kasan/common.c:329 kasan_slab_alloc include/linux/kasan.h:247 [inline] slab_post_alloc_hook mm/slub.c:4086 [inline] slab_alloc_node mm/slub.c:4135 [inline] kmem_cache_alloc_node_noprof+0x16b/0x320 mm/slub.c:4187 __alloc_skb+0x1c3/0x440 net/core/skbuff.c:668 alloc_skb include/linux/skbuff.h:1322 [inline] nlmsg_new include/net/netlink.h:1015 [inline] rtmsg_ifa+0x1f0/0x3b0 net/ipv4/devinet.c:1932 __inet_del_ifa+0x870/0x1040 net/ipv4/devinet.c:446 inet_del_ifa net/ipv4/devinet.c:484 [inline] inetdev_destroy net/ipv4/devinet.c:337 [inline] inetdev_event+0x6a5/0x1550 net/ipv4/devinet.c:1628 notifier_call_chain+0x19f/0x3e0 kernel/notifier.c:93 call_netdevice_notifiers_extack net/core/dev.c:2034 [inline] call_netdevice_notifiers net/core/dev.c:2048 [inline] unregister_netdevice_many_notify+0xedd/0x1da0 net/core/dev.c:11403 unregister_netdevice_many net/core/dev.c:11465 [inline] default_device_exit_batch+0xa1f/0xaa0 net/core/dev.c:11948 ops_exit_list net/core/net_namespace.c:178 [inline] cleanup_net+0x89d/0xcc0 net/core/net_namespace.c:626 Memory state around the buggy address: ffff888062670f80: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ffff888062671000: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff >ffff888062671080: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ^ ffff888062671100: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ffff888062671180: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ==================================================================