================================================================== BUG: KASAN: slab-use-after-free in ref_tracker_free+0x55a/0x6c0 lib/ref_tracker.c:311 Read of size 1 at addr ffff8880271417d0 by task kworker/u32:27/17718 CPU: 3 UID: 0 PID: 17718 Comm: kworker/u32:27 Tainted: G L syzkaller #0 PREEMPT(full) Tainted: [L]=SOFTLOCKUP Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2 04/01/2014 Workqueue: events_unbound linkwatch_event Call Trace: __dump_stack lib/dump_stack.c:94 [inline] dump_stack_lvl+0x100/0x190 lib/dump_stack.c:120 print_address_description mm/kasan/report.c:378 [inline] print_report+0x13d/0x4b0 mm/kasan/report.c:482 kasan_report+0xdf/0x1d0 mm/kasan/report.c:595 ref_tracker_free+0x55a/0x6c0 lib/ref_tracker.c:311 netdev_tracker_free include/linux/netdevice.h:4491 [inline] netdev_put include/linux/netdevice.h:4508 [inline] netdev_put include/linux/netdevice.h:4504 [inline] netdev_watchdog_down net/sched/sch_generic.c:600 [inline] dev_deactivate_many+0x293/0xff0 net/sched/sch_generic.c:1363 dev_deactivate+0x109/0x1d0 net/sched/sch_generic.c:1397 linkwatch_do_dev net/core/link_watch.c:184 [inline] linkwatch_do_dev+0xd3/0x120 net/core/link_watch.c:166 __linkwatch_run_queue+0x3a9/0x900 net/core/link_watch.c:240 linkwatch_event+0x8f/0xc0 net/core/link_watch.c:314 process_one_work+0xa0e/0x1980 kernel/workqueue.c:3302 process_scheduled_works kernel/workqueue.c:3385 [inline] worker_thread+0x5ef/0xe50 kernel/workqueue.c:3466 kthread+0x370/0x450 kernel/kthread.c:436 ret_from_fork+0x72b/0xd50 arch/x86/kernel/process.c:158 ret_from_fork_asm+0x1a/0x30 arch/x86/entry/entry_64.S:245 Allocated by task 17723: kasan_save_stack+0x30/0x50 mm/kasan/common.c:57 kasan_save_track+0x14/0x30 mm/kasan/common.c:78 poison_kmalloc_redzone mm/kasan/common.c:398 [inline] __kasan_kmalloc+0xaa/0xb0 mm/kasan/common.c:415 kmalloc_noprof include/linux/slab.h:950 [inline] slab_free_hook mm/slub.c:2641 [inline] slab_free mm/slub.c:6246 [inline] kmem_cache_free+0x41e/0x6c0 mm/slub.c:6373 __io_req_caches_free+0x1a6/0x220 io_uring/io_uring.c:2136 io_req_caches_free+0x20/0x40 io_uring/io_uring.c:2148 io_ring_exit_work+0x418/0xd40 io_uring/io_uring.c:2350 process_one_work+0xa0e/0x1980 kernel/workqueue.c:3302 process_scheduled_works kernel/workqueue.c:3385 [inline] worker_thread+0x5ef/0xe50 kernel/workqueue.c:3466 kthread+0x370/0x450 kernel/kthread.c:436 ret_from_fork+0x72b/0xd50 arch/x86/kernel/process.c:158 ret_from_fork_asm+0x1a/0x30 arch/x86/entry/entry_64.S:245 Freed by task 33: kasan_save_stack+0x30/0x50 mm/kasan/common.c:57 kasan_save_track+0x14/0x30 mm/kasan/common.c:78 kasan_save_free_info+0x3b/0x70 mm/kasan/generic.c:584 poison_slab_object mm/kasan/common.c:253 [inline] __kasan_slab_free+0x5f/0x80 mm/kasan/common.c:285 kasan_slab_free include/linux/kasan.h:235 [inline] slab_free_hook mm/slub.c:2689 [inline] slab_free mm/slub.c:6246 [inline] kfree+0x223/0x6c0 mm/slub.c:6561 slab_free_after_rcu_debug+0x4c/0x170 mm/slub.c:6295 rcu_do_batch kernel/rcu/tree.c:2617 [inline] rcu_core+0x5a2/0x10d0 kernel/rcu/tree.c:2869 handle_softirqs+0x1ea/0xa00 kernel/softirq.c:622 run_ksoftirqd kernel/softirq.c:1076 [inline] run_ksoftirqd+0x38/0x60 kernel/softirq.c:1068 smpboot_thread_fn+0x3d3/0xaa0 kernel/smpboot.c:160 kthread+0x370/0x450 kernel/kthread.c:436 ret_from_fork+0x72b/0xd50 arch/x86/kernel/process.c:158 ret_from_fork_asm+0x1a/0x30 arch/x86/entry/entry_64.S:245 Last potentially related work creation: kasan_save_stack+0x30/0x50 mm/kasan/common.c:57 kasan_record_aux_stack+0xa7/0xc0 mm/kasan/generic.c:556 __call_rcu_common.constprop.0+0xa5/0x9b0 kernel/rcu/tree.c:3131 slab_free_hook mm/slub.c:2653 [inline] slab_free mm/slub.c:6246 [inline] kmem_cache_free+0x44a/0x6c0 mm/slub.c:6373 __io_req_caches_free+0x1a6/0x220 io_uring/io_uring.c:2136 io_req_caches_free+0x20/0x40 io_uring/io_uring.c:2148 io_ring_exit_work+0x418/0xd40 io_uring/io_uring.c:2350 process_one_work+0xa0e/0x1980 kernel/workqueue.c:3302 process_scheduled_works kernel/workqueue.c:3385 [inline] worker_thread+0x5ef/0xe50 kernel/workqueue.c:3466 kthread+0x370/0x450 kernel/kthread.c:436 ret_from_fork+0x72b/0xd50 arch/x86/kernel/process.c:158 ret_from_fork_asm+0x1a/0x30 arch/x86/entry/entry_64.S:245 The buggy address belongs to the object at ffff8880271417c0 which belongs to the cache kmalloc-32 of size 32 The buggy address is located 16 bytes inside of freed 32-byte region [ffff8880271417c0, ffff8880271417e0) The buggy address belongs to the physical page: page: refcount:0 mapcount:0 mapping:0000000000000000 index:0xffff888027141580 pfn:0x27141 flags: 0xfff00000000200(workingset|node=0|zone=1|lastcpupid=0x7ff) page_type: f5(slab) raw: 00fff00000000200 ffff88801b842780 ffffea0000e26b90 ffffea0001899790 raw: ffff888027141580 000000080040003e 00000000f5000000 0000000000000000 page dumped because: kasan: bad access detected page_owner tracks the page as allocated page last allocated via order 0, migratetype Unmovable, gfp_mask 0xd2800(GFP_NOWAIT|__GFP_NORETRY|__GFP_COMP|__GFP_NOMEMALLOC), pid 5730, tgid 5730 (syz-executor), ts 101774267304, free_ts 101769941306 set_page_owner include/linux/page_owner.h:32 [inline] post_alloc_hook+0x153/0x170 mm/page_alloc.c:1858 prep_new_page mm/page_alloc.c:1866 [inline] get_page_from_freelist+0x11a6/0x33b0 mm/page_alloc.c:3946 __alloc_frozen_pages_noprof+0x27c/0x2bc0 mm/page_alloc.c:5226 alloc_slab_page mm/slub.c:3278 [inline] allocate_slab mm/slub.c:3467 [inline] new_slab+0xa6/0x6c0 mm/slub.c:3525 refill_objects+0x277/0x420 mm/slub.c:7251 refill_sheaf mm/slub.c:2816 [inline] __pcs_replace_empty_main+0x375/0x650 mm/slub.c:4651 alloc_from_pcs mm/slub.c:4749 [inline] slab_alloc_node mm/slub.c:4883 [inline] __kmalloc_cache_noprof+0x493/0x6f0 mm/slub.c:5410 kmalloc_noprof include/linux/slab.h:950 [inline] slab_free_hook mm/slub.c:2641 [inline] slab_free mm/slub.c:6246 [inline] kmem_cache_free+0x41e/0x6c0 mm/slub.c:6373 file_free fs/file_table.c:104 [inline] __fput+0x68d/0xb50 fs/file_table.c:523 fput_close_sync+0x118/0x250 fs/file_table.c:615 __do_sys_close fs/open.c:1507 [inline] __se_sys_close fs/open.c:1492 [inline] __x64_sys_close+0x8b/0x120 fs/open.c:1492 do_syscall_x64 arch/x86/entry/syscall_64.c:63 [inline] do_syscall_64+0x10b/0xf80 arch/x86/entry/syscall_64.c:94 entry_SYSCALL_64_after_hwframe+0x77/0x7f page last free pid 8162 tgid 8155 stack trace: reset_page_owner include/linux/page_owner.h:25 [inline] __free_pages_prepare mm/page_alloc.c:1402 [inline] __free_frozen_pages+0x747/0x1040 mm/page_alloc.c:2943 tlb_batch_list_free mm/mmu_gather.c:161 [inline] tlb_finish_mmu+0x27d/0x810 mm/mmu_gather.c:552 exit_mmap+0x454/0xa10 mm/mmap.c:1313 __mmput+0x12a/0x410 kernel/fork.c:1178 mmput+0x67/0x80 kernel/fork.c:1201 exit_mm kernel/exit.c:581 [inline] do_exit+0x833/0x2a60 kernel/exit.c:963 do_group_exit+0xd5/0x2a0 kernel/exit.c:1117 get_signal+0x1ec7/0x21e0 kernel/signal.c:3037 arch_do_signal_or_restart+0x91/0x7a0 arch/x86/kernel/signal.c:337 __exit_to_user_mode_loop kernel/entry/common.c:64 [inline] exit_to_user_mode_loop+0x86/0x4a0 kernel/entry/common.c:98 __exit_to_user_mode_prepare include/linux/irq-entry-common.h:207 [inline] syscall_exit_to_user_mode_prepare include/linux/irq-entry-common.h:238 [inline] syscall_exit_to_user_mode include/linux/entry-common.h:318 [inline] do_syscall_64+0x706/0xf80 arch/x86/entry/syscall_64.c:100 entry_SYSCALL_64_after_hwframe+0x77/0x7f Memory state around the buggy address: ffff888027141680: 00 00 00 00 fc fc fc fc 00 00 00 00 fc fc fc fc ffff888027141700: 00 00 00 00 fc fc fc fc 00 00 00 00 fc fc fc fc >ffff888027141780: 00 00 00 00 fc fc fc fc fa fb fb fb fc fc fc fc ^ ffff888027141800: 00 00 00 00 fc fc fc fc fa fb fb fb fc fc fc fc ffff888027141880: 00 00 00 fc fc fc fc fc 00 00 00 00 fc fc fc fc ==================================================================