================================================================== BUG: KASAN: use-after-free in instrument_atomic_read include/linux/instrumented.h:71 [inline] BUG: KASAN: use-after-free in atomic_long_read include/linux/atomic/atomic-instrumented.h:1183 [inline] BUG: KASAN: use-after-free in __down_read_trylock kernel/locking/rwsem.c:1348 [inline] BUG: KASAN: use-after-free in down_read_trylock+0x91/0x660 kernel/locking/rwsem.c:1624 Read of size 8 at addr ffff88811dc2d070 by task kworker/u4:1/5648 CPU: 0 PID: 5648 Comm: kworker/u4:1 Not tainted syzkaller #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 10/02/2025 Workqueue: writeback wb_workfn (flush-7:1) Call Trace: __dump_stack+0x21/0x30 lib/dump_stack.c:88 dump_stack_lvl+0xee/0x150 lib/dump_stack.c:106 print_address_description+0x7f/0x2c0 mm/kasan/report.c:248 __kasan_report mm/kasan/report.c:427 [inline] kasan_report+0xf1/0x140 mm/kasan/report.c:444 check_region_inline mm/kasan/generic.c:-1 [inline] kasan_check_range+0x280/0x290 mm/kasan/generic.c:189 __kasan_check_read+0x11/0x20 mm/kasan/shadow.c:31 instrument_atomic_read include/linux/instrumented.h:71 [inline] atomic_long_read include/linux/atomic/atomic-instrumented.h:1183 [inline] __down_read_trylock kernel/locking/rwsem.c:1348 [inline] down_read_trylock+0x91/0x660 kernel/locking/rwsem.c:1624 trylock_super+0x1f/0xf0 fs/super.c:418 __writeback_inodes_wb+0x119/0x400 fs/fs-writeback.c:2002 wb_writeback+0x403/0x980 fs/fs-writeback.c:2118 wb_check_old_data_flush fs/fs-writeback.c:2222 [inline] wb_do_writeback fs/fs-writeback.c:2275 [inline] wb_workfn+0x9ae/0xe20 fs/fs-writeback.c:2304 process_one_work+0x6be/0xba0 kernel/workqueue.c:2325 worker_thread+0xa59/0x1200 kernel/workqueue.c:2472 kthread+0x411/0x500 kernel/kthread.c:337 ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:287 Allocated by task 14146: kasan_save_stack mm/kasan/common.c:38 [inline] kasan_set_track mm/kasan/common.c:45 [inline] set_alloc_info mm/kasan/common.c:433 [inline] ____kasan_kmalloc mm/kasan/common.c:512 [inline] __kasan_kmalloc+0xda/0x110 mm/kasan/common.c:521 kasan_kmalloc include/linux/kasan.h:227 [inline] kmem_cache_alloc_trace+0x119/0x270 mm/slub.c:3274 kmalloc include/linux/slab.h:619 [inline] kzalloc include/linux/slab.h:750 [inline] alloc_super+0x5e/0x7f0 fs/super.c:203 sget+0x1e4/0x4c0 fs/super.c:637 mount_bdev+0xf6/0x3e0 fs/super.c:1373 f2fs_mount+0x34/0x40 fs/f2fs/super.c:4705 legacy_get_tree+0xed/0x190 fs/fs_context.c:611 vfs_get_tree+0x89/0x260 fs/super.c:1530 do_new_mount+0x25a/0xa20 fs/namespace.c:3034 path_mount+0x675/0x1020 fs/namespace.c:3364 do_mount fs/namespace.c:3377 [inline] __do_sys_mount fs/namespace.c:3585 [inline] __se_sys_mount+0x318/0x380 fs/namespace.c:3562 __x64_sys_mount+0xbf/0xd0 fs/namespace.c:3562 x64_sys_call+0x6bf/0x9a0 arch/x86/include/generated/asm/syscalls_64.h:166 do_syscall_x64 arch/x86/entry/common.c:50 [inline] do_syscall_64+0x4c/0xa0 arch/x86/entry/common.c:80 entry_SYSCALL_64_after_hwframe+0x66/0xd0 Freed by task 806: kasan_save_stack mm/kasan/common.c:38 [inline] kasan_set_track+0x4a/0x70 mm/kasan/common.c:45 kasan_set_free_info+0x23/0x40 mm/kasan/generic.c:370 ____kasan_slab_free+0x125/0x160 mm/kasan/common.c:365 __kasan_slab_free+0x11/0x20 mm/kasan/common.c:373 kasan_slab_free include/linux/kasan.h:193 [inline] slab_free_hook mm/slub.c:1728 [inline] slab_free_freelist_hook+0xc2/0x190 mm/slub.c:1754 slab_free mm/slub.c:3526 [inline] kfree+0xc4/0x270 mm/slub.c:4588 destroy_super_work+0x40/0x50 fs/super.c:165 process_one_work+0x6be/0xba0 kernel/workqueue.c:2325 worker_thread+0xa59/0x1200 kernel/workqueue.c:2472 kthread+0x411/0x500 kernel/kthread.c:337 ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:287 Last potentially related work creation: kasan_save_stack+0x3a/0x60 mm/kasan/common.c:38 __kasan_record_aux_stack+0xd2/0x100 mm/kasan/generic.c:348 kasan_record_aux_stack_noalloc+0xb/0x10 mm/kasan/generic.c:358 insert_work+0x51/0x310 kernel/workqueue.c:1373 __queue_work+0x8e5/0xc60 kernel/workqueue.c:1539 queue_work_on+0xd2/0x140 kernel/workqueue.c:1566 queue_work include/linux/workqueue.h:510 [inline] schedule_work include/linux/workqueue.h:571 [inline] destroy_super_rcu+0xd1/0xe0 fs/super.c:172 rcu_do_batch+0x51d/0xba0 kernel/rcu/tree.c:2523 rcu_core+0x5e4/0xf80 kernel/rcu/tree.c:2763 rcu_core_si+0x9/0x10 kernel/rcu/tree.c:2776 handle_softirqs+0x250/0x560 kernel/softirq.c:583 __do_softirq kernel/softirq.c:621 [inline] invoke_softirq kernel/softirq.c:443 [inline] __irq_exit_rcu+0x52/0xf0 kernel/softirq.c:670 irq_exit_rcu+0x9/0x10 kernel/softirq.c:682 instr_sysvec_apic_timer_interrupt arch/x86/kernel/apic/apic.c:1108 [inline] sysvec_apic_timer_interrupt+0xa9/0xc0 arch/x86/kernel/apic/apic.c:1108 asm_sysvec_apic_timer_interrupt+0x1b/0x20 arch/x86/include/asm/idtentry.h:676 Second to last potentially related work creation: kasan_save_stack+0x3a/0x60 mm/kasan/common.c:38 __kasan_record_aux_stack+0xd2/0x100 mm/kasan/generic.c:348 kasan_record_aux_stack_noalloc+0xb/0x10 mm/kasan/generic.c:358 __call_rcu_common kernel/rcu/tree.c:3011 [inline] call_rcu+0x105/0xfe0 kernel/rcu/tree.c:3129 __put_super+0x26b/0x2d0 fs/super.c:299 put_super fs/super.c:313 [inline] deactivate_locked_super+0xd4/0x100 fs/super.c:346 deactivate_super+0xaf/0xe0 fs/super.c:366 cleanup_mnt+0x446/0x500 fs/namespace.c:1148 __cleanup_mnt+0x19/0x20 fs/namespace.c:1155 task_work_run+0x127/0x190 kernel/task_work.c:188 exit_task_work include/linux/task_work.h:33 [inline] do_exit+0xa7e/0x27a0 kernel/exit.c:889 do_group_exit+0x141/0x310 kernel/exit.c:1003 __do_sys_exit_group kernel/exit.c:1014 [inline] __se_sys_exit_group kernel/exit.c:1012 [inline] __x64_sys_exit_group+0x3f/0x40 kernel/exit.c:1012 x64_sys_call+0x832/0x9a0 arch/x86/include/generated/asm/syscalls_64.h:232 do_syscall_x64 arch/x86/entry/common.c:50 [inline] do_syscall_64+0x4c/0xa0 arch/x86/entry/common.c:80 entry_SYSCALL_64_after_hwframe+0x66/0xd0 The buggy address belongs to the object at ffff88811dc2d000 which belongs to the cache kmalloc-2k of size 2048 The buggy address is located 112 bytes inside of 2048-byte region [ffff88811dc2d000, ffff88811dc2d800) The buggy address belongs to the page: page:ffffea0004770a00 refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x11dc28 head:ffffea0004770a00 order:3 compound_mapcount:0 compound_pincount:0 flags: 0x4000000000010200(slab|head|zone=1) raw: 4000000000010200 0000000000000000 0000000100000001 ffff888100043200 raw: 0000000000000000 0000000000080008 00000001ffffffff 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 0xd20c0(__GFP_IO|__GFP_FS|__GFP_NOWARN|__GFP_NORETRY|__GFP_COMP|__GFP_NOMEMALLOC), pid 271, ts 18930237005, free_ts 0 set_page_owner include/linux/page_owner.h:33 [inline] post_alloc_hook+0x192/0x1b0 mm/page_alloc.c:2605 prep_new_page+0x1c/0x110 mm/page_alloc.c:2611 get_page_from_freelist+0x2cc5/0x2d50 mm/page_alloc.c:4485 __alloc_pages+0x18f/0x440 mm/page_alloc.c:5808 alloc_slab_page mm/slub.c:-1 [inline] allocate_slab mm/slub.c:1937 [inline] new_slab+0xa1/0x4d0 mm/slub.c:2000 ___slab_alloc+0x381/0x810 mm/slub.c:3033 __slab_alloc+0x49/0x90 mm/slub.c:3120 slab_alloc_node mm/slub.c:3211 [inline] slab_alloc mm/slub.c:3255 [inline] __kmalloc+0x16a/0x2c0 mm/slub.c:4432 __kmalloc_node include/linux/slab.h:487 [inline] kmalloc_node include/linux/slab.h:642 [inline] kvmalloc_node+0x206/0x300 mm/util.c:621 kvmalloc include/linux/mm.h:862 [inline] kvmalloc_array include/linux/mm.h:880 [inline] bpf_int_jit_compile+0x3c7/0xcc60 arch/x86/net/bpf_jit_comp.c:2405 bpf_prog_select_runtime+0x6f1/0x9f0 kernel/bpf/core.c:1934 bpf_migrate_filter net/core/filter.c:1307 [inline] bpf_prepare_filter+0x1014/0x11c0 net/core/filter.c:1355 bpf_prog_create_from_user+0x2c7/0x410 net/core/filter.c:1449 seccomp_prepare_filter kernel/seccomp.c:669 [inline] seccomp_prepare_user_filter kernel/seccomp.c:706 [inline] seccomp_set_mode_filter kernel/seccomp.c:1834 [inline] do_seccomp+0x7b1/0x1410 kernel/seccomp.c:1954 prctl_set_seccomp+0x4c/0x60 kernel/seccomp.c:2007 __do_sys_prctl kernel/sys.c:2447 [inline] __se_sys_prctl+0x4e4/0x10a0 kernel/sys.c:2365 page_owner free stack trace missing Memory state around the buggy address: ffff88811dc2cf00: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ffff88811dc2cf80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc >ffff88811dc2d000: fa fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ^ ffff88811dc2d080: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ffff88811dc2d100: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ==================================================================