================================================================== 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_dec_and_test include/linux/atomic/atomic-instrumented.h:1383 [inline] BUG: KASAN: slab-use-after-free in gfs2_qd_dealloc+0x7a/0xf0 fs/gfs2/quota.c:112 Write of size 4 at addr ffff888050e00b68 by task syz.7.1314/9843 CPU: 0 UID: 0 PID: 9843 Comm: syz.7.1314 Tainted: G L syzkaller #0 PREEMPT(full) Tainted: [L]=SOFTLOCKUP Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 10/25/2025 Call Trace: __dump_stack lib/dump_stack.c:94 [inline] dump_stack_lvl+0x116/0x1f0 lib/dump_stack.c:120 print_address_description mm/kasan/report.c:378 [inline] print_report+0xcd/0x630 mm/kasan/report.c:482 kasan_report+0xe0/0x110 mm/kasan/report.c:595 check_region_inline mm/kasan/generic.c:194 [inline] kasan_check_range+0x100/0x1b0 mm/kasan/generic.c:200 instrument_atomic_read_write include/linux/instrumented.h:96 [inline] atomic_dec_and_test include/linux/atomic/atomic-instrumented.h:1383 [inline] gfs2_qd_dealloc+0x7a/0xf0 fs/gfs2/quota.c:112 rcu_do_batch kernel/rcu/tree.c:2605 [inline] rcu_core+0x79c/0x15f0 kernel/rcu/tree.c:2857 handle_softirqs+0x219/0x950 kernel/softirq.c:622 __do_softirq kernel/softirq.c:656 [inline] invoke_softirq kernel/softirq.c:496 [inline] __irq_exit_rcu+0x109/0x170 kernel/softirq.c:723 irq_exit_rcu+0x9/0x30 kernel/softirq.c:739 instr_sysvec_apic_timer_interrupt arch/x86/kernel/apic/apic.c:1056 [inline] sysvec_apic_timer_interrupt+0xa4/0xc0 arch/x86/kernel/apic/apic.c:1056 asm_sysvec_apic_timer_interrupt+0x1a/0x20 arch/x86/include/asm/idtentry.h:697 RIP: 0010:unset_current_in_page_owner mm/page_owner.c:79 [inline] RIP: 0010:save_stack+0x1a6/0x1f0 mm/page_owner.c:169 Code: e8 cf 95 8c ff 8b 2d 59 d0 92 18 e8 c4 95 8c ff 48 b8 00 00 00 00 00 fc ff df 65 4c 8b 25 5a 7a 80 11 49 8d bc 24 d0 05 00 00 <48> 89 fa 48 c1 ea 03 0f b6 04 02 84 c0 74 04 3c 03 7e 27 41 80 a4 RSP: 0018:ffffc900039af3d8 EFLAGS: 00000246 RAX: dffffc0000000000 RBX: 1ffff92000735e7b RCX: ffffc9000c90c000 RDX: 0000000000080000 RSI: ffffffff823255ac RDI: ffff88802e406150 RBP: 0000000007ea0277 R08: 0000000000000005 R09: 0000000000000000 R10: 0000000007ea0277 R11: 000000000000a72d R12: ffff88802e405b80 R13: 0000000000002000 R14: dffffc0000000000 R15: 00000000044c01b0 __reset_page_owner+0x84/0x1a0 mm/page_owner.c:320 reset_page_owner include/linux/page_owner.h:25 [inline] free_pages_prepare mm/page_alloc.c:1406 [inline] free_unref_folios+0xa22/0x1610 mm/page_alloc.c:3000 folios_put_refs+0x4be/0x750 mm/swap.c:1002 folio_batch_release include/linux/pagevec.h:101 [inline] shmem_undo_range+0x58f/0x1140 mm/shmem.c:1137 shmem_truncate_range mm/shmem.c:1249 [inline] shmem_evict_inode+0x39e/0xbe0 mm/shmem.c:1379 evict+0x3c2/0xad0 fs/inode.c:837 iput_final fs/inode.c:1954 [inline] iput.part.0+0x621/0x1190 fs/inode.c:2006 iput+0x35/0x40 fs/inode.c:1969 dentry_unlink_inode+0x29c/0x480 fs/dcache.c:467 __dentry_kill+0x1d0/0x600 fs/dcache.c:670 finish_dput+0x76/0x480 fs/dcache.c:879 dput.part.0+0x451/0x570 fs/dcache.c:928 dput+0x1f/0x30 fs/dcache.c:920 __fput+0x51c/0xb70 fs/file_table.c:476 task_work_run+0x150/0x240 kernel/task_work.c:233 resume_user_mode_work include/linux/resume_user_mode.h:50 [inline] __exit_to_user_mode_loop kernel/entry/common.c:44 [inline] exit_to_user_mode_loop+0xfb/0x540 kernel/entry/common.c:75 __exit_to_user_mode_prepare include/linux/irq-entry-common.h:226 [inline] syscall_exit_to_user_mode_prepare include/linux/irq-entry-common.h:256 [inline] syscall_exit_to_user_mode_work include/linux/entry-common.h:159 [inline] syscall_exit_to_user_mode include/linux/entry-common.h:194 [inline] do_syscall_64+0x4ee/0xf80 arch/x86/entry/syscall_64.c:100 entry_SYSCALL_64_after_hwframe+0x77/0x7f RIP: 0033:0x7ff95a58e3aa Code: 48 3d 00 f0 ff ff 77 48 c3 0f 1f 80 00 00 00 00 48 83 ec 18 89 7c 24 0c e8 43 91 02 00 8b 7c 24 0c 89 c2 b8 03 00 00 00 0f 05 <48> 3d 00 f0 ff ff 77 36 89 d7 89 44 24 0c e8 a3 91 02 00 8b 44 24 RSP: 002b:00007ff95b33fe50 EFLAGS: 00000293 ORIG_RAX: 0000000000000003 RAX: 0000000000000000 RBX: ffffffffffffffff RCX: 00007ff95a58e3aa RDX: 0000000000000000 RSI: 0000000000000000 RDI: 0000000000000003 RBP: 0000000000000003 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000293 R12: 0000000000000005 R13: 00007ff95b33feb0 R14: 00000000000125c7 R15: 0000200000000180 Allocated by task 9843: kasan_save_stack+0x33/0x60 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:957 [inline] kzalloc_noprof include/linux/slab.h:1094 [inline] init_sbd fs/gfs2/ops_fstype.c:79 [inline] gfs2_fill_super+0x148/0x2f90 fs/gfs2/ops_fstype.c:1121 get_tree_bdev_flags+0x38c/0x620 fs/super.c:1691 gfs2_get_tree+0x4e/0x280 fs/gfs2/ops_fstype.c:1332 vfs_get_tree+0x8e/0x330 fs/super.c:1751 fc_mount fs/namespace.c:1199 [inline] do_new_mount_fc fs/namespace.c:3636 [inline] do_new_mount fs/namespace.c:3712 [inline] path_mount+0x7bf/0x23a0 fs/namespace.c:4022 do_mount fs/namespace.c:4035 [inline] __do_sys_mount fs/namespace.c:4224 [inline] __se_sys_mount fs/namespace.c:4201 [inline] __x64_sys_mount+0x293/0x310 fs/namespace.c:4201 do_syscall_x64 arch/x86/entry/syscall_64.c:63 [inline] do_syscall_64+0xcd/0xf80 arch/x86/entry/syscall_64.c:94 entry_SYSCALL_64_after_hwframe+0x77/0x7f Freed by task 9843: kasan_save_stack+0x33/0x60 mm/kasan/common.c:57 kasan_save_track+0x14/0x30 mm/kasan/common.c:78 kasan_save_free_info+0x3b/0x60 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:2540 [inline] slab_free mm/slub.c:6670 [inline] kfree+0x2f8/0x6e0 mm/slub.c:6878 free_sbd fs/gfs2/ops_fstype.c:72 [inline] gfs2_fill_super+0x15a3/0x2f90 fs/gfs2/ops_fstype.c:1316 get_tree_bdev_flags+0x38c/0x620 fs/super.c:1691 gfs2_get_tree+0x4e/0x280 fs/gfs2/ops_fstype.c:1332 vfs_get_tree+0x8e/0x330 fs/super.c:1751 fc_mount fs/namespace.c:1199 [inline] do_new_mount_fc fs/namespace.c:3636 [inline] do_new_mount fs/namespace.c:3712 [inline] path_mount+0x7bf/0x23a0 fs/namespace.c:4022 do_mount fs/namespace.c:4035 [inline] __do_sys_mount fs/namespace.c:4224 [inline] __se_sys_mount fs/namespace.c:4201 [inline] __x64_sys_mount+0x293/0x310 fs/namespace.c:4201 do_syscall_x64 arch/x86/entry/syscall_64.c:63 [inline] do_syscall_64+0xcd/0xf80 arch/x86/entry/syscall_64.c:94 entry_SYSCALL_64_after_hwframe+0x77/0x7f The buggy address belongs to the object at ffff888050e00000 which belongs to the cache kmalloc-8k of size 8192 The buggy address is located 2920 bytes inside of freed 8192-byte region [ffff888050e00000, ffff888050e02000) The buggy address belongs to the physical page: page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x50e00 head: order:3 mapcount:0 entire_mapcount:0 nr_pages_mapped:0 pincount:0 flags: 0xfff00000000040(head|node=0|zone=1|lastcpupid=0x7ff) page_type: f5(slab) raw: 00fff00000000040 ffff88813ff27280 ffffea0001e4a400 dead000000000002 raw: 0000000000000000 0000000080020002 00000000f5000000 0000000000000000 head: 00fff00000000040 ffff88813ff27280 ffffea0001e4a400 dead000000000002 head: 0000000000000000 0000000080020002 00000000f5000000 0000000000000000 head: 00fff00000000003 ffffea0001438001 00000000ffffffff 00000000ffffffff head: ffffffffffffffff 0000000000000000 00000000ffffffff 0000000000000008 page dumped because: kasan: bad access detected page_owner tracks the page as allocated page last allocated via order 3, migratetype Unmovable, gfp_mask 0x528c0(GFP_NOWAIT|__GFP_IO|__GFP_FS|__GFP_NORETRY|__GFP_COMP), pid 8410, tgid 8409 (syz.0.814), ts 247704810667, free_ts 247681378362 set_page_owner include/linux/page_owner.h:32 [inline] post_alloc_hook+0x1af/0x220 mm/page_alloc.c:1857 prep_new_page mm/page_alloc.c:1865 [inline] get_page_from_freelist+0xd0b/0x31a0 mm/page_alloc.c:3915 __alloc_frozen_pages_noprof+0x25f/0x2430 mm/page_alloc.c:5210 alloc_pages_mpol+0x1fb/0x550 mm/mempolicy.c:2486 alloc_slab_page mm/slub.c:3075 [inline] allocate_slab mm/slub.c:3248 [inline] new_slab+0x2c3/0x430 mm/slub.c:3302 ___slab_alloc+0xe18/0x1c90 mm/slub.c:4656 __slab_alloc.constprop.0+0x63/0x110 mm/slub.c:4779 __slab_alloc_node mm/slub.c:4855 [inline] slab_alloc_node mm/slub.c:5251 [inline] __do_kmalloc_node mm/slub.c:5656 [inline] __kvmalloc_node_noprof+0x592/0xa40 mm/slub.c:7136 alloc_heuristic_ws fs/btrfs/compression.c:713 [inline] alloc_workspace+0xf4/0x350 fs/btrfs/compression.c:745 alloc_workspace_manager+0x18e/0x600 fs/btrfs/compression.c:795 btrfs_alloc_compress_wsm+0x18/0xe0 fs/btrfs/compression.c:1117 open_ctree+0x1de8/0x7790 fs/btrfs/disk-io.c:3408 btrfs_fill_super fs/btrfs/super.c:981 [inline] btrfs_get_tree_super fs/btrfs/super.c:1944 [inline] btrfs_get_tree_subvol fs/btrfs/super.c:2087 [inline] btrfs_get_tree+0x12e2/0x2710 fs/btrfs/super.c:2121 vfs_get_tree+0x8e/0x330 fs/super.c:1751 fc_mount fs/namespace.c:1199 [inline] do_new_mount_fc fs/namespace.c:3636 [inline] do_new_mount fs/namespace.c:3712 [inline] path_mount+0x7bf/0x23a0 fs/namespace.c:4022 do_mount fs/namespace.c:4035 [inline] __do_sys_mount fs/namespace.c:4224 [inline] __se_sys_mount fs/namespace.c:4201 [inline] __x64_sys_mount+0x293/0x310 fs/namespace.c:4201 page last free pid 7327 tgid 7327 stack trace: reset_page_owner include/linux/page_owner.h:25 [inline] free_pages_prepare mm/page_alloc.c:1406 [inline] __free_frozen_pages+0x7df/0x1170 mm/page_alloc.c:2943 discard_slab mm/slub.c:3346 [inline] __put_partials+0x130/0x170 mm/slub.c:3886 qlink_free mm/kasan/quarantine.c:163 [inline] qlist_free_all+0x4c/0xf0 mm/kasan/quarantine.c:179 kasan_quarantine_reduce+0x195/0x1e0 mm/kasan/quarantine.c:286 __kasan_slab_alloc+0x69/0x90 mm/kasan/common.c:350 kasan_slab_alloc include/linux/kasan.h:253 [inline] slab_post_alloc_hook mm/slub.c:4953 [inline] slab_alloc_node mm/slub.c:5263 [inline] __kmalloc_cache_noprof+0x282/0x800 mm/slub.c:5771 kmalloc_noprof include/linux/slab.h:957 [inline] kzalloc_noprof include/linux/slab.h:1094 [inline] nsim_fib6_rt_create drivers/net/netdevsim/fib.c:547 [inline] nsim_fib6_rt_insert drivers/net/netdevsim/fib.c:752 [inline] nsim_fib6_event drivers/net/netdevsim/fib.c:856 [inline] nsim_fib_event drivers/net/netdevsim/fib.c:889 [inline] nsim_fib_event_work+0x199a/0x65f0 drivers/net/netdevsim/fib.c:1493 process_one_work+0x9ba/0x1b20 kernel/workqueue.c:3257 process_scheduled_works kernel/workqueue.c:3340 [inline] worker_thread+0x6c8/0xf10 kernel/workqueue.c:3421 kthread+0x3c5/0x780 kernel/kthread.c:463 ret_from_fork+0x983/0xb10 arch/x86/kernel/process.c:158 ret_from_fork_asm+0x1a/0x30 arch/x86/entry/entry_64.S:246 Memory state around the buggy address: ffff888050e00a00: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ffff888050e00a80: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb >ffff888050e00b00: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ^ ffff888050e00b80: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ffff888050e00c00: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ================================================================== ---------------- Code disassembly (best guess): 0: e8 cf 95 8c ff call 0xff8c95d4 5: 8b 2d 59 d0 92 18 mov 0x1892d059(%rip),%ebp # 0x1892d064 b: e8 c4 95 8c ff call 0xff8c95d4 10: 48 b8 00 00 00 00 00 movabs $0xdffffc0000000000,%rax 17: fc ff df 1a: 65 4c 8b 25 5a 7a 80 mov %gs:0x11807a5a(%rip),%r12 # 0x11807a7c 21: 11 22: 49 8d bc 24 d0 05 00 lea 0x5d0(%r12),%rdi 29: 00 * 2a: 48 89 fa mov %rdi,%rdx <-- trapping instruction 2d: 48 c1 ea 03 shr $0x3,%rdx 31: 0f b6 04 02 movzbl (%rdx,%rax,1),%eax 35: 84 c0 test %al,%al 37: 74 04 je 0x3d 39: 3c 03 cmp $0x3,%al 3b: 7e 27 jle 0x64 3d: 41 rex.B 3e: 80 .byte 0x80 3f: a4 movsb %ds:(%rsi),%es:(%rdi)