================================================================== 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_sock_timeout+0x67/0x240 net/bluetooth/sco.c:88 Write of size 4 at addr ffff88804ed99080 by task kworker/1:2/56 CPU: 1 PID: 56 Comm: kworker/1:2 Not tainted 6.9.0-rc5-syzkaller-00159-gc942a0cd3603 #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 03/27/2024 Workqueue: events sco_sock_timeout Call Trace: __dump_stack lib/dump_stack.c:88 [inline] dump_stack_lvl+0x241/0x360 lib/dump_stack.c:114 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:774 [inline] sco_sock_timeout+0x67/0x240 net/bluetooth/sco.c:88 process_one_work kernel/workqueue.c:3254 [inline] process_scheduled_works+0xa10/0x17c0 kernel/workqueue.c:3335 worker_thread+0x86d/0xd70 kernel/workqueue.c:3416 kthread+0x2f0/0x390 kernel/kthread.c:388 ret_from_fork+0x4b/0x80 arch/x86/kernel/process.c:147 ret_from_fork_asm+0x1a/0x30 arch/x86/entry/entry_64.S:244 Allocated by task 5194: kasan_save_stack mm/kasan/common.c:47 [inline] kasan_save_track+0x3f/0x80 mm/kasan/common.c:68 poison_kmalloc_redzone mm/kasan/common.c:370 [inline] __kasan_kmalloc+0x98/0xb0 mm/kasan/common.c:387 kasan_kmalloc include/linux/kasan.h:211 [inline] __do_kmalloc_node mm/slub.c:3966 [inline] __kmalloc_node_track_caller+0x24e/0x4e0 mm/slub.c:3986 kmalloc_reserve+0x111/0x2a0 net/core/skbuff.c:599 pskb_expand_head+0x202/0x1390 net/core/skbuff.c:2245 netlink_trim+0x183/0x220 net/netlink/af_netlink.c:1317 netlink_broadcast_filtered+0x76/0x1290 net/netlink/af_netlink.c:1523 nlmsg_multicast_filtered include/net/netlink.h:1111 [inline] nlmsg_multicast include/net/netlink.h:1130 [inline] nlmsg_notify+0xfb/0x1c0 net/netlink/af_netlink.c:2602 netdev_state_change+0x139/0x1a0 net/core/dev.c:1334 linkwatch_do_dev+0x112/0x170 net/core/link_watch.c:177 __linkwatch_run_queue+0x44f/0x6c0 net/core/link_watch.c:234 linkwatch_event+0x4c/0x60 net/core/link_watch.c:277 process_one_work kernel/workqueue.c:3254 [inline] process_scheduled_works+0xa10/0x17c0 kernel/workqueue.c:3335 worker_thread+0x86d/0xd70 kernel/workqueue.c:3416 kthread+0x2f0/0x390 kernel/kthread.c:388 ret_from_fork+0x4b/0x80 arch/x86/kernel/process.c:147 ret_from_fork_asm+0x1a/0x30 arch/x86/entry/entry_64.S:244 Freed by task 5194: kasan_save_stack mm/kasan/common.c:47 [inline] kasan_save_track+0x3f/0x80 mm/kasan/common.c:68 kasan_save_free_info+0x40/0x50 mm/kasan/generic.c:579 poison_slab_object+0xa6/0xe0 mm/kasan/common.c:240 __kasan_slab_free+0x37/0x60 mm/kasan/common.c:256 kasan_slab_free include/linux/kasan.h:184 [inline] slab_free_hook mm/slub.c:2106 [inline] slab_free mm/slub.c:4280 [inline] kfree+0x153/0x3a0 mm/slub.c:4390 skb_kfree_head net/core/skbuff.c:1096 [inline] skb_free_head net/core/skbuff.c:1108 [inline] skb_release_data+0x585/0x870 net/core/skbuff.c:1136 skb_release_all net/core/skbuff.c:1202 [inline] __kfree_skb net/core/skbuff.c:1216 [inline] consume_skb+0xb3/0x160 net/core/skbuff.c:1432 netlink_broadcast_filtered+0x1168/0x1290 net/netlink/af_netlink.c:1546 nlmsg_multicast_filtered include/net/netlink.h:1111 [inline] nlmsg_multicast include/net/netlink.h:1130 [inline] nlmsg_notify+0xfb/0x1c0 net/netlink/af_netlink.c:2602 netdev_state_change+0x139/0x1a0 net/core/dev.c:1334 linkwatch_do_dev+0x112/0x170 net/core/link_watch.c:177 __linkwatch_run_queue+0x44f/0x6c0 net/core/link_watch.c:234 linkwatch_event+0x4c/0x60 net/core/link_watch.c:277 process_one_work kernel/workqueue.c:3254 [inline] process_scheduled_works+0xa10/0x17c0 kernel/workqueue.c:3335 worker_thread+0x86d/0xd70 kernel/workqueue.c:3416 kthread+0x2f0/0x390 kernel/kthread.c:388 ret_from_fork+0x4b/0x80 arch/x86/kernel/process.c:147 ret_from_fork_asm+0x1a/0x30 arch/x86/entry/entry_64.S:244 The buggy address belongs to the object at ffff88804ed99000 which belongs to the cache kmalloc-2k of size 2048 The buggy address is located 128 bytes inside of freed 2048-byte region [ffff88804ed99000, ffff88804ed99800) The buggy address belongs to the physical page: page: refcount:1 mapcount:0 mapping:0000000000000000 index:0xffff88804ed9b000 pfn:0x4ed98 head: order:3 entire_mapcount:0 nr_pages_mapped:0 pincount:0 flags: 0xfff80000000a40(workingset|slab|head|node=0|zone=1|lastcpupid=0xfff) page_type: 0xffffffff() raw: 00fff80000000a40 ffff888015042000 ffffea00019c5e10 ffffea000190d410 raw: ffff88804ed9b000 0000000000080002 00000001ffffffff 0000000000000000 head: 00fff80000000a40 ffff888015042000 ffffea00019c5e10 ffffea000190d410 head: ffff88804ed9b000 0000000000080002 00000001ffffffff 0000000000000000 head: 00fff80000000003 ffffea00013b6601 dead000000000122 00000000ffffffff head: 0000000800000000 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 0x1d2820(GFP_ATOMIC|__GFP_NOWARN|__GFP_NORETRY|__GFP_COMP|__GFP_NOMEMALLOC|__GFP_HARDWALL), pid 5194, tgid -542559760 (kworker/1:7), ts 5194, free_ts 161654042046 set_page_owner include/linux/page_owner.h:32 [inline] post_alloc_hook+0x1ea/0x210 mm/page_alloc.c:1534 prep_new_page mm/page_alloc.c:1541 [inline] get_page_from_freelist+0x3410/0x35b0 mm/page_alloc.c:3317 __alloc_pages+0x256/0x6c0 mm/page_alloc.c:4575 __alloc_pages_node include/linux/gfp.h:238 [inline] alloc_pages_node include/linux/gfp.h:261 [inline] alloc_slab_page+0x5f/0x160 mm/slub.c:2175 allocate_slab mm/slub.c:2338 [inline] new_slab+0x84/0x2f0 mm/slub.c:2391 ___slab_alloc+0xc73/0x1260 mm/slub.c:3525 __slab_alloc mm/slub.c:3610 [inline] __slab_alloc_node mm/slub.c:3663 [inline] slab_alloc_node mm/slub.c:3835 [inline] __do_kmalloc_node mm/slub.c:3965 [inline] __kmalloc_node_track_caller+0x2d6/0x4e0 mm/slub.c:3986 kmalloc_reserve+0x111/0x2a0 net/core/skbuff.c:599 __alloc_skb+0x1f3/0x440 net/core/skbuff.c:668 alloc_skb include/linux/skbuff.h:1313 [inline] nlmsg_new include/net/netlink.h:1010 [inline] inet6_ifinfo_notify+0x72/0x120 net/ipv6/addrconf.c:6160 addrconf_notify+0xc6b/0x1020 net/ipv6/addrconf.c:3761 notifier_call_chain+0x19f/0x3e0 kernel/notifier.c:93 netdev_state_change+0x11f/0x1a0 net/core/dev.c:1332 linkwatch_do_dev+0x112/0x170 net/core/link_watch.c:177 __linkwatch_run_queue+0x44f/0x6c0 net/core/link_watch.c:234 linkwatch_event+0x4c/0x60 net/core/link_watch.c:277 page last free pid 5133 tgid 5133 stack trace: reset_page_owner include/linux/page_owner.h:25 [inline] free_pages_prepare mm/page_alloc.c:1141 [inline] free_unref_page_prepare+0x97b/0xaa0 mm/page_alloc.c:2347 free_unref_page+0x37/0x3f0 mm/page_alloc.c:2487 kasan_depopulate_vmalloc_pte+0x74/0x90 mm/kasan/shadow.c:408 apply_to_pte_range mm/memory.c:2744 [inline] apply_to_pmd_range mm/memory.c:2788 [inline] apply_to_pud_range mm/memory.c:2824 [inline] apply_to_p4d_range mm/memory.c:2860 [inline] __apply_to_page_range+0x8ec/0xe40 mm/memory.c:2894 kasan_release_vmalloc+0x9a/0xb0 mm/kasan/shadow.c:525 purge_vmap_node+0x3e3/0x770 mm/vmalloc.c:2183 __purge_vmap_area_lazy+0x715/0xaf0 mm/vmalloc.c:2265 drain_vmap_area_work+0x27/0x40 mm/vmalloc.c:2299 process_one_work kernel/workqueue.c:3254 [inline] process_scheduled_works+0xa10/0x17c0 kernel/workqueue.c:3335 worker_thread+0x86d/0xd70 kernel/workqueue.c:3416 kthread+0x2f0/0x390 kernel/kthread.c:388 ret_from_fork+0x4b/0x80 arch/x86/kernel/process.c:147 ret_from_fork_asm+0x1a/0x30 arch/x86/entry/entry_64.S:244 Memory state around the buggy address: ffff88804ed98f80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ffff88804ed99000: fa fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb >ffff88804ed99080: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ^ ffff88804ed99100: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ffff88804ed99180: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ==================================================================