==================================================================
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:1375 [inline]
BUG: KASAN: slab-use-after-free in gfs2_qd_dealloc+0x81/0xe0 fs/gfs2/quota.c:112
Write of size 4 at addr ffff888068fe8a78 by task syz.4.4873/23017
CPU: 0 PID: 23017 Comm: syz.4.4873 Not tainted syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 02/12/2026
Call Trace:
dump_stack_lvl+0x18c/0x250 lib/dump_stack.c:106
print_address_description mm/kasan/report.c:364 [inline]
print_report+0xa8/0x210 mm/kasan/report.c:468
kasan_report+0x117/0x150 mm/kasan/report.c:581
check_region_inline mm/kasan/generic.c:-1 [inline]
kasan_check_range+0x241/0x290 mm/kasan/generic.c:187
instrument_atomic_read_write include/linux/instrumented.h:96 [inline]
atomic_dec_and_test include/linux/atomic/atomic-instrumented.h:1375 [inline]
gfs2_qd_dealloc+0x81/0xe0 fs/gfs2/quota.c:112
rcu_do_batch kernel/rcu/tree.c:2194 [inline]
rcu_core+0xcfb/0x1770 kernel/rcu/tree.c:2467
handle_softirqs+0x280/0x820 kernel/softirq.c:578
__do_softirq kernel/softirq.c:612 [inline]
invoke_softirq kernel/softirq.c:452 [inline]
__irq_exit_rcu+0xd3/0x190 kernel/softirq.c:661
irq_exit_rcu+0x9/0x20 kernel/softirq.c:673
instr_sysvec_apic_timer_interrupt arch/x86/kernel/apic/apic.c:1088 [inline]
sysvec_apic_timer_interrupt+0xa4/0xc0 arch/x86/kernel/apic/apic.c:1088
asm_sysvec_apic_timer_interrupt+0x1a/0x20 arch/x86/include/asm/idtentry.h:687
RIP: 0010:memset_orig+0x36/0xac arch/x86/lib/memset_64.S:68
Code: b8 01 01 01 01 01 01 01 01 48 0f af c1 41 89 f9 41 83 e1 07 75 6c 48 89 d1 48 c1 e9 06 74 35 0f 1f 44 00 00 48 ff c9 48 89 07 <48> 89 47 08 48 89 47 10 48 89 47 18 48 89 47 20 48 89 47 28 48 89
RSP: 0018:ffffc9000e6177c8 EFLAGS: 00000202
RAX: ffffffffffffffff RBX: ffffea000130af40 RCX: 0000000000000007
RDX: 0000000000000200 RSI: 00000000000000ff RDI: ffffed1009857a00
RBP: 0000000000000000 R08: dffffc0000000000 R09: 0000000000000000
R10: ffffed1009857a00 R11: fffffbfff22386a7 R12: ffff88804c2bd000
R13: 0000000000000001 R14: 0000000000000001 R15: 0000000000000000
kasan_poison_pages include/linux/kasan.h:113 [inline]
free_pages_prepare mm/page_alloc.c:1202 [inline]
free_unref_page_prepare+0x209/0x8c0 mm/page_alloc.c:2365
free_unref_page_list+0xbe/0x860 mm/page_alloc.c:2504
release_pages+0x1f7a/0x2200 mm/swap.c:1022
tlb_batch_pages_flush mm/mmu_gather.c:99 [inline]
tlb_flush_mmu_free mm/mmu_gather.c:294 [inline]
tlb_flush_mmu+0x379/0x510 mm/mmu_gather.c:301
tlb_finish_mmu+0xf9/0x220 mm/mmu_gather.c:425
exit_mmap+0x428/0xb90 mm/mmap.c:3315
__mmput+0x118/0x3c0 kernel/fork.c:1355
exit_mm+0x1f2/0x2c0 kernel/exit.c:569
do_exit+0x8dd/0x2460 kernel/exit.c:870
do_group_exit+0x21b/0x2d0 kernel/exit.c:1024
__do_sys_exit_group kernel/exit.c:1035 [inline]
__se_sys_exit_group kernel/exit.c:1033 [inline]
__x64_sys_exit_group+0x3f/0x40 kernel/exit.c:1033
do_syscall_x64 arch/x86/entry/common.c:46 [inline]
do_syscall_64+0x55/0xa0 arch/x86/entry/common.c:76
entry_SYSCALL_64_after_hwframe+0x68/0xd2
RIP: 0033:0x7f321ef9c819
Code: Unable to access opcode bytes at 0x7f321ef9c7ef.
RSP: 002b:00007fffa6705608 EFLAGS: 00000246 ORIG_RAX: 00000000000000e7
RAX: ffffffffffffffda RBX: 0000000000000000 RCX: 00007f321ef9c819
RDX: 0000000000000064 RSI: 0000000000000000 RDI: 0000000000000000
RBP: 00007fffa670566c R08: 0000000000000000 R09: 00000000000927c0
R10: 0000000000000001 R11: 0000000000000246 R12: 000000000000027e
R13: 00000000000927c0 R14: 00000000000b1aed R15: 00007fffa67056c0
Allocated by task 22997:
kasan_save_stack mm/kasan/common.c:46 [inline]
kasan_set_track+0x4e/0x70 mm/kasan/common.c:53
____kasan_kmalloc mm/kasan/common.c:375 [inline]
__kasan_kmalloc+0x8f/0xa0 mm/kasan/common.c:384
kmalloc include/linux/slab.h:600 [inline]
kzalloc include/linux/slab.h:721 [inline]
init_sbd fs/gfs2/ops_fstype.c:77 [inline]
gfs2_fill_super+0x138/0x1f30 fs/gfs2/ops_fstype.c:1162
get_tree_bdev+0x3f3/0x520 fs/super.c:1591
gfs2_get_tree+0x51/0x1e0 fs/gfs2/ops_fstype.c:1344
vfs_get_tree+0x8c/0x280 fs/super.c:1764
do_new_mount+0x24b/0xa40 fs/namespace.c:3386
do_mount fs/namespace.c:3726 [inline]
__do_sys_mount fs/namespace.c:3935 [inline]
__se_sys_mount+0x2e7/0x3d0 fs/namespace.c:3912
do_syscall_x64 arch/x86/entry/common.c:46 [inline]
do_syscall_64+0x55/0xa0 arch/x86/entry/common.c:76
entry_SYSCALL_64_after_hwframe+0x68/0xd2
Freed by task 22997:
kasan_save_stack mm/kasan/common.c:46 [inline]
kasan_set_track+0x4e/0x70 mm/kasan/common.c:53
kasan_save_free_info+0x2e/0x50 mm/kasan/generic.c:522
____kasan_slab_free+0x126/0x1e0 mm/kasan/common.c:237
kasan_slab_free include/linux/kasan.h:164 [inline]
slab_free_hook mm/slub.c:1811 [inline]
slab_free_freelist_hook+0x130/0x1a0 mm/slub.c:1837
slab_free mm/slub.c:3830 [inline]
__kmem_cache_free+0xba/0x1e0 mm/slub.c:3843
free_sbd fs/gfs2/ops_fstype.c:69 [inline]
gfs2_fill_super+0x1369/0x1f30 fs/gfs2/ops_fstype.c:1327
get_tree_bdev+0x3f3/0x520 fs/super.c:1591
gfs2_get_tree+0x51/0x1e0 fs/gfs2/ops_fstype.c:1344
vfs_get_tree+0x8c/0x280 fs/super.c:1764
do_new_mount+0x24b/0xa40 fs/namespace.c:3386
do_mount fs/namespace.c:3726 [inline]
__do_sys_mount fs/namespace.c:3935 [inline]
__se_sys_mount+0x2e7/0x3d0 fs/namespace.c:3912
do_syscall_x64 arch/x86/entry/common.c:46 [inline]
do_syscall_64+0x55/0xa0 arch/x86/entry/common.c:76
entry_SYSCALL_64_after_hwframe+0x68/0xd2
The buggy address belongs to the object at ffff888068fe8000
which belongs to the cache kmalloc-8k of size 8192
The buggy address is located 2680 bytes inside of
freed 8192-byte region [ffff888068fe8000, ffff888068fea000)
The buggy address belongs to the physical page:
page:ffffea0001a3fa00 refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x68fe8
head:ffffea0001a3fa00 order:3 entire_mapcount:0 nr_pages_mapped:0 pincount:0
ksm flags: 0xfff00000000840(slab|head|node=0|zone=1|lastcpupid=0x7ff)
page_type: 0xffffffff()
raw: 00fff00000000840 ffff888017c42280 ffffea0001eb8400 0000000000000003
raw: 0000000000000000 0000000000020002 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 0x1d2820(GFP_ATOMIC|__GFP_NOWARN|__GFP_NORETRY|__GFP_COMP|__GFP_NOMEMALLOC|__GFP_HARDWALL), pid 22655, tgid 22650 (syz.5.4735), ts 714995863767, free_ts 714985885861
set_page_owner include/linux/page_owner.h:31 [inline]
post_alloc_hook+0x1c1/0x200 mm/page_alloc.c:1581
prep_new_page mm/page_alloc.c:1588 [inline]
get_page_from_freelist+0x1951/0x19e0 mm/page_alloc.c:3220
__alloc_pages+0x1f0/0x460 mm/page_alloc.c:4500
alloc_slab_page+0x5d/0x160 mm/slub.c:1881
allocate_slab mm/slub.c:2028 [inline]
new_slab+0x87/0x2d0 mm/slub.c:2081
___slab_alloc+0xc5d/0x12f0 mm/slub.c:3253
__slab_alloc mm/slub.c:3339 [inline]
__slab_alloc_node mm/slub.c:3392 [inline]
slab_alloc_node mm/slub.c:3485 [inline]
__kmem_cache_alloc_node+0x19e/0x250 mm/slub.c:3534
__do_kmalloc_node mm/slab_common.c:1006 [inline]
__kmalloc_node_track_caller+0xa2/0x230 mm/slab_common.c:1027
kmalloc_reserve+0x116/0x240 net/core/skbuff.c:584
__alloc_skb+0x138/0x2c0 net/core/skbuff.c:653
alloc_skb include/linux/skbuff.h:1316 [inline]
pfkey_send_acquire+0x5ff/0x2ca0 net/key/af_key.c:3185
km_query+0x112/0x200 net/xfrm/xfrm_state.c:2527
xfrm_state_find+0x2ca8/0x4460 net/xfrm/xfrm_state.c:1381
xfrm_tmpl_resolve_one net/xfrm/xfrm_policy.c:2502 [inline]
xfrm_tmpl_resolve net/xfrm/xfrm_policy.c:2547 [inline]
xfrm_resolve_and_create_bundle+0x7a3/0x2c80 net/xfrm/xfrm_policy.c:2841
xfrm_lookup_with_ifid+0x26c/0x1aa0 net/xfrm/xfrm_policy.c:3175
xfrm_lookup net/xfrm/xfrm_policy.c:3304 [inline]
xfrm_lookup_route+0x3c/0x1b0 net/xfrm/xfrm_policy.c:3315
page last free stack trace:
reset_page_owner include/linux/page_owner.h:24 [inline]
free_pages_prepare mm/page_alloc.c:1181 [inline]
free_unref_page_prepare+0x7b2/0x8c0 mm/page_alloc.c:2365
free_unref_page+0x32/0x2e0 mm/page_alloc.c:2458
discard_slab mm/slub.c:2127 [inline]
__unfreeze_partials+0x1cf/0x210 mm/slub.c:2667
put_cpu_partial+0x17c/0x250 mm/slub.c:2743
__slab_free+0x319/0x400 mm/slub.c:3700
qlink_free mm/kasan/quarantine.c:166 [inline]
qlist_free_all+0x75/0xd0 mm/kasan/quarantine.c:185
kasan_quarantine_reduce+0x143/0x160 mm/kasan/quarantine.c:292
__kasan_slab_alloc+0x22/0x80 mm/kasan/common.c:306
kasan_slab_alloc include/linux/kasan.h:188 [inline]
slab_post_alloc_hook+0x6e/0x4b0 mm/slab.h:767
slab_alloc_node mm/slub.c:3495 [inline]
slab_alloc mm/slub.c:3503 [inline]
__kmem_cache_alloc_lru mm/slub.c:3510 [inline]
kmem_cache_alloc+0x11a/0x2d0 mm/slub.c:3519
getname_flags+0xbb/0x500 fs/namei.c:140
do_sys_openat2+0xda/0x1d0 fs/open.c:1415
do_sys_open fs/open.c:1436 [inline]
__do_sys_openat fs/open.c:1452 [inline]
__se_sys_openat fs/open.c:1447 [inline]
__x64_sys_openat+0x139/0x160 fs/open.c:1447
do_syscall_x64 arch/x86/entry/common.c:46 [inline]
do_syscall_64+0x55/0xa0 arch/x86/entry/common.c:76
entry_SYSCALL_64_after_hwframe+0x68/0xd2
Memory state around the buggy address:
ffff888068fe8900: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
ffff888068fe8980: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
>ffff888068fe8a00: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
^
ffff888068fe8a80: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
ffff888068fe8b00: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
==================================================================
----------------
Code disassembly (best guess):
0: b8 01 01 01 01 mov $0x1010101,%eax
5: 01 01 add %eax,(%rcx)
7: 01 01 add %eax,(%rcx)
9: 48 0f af c1 imul %rcx,%rax
d: 41 89 f9 mov %edi,%r9d
10: 41 83 e1 07 and $0x7,%r9d
14: 75 6c jne 0x82
16: 48 89 d1 mov %rdx,%rcx
19: 48 c1 e9 06 shr $0x6,%rcx
1d: 74 35 je 0x54
1f: 0f 1f 44 00 00 nopl 0x0(%rax,%rax,1)
24: 48 ff c9 dec %rcx
27: 48 89 07 mov %rax,(%rdi)
* 2a: 48 89 47 08 mov %rax,0x8(%rdi) <-- trapping instruction
2e: 48 89 47 10 mov %rax,0x10(%rdi)
32: 48 89 47 18 mov %rax,0x18(%rdi)
36: 48 89 47 20 mov %rax,0x20(%rdi)
3a: 48 89 47 28 mov %rax,0x28(%rdi)
3e: 48 rex.W
3f: 89 .byte 0x89