syzbot


KASAN: slab-use-after-free Read in gfs2_ail_drain

Status: upstream: reported on 2026/04/05 21:30
Subsystems: gfs2
[Documentation on labels]
Reported-by: syzbot+84a21b16aba9f279d96a@syzkaller.appspotmail.com
First crash: 105d, last: 8d10h
✨ AI Jobs (2)
ID Workflow Result Correct Bug Created Started Finished Revision Error
6a5040ad-39b4-4edb-bc3d-26483b55f98c repro KASAN: slab-use-after-free Read in gfs2_ail_drain 2026/03/07 13:07 2026/03/07 13:07 2026/03/07 13:17 31e9c887f7dc24e04b3ca70d0d54fc34141844b0
2b286aba-f6cd-4212-9056-8e39f04e3e00 moderation Actionable: ✅ Confident: ✅ KASAN: slab-use-after-free Read in gfs2_ail_drain 2026/02/06 07:04 2026/02/06 08:33 2026/02/06 08:48 9b618abc0cd923b36c7a5ebc58a21174112d8f70
Discussions (1)
Title Replies (including bot) Last reply
[syzbot] [gfs2?] KASAN: slab-use-after-free Read in gfs2_ail_drain 0 (1) 2026/04/05 21:30

Sample crash report:
gfs2: fsid=syz:syz.0: fatal: invalid metadata block - bh = 9390 (bad magic number), function = gfs2_meta_buffer, file = fs/gfs2/meta_io.c, line = 461
==================================================================
BUG: KASAN: slab-use-after-free in __list_del_entry_valid_or_report+0x92/0x190 lib/list_debug.c:62
Read of size 8 at addr ffff888012a8b458 by task kworker/0:3/1364

CPU: 0 UID: 0 PID: 1364 Comm: kworker/0:3 Not tainted syzkaller #0 PREEMPT(full) 
Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2 04/01/2014
Workqueue: events gfs2_withdraw_func
Call Trace:
 <TASK>
 dump_stack_lvl+0xe8/0x150 lib/dump_stack.c:120
 print_address_description+0x55/0x1e0 mm/kasan/report.c:378
 print_report+0x58/0x70 mm/kasan/report.c:482
 kasan_report+0x117/0x150 mm/kasan/report.c:595
 __list_del_entry_valid_or_report+0x92/0x190 lib/list_debug.c:62
 __list_del_entry_valid include/linux/list.h:132 [inline]
 __list_del_entry include/linux/list.h:223 [inline]
 list_del_init include/linux/list.h:295 [inline]
 gfs2_remove_from_ail fs/gfs2/log.c:79 [inline]
 gfs2_ail_empty_tr fs/gfs2/log.c:287 [inline]
 gfs2_ail_drain+0x1b7/0xaf0 fs/gfs2/log.c:946
 do_withdraw+0x10d/0x2f0 fs/gfs2/util.c:126
 gfs2_withdraw_func+0x2f3/0x430 fs/gfs2/util.c:-1
 process_one_work kernel/workqueue.c:3302 [inline]
 process_scheduled_works+0xb5d/0x1860 kernel/workqueue.c:3385
 worker_thread+0xa53/0xfc0 kernel/workqueue.c:3466
 kthread+0x388/0x470 kernel/kthread.c:436
 ret_from_fork+0x514/0xb70 arch/x86/kernel/process.c:158
 ret_from_fork_asm+0x1a/0x30 arch/x86/entry/entry_64.S:245
 </TASK>

Allocated by task 5325:
 kasan_save_stack mm/kasan/common.c:57 [inline]
 kasan_save_track+0x3e/0x80 mm/kasan/common.c:78
 unpoison_slab_object mm/kasan/common.c:340 [inline]
 __kasan_slab_alloc+0x6c/0x80 mm/kasan/common.c:366
 kasan_slab_alloc include/linux/kasan.h:253 [inline]
 slab_post_alloc_hook mm/slub.c:4569 [inline]
 slab_alloc_node mm/slub.c:4898 [inline]
 kmem_cache_alloc_noprof+0x2bc/0x650 mm/slub.c:4905
 gfs2_glock_get+0x27b/0xf20 fs/gfs2/glock.c:1098
 gfs2_create_inode+0xd1f/0x1620 fs/gfs2/inode.c:828
 gfs2_mkdir+0x9f/0xd0 fs/gfs2/inode.c:1351
 vfs_mkdir+0x413/0x630 fs/namei.c:5261
 filename_mkdirat+0x285/0x510 fs/namei.c:5294
 __do_sys_mkdir fs/namei.c:5321 [inline]
 __se_sys_mkdir+0x34/0x150 fs/namei.c:5318
 do_syscall_x64 arch/x86/entry/syscall_64.c:63 [inline]
 do_syscall_64+0x15f/0xf80 arch/x86/entry/syscall_64.c:94
 entry_SYSCALL_64_after_hwframe+0x77/0x7f

Freed by task 5339:
 kasan_save_stack mm/kasan/common.c:57 [inline]
 kasan_save_track+0x3e/0x80 mm/kasan/common.c:78
 kasan_save_free_info+0x46/0x50 mm/kasan/generic.c:584
 poison_slab_object mm/kasan/common.c:253 [inline]
 __kasan_slab_free+0x5c/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:6250 [inline]
 kmem_cache_free+0x182/0x650 mm/slub.c:6377
 rcu_do_batch kernel/rcu/tree.c:2617 [inline]
 rcu_core+0x7cd/0x1070 kernel/rcu/tree.c:2869
 handle_softirqs+0x22a/0x840 kernel/softirq.c:622
 __do_softirq kernel/softirq.c:656 [inline]
 invoke_softirq kernel/softirq.c:496 [inline]
 __irq_exit_rcu+0xca/0x220 kernel/softirq.c:735
 irq_exit_rcu+0x9/0x30 kernel/softirq.c:752
 instr_sysvec_apic_timer_interrupt arch/x86/kernel/apic/apic.c:1061 [inline]
 sysvec_apic_timer_interrupt+0xa6/0xc0 arch/x86/kernel/apic/apic.c:1061
 asm_sysvec_apic_timer_interrupt+0x1a/0x20 arch/x86/include/asm/idtentry.h:697

Last potentially related work creation:
 kasan_save_stack+0x3e/0x60 mm/kasan/common.c:57
 kasan_record_aux_stack+0xbd/0xd0 mm/kasan/generic.c:556
 __call_rcu_common kernel/rcu/tree.c:3131 [inline]
 call_rcu+0xee/0x890 kernel/rcu/tree.c:3251
 gfs2_glock_free+0x3c/0xa0 fs/gfs2/glock.c:152
 process_one_work kernel/workqueue.c:3302 [inline]
 process_scheduled_works+0xb5d/0x1860 kernel/workqueue.c:3385
 worker_thread+0xa53/0xfc0 kernel/workqueue.c:3466
 kthread+0x388/0x470 kernel/kthread.c:436
 ret_from_fork+0x514/0xb70 arch/x86/kernel/process.c:158
 ret_from_fork_asm+0x1a/0x30 arch/x86/entry/entry_64.S:245

Second to last potentially related work creation:
 kasan_save_stack+0x3e/0x60 mm/kasan/common.c:57
 kasan_record_aux_stack+0xbd/0xd0 mm/kasan/generic.c:556
 insert_work+0x3d/0x330 kernel/workqueue.c:2226
 __queue_work+0xccf/0xfc0 kernel/workqueue.c:2381
 queue_delayed_work_on+0x11a/0x1e0 kernel/workqueue.c:2600
 queue_delayed_work include/linux/workqueue.h:713 [inline]
 gfs2_glock_queue_work fs/gfs2/glock.c:224 [inline]
 do_xmote+0x515/0x760 fs/gfs2/glock.c:745
 glock_work_func+0x2a8/0x580 fs/gfs2/glock.c:1011
 process_one_work kernel/workqueue.c:3302 [inline]
 process_scheduled_works+0xb5d/0x1860 kernel/workqueue.c:3385
 worker_thread+0xa53/0xfc0 kernel/workqueue.c:3466
 kthread+0x388/0x470 kernel/kthread.c:436
 ret_from_fork+0x514/0xb70 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 ffff888012a8b340
 which belongs to the cache gfs2_glock(aspace) of size 1184
The buggy address is located 280 bytes inside of
 freed 1184-byte region [ffff888012a8b340, ffff888012a8b7e0)

The buggy address belongs to the physical page:
page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x12a88
head: order:2 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 ffff88803172e3c0 dead000000000122 0000000000000000
raw: 0000000000000000 00000008000c000c 00000000f5000000 0000000000000000
head: 00fff00000000040 ffff88803172e3c0 dead000000000122 0000000000000000
head: 0000000000000000 00000008000c000c 00000000f5000000 0000000000000000
head: 00fff00000000002 ffffffffffffff01 00000000ffffffff 00000000ffffffff
head: ffffffffffffffff 0000000000000000 00000000ffffffff 0000000000000004
page dumped because: kasan: bad access detected
page_owner tracks the page as allocated
page last allocated via order 2, migratetype Unmovable, gfp_mask 0xd2040(__GFP_IO|__GFP_NOWARN|__GFP_NORETRY|__GFP_COMP|__GFP_NOMEMALLOC), pid 5325, tgid 5323 (syz.0.0), ts 89912171990, free_ts 88268940050
 set_page_owner include/linux/page_owner.h:32 [inline]
 post_alloc_hook+0x231/0x280 mm/page_alloc.c:1858
 prep_new_page mm/page_alloc.c:1866 [inline]
 get_page_from_freelist+0x24ba/0x2540 mm/page_alloc.c:3946
 __alloc_frozen_pages_noprof+0x18d/0x380 mm/page_alloc.c:5226
 alloc_slab_page mm/slub.c:3278 [inline]
 allocate_slab+0x77/0x660 mm/slub.c:3467
 new_slab mm/slub.c:3525 [inline]
 refill_objects+0x339/0x3d0 mm/slub.c:7255
 refill_sheaf mm/slub.c:2816 [inline]
 __pcs_replace_empty_main+0x321/0x720 mm/slub.c:4651
 alloc_from_pcs mm/slub.c:4749 [inline]
 slab_alloc_node mm/slub.c:4883 [inline]
 kmem_cache_alloc_noprof+0x37d/0x650 mm/slub.c:4905
 gfs2_glock_get+0x27b/0xf20 fs/gfs2/glock.c:1098
 gfs2_create_inode+0xd1f/0x1620 fs/gfs2/inode.c:828
 gfs2_atomic_open+0x116/0x200 fs/gfs2/inode.c:1401
 atomic_open+0x14f/0x370 fs/namei.c:4364
 lookup_open fs/namei.c:4477 [inline]
 open_last_lookups fs/namei.c:4611 [inline]
 path_openat+0x10e9/0x3860 fs/namei.c:4855
 do_file_open+0x23e/0x4a0 fs/namei.c:4887
 do_sys_openat2+0x113/0x200 fs/open.c:1364
 do_sys_open fs/open.c:1370 [inline]
 __do_sys_openat fs/open.c:1386 [inline]
 __se_sys_openat fs/open.c:1381 [inline]
 __x64_sys_openat+0x138/0x170 fs/open.c:1381
 do_syscall_x64 arch/x86/entry/syscall_64.c:63 [inline]
 do_syscall_64+0x15f/0xf80 arch/x86/entry/syscall_64.c:94
page last free pid 5326 tgid 5326 stack trace:
 reset_page_owner include/linux/page_owner.h:25 [inline]
 __free_pages_prepare mm/page_alloc.c:1402 [inline]
 __free_frozen_pages+0xbc7/0xd30 mm/page_alloc.c:2943
 __slab_free+0x274/0x2c0 mm/slub.c:5612
 qlink_free mm/kasan/quarantine.c:163 [inline]
 qlist_free_all+0x99/0x100 mm/kasan/quarantine.c:179
 kasan_quarantine_reduce+0x148/0x160 mm/kasan/quarantine.c:286
 __kasan_slab_alloc+0x22/0x80 mm/kasan/common.c:350
 kasan_slab_alloc include/linux/kasan.h:253 [inline]
 slab_post_alloc_hook mm/slub.c:4569 [inline]
 slab_alloc_node mm/slub.c:4898 [inline]
 kmem_cache_alloc_noprof+0x2bc/0x650 mm/slub.c:4905
 ptlock_alloc+0x20/0x70 mm/memory.c:7563
 ptlock_init include/linux/mm.h:3741 [inline]
 pagetable_pte_ctor include/linux/mm.h:3790 [inline]
 __pte_alloc_one_noprof include/asm-generic/pgalloc.h:79 [inline]
 pte_alloc_one+0x7a/0x370 arch/x86/mm/pgtable.c:18
 do_fault_around mm/memory.c:5845 [inline]
 do_read_fault mm/memory.c:5884 [inline]
 do_fault mm/memory.c:6027 [inline]
 do_pte_missing+0x1214/0x33f0 mm/memory.c:4550
 handle_pte_fault mm/memory.c:6411 [inline]
 __handle_mm_fault mm/memory.c:6549 [inline]
 handle_mm_fault+0x1bd7/0x3170 mm/memory.c:6718
 do_user_addr_fault+0xa73/0x1340 arch/x86/mm/fault.c:1334
 handle_page_fault arch/x86/mm/fault.c:1474 [inline]
 exc_page_fault+0x6a/0xc0 arch/x86/mm/fault.c:1527
 asm_exc_page_fault+0x26/0x30 arch/x86/include/asm/idtentry.h:618

Memory state around the buggy address:
 ffff888012a8b300: fc fc fc fc fc fc fc fc fa fb fb fb fb fb fb fb
 ffff888012a8b380: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
>ffff888012a8b400: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
                                                    ^
 ffff888012a8b480: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
 ffff888012a8b500: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
==================================================================

Crashes (6):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2026/05/06 14:42 upstream 74fe02ce122a 23ad3581 .config console log report [disk image (non-bootable)] [vmlinux] [kernel image] ci-snapshot-upstream-root KASAN: slab-use-after-free Read in gfs2_ail_drain
2026/04/05 21:29 upstream 1791c390149f 4440e7c2 .config console log report [disk image (non-bootable)] [vmlinux] [kernel image] ci-snapshot-upstream-root KASAN: slab-use-after-free Read in gfs2_ail_drain
2026/04/05 21:22 upstream 1791c390149f 4440e7c2 .config console log report [disk image (non-bootable)] [vmlinux] [kernel image] ci-snapshot-upstream-root KASAN: slab-use-after-free Read in gfs2_ail_drain
2026/03/03 20:30 upstream af4e9ef3d784 4180d919 .config console log report [disk image (non-bootable)] [vmlinux] [kernel image] ci-snapshot-upstream-root KASAN: slab-use-after-free Read in gfs2_ail_drain
2026/02/03 11:45 upstream 6bd9ed02871f 6df4c87a .config console log report [disk image (non-bootable)] [vmlinux] [kernel image] ci-snapshot-upstream-root KASAN: slab-use-after-free Read in gfs2_ail_drain
2026/01/29 06:04 upstream 8dfce8991b95 0adc945e .config console log report [disk image (non-bootable)] [vmlinux] [kernel image] ci-snapshot-upstream-root KASAN: slab-use-after-free Read in gfs2_ail_drain
* Struck through repros no longer work on HEAD.