KASAN: use-after-free Read in ocfs2_read_quota_block

Status: upstream: reported C repro on 2026/11/15 11:08
Reported-by: syzbot+bf9cc42d5188e5ed285e@syzkaller.appspotmail.com
First crash: 14d, last: 3h13m
▶ ▼ Similar bugs (2)
Kernel Title Rank 🛈 Repro Cause bisect Fix bisect Count Last Reported Patched Status
linux-6.1 KASAN: use-after-free Read in ocfs2_read_quota_block origin:lts-only 19 syz, C 12 1h44m 12d 0/3 upstream: reported C repro on 2026/11/17 15:28
linux-6.6 KASAN: slab-use-after-free Read in ocfs2_read_quota_block 19 2 1h05m 14d 0/2 upstream: reported on 2026/11/15 09:35

Sample crash report:
System zones: 1-12, 13-13
EXT4-fs (loop0): 1 truncate cleaned up
EXT4-fs (loop0): mounted filesystem without journal. Opts: norecovery,grpquota,debug,discard,,errors=continue. Quota mode: writeback.
==================================================================
BUG: KASAN: use-after-free in ocfs2_read_quota_block+0x210/0x3b0 fs/ocfs2/quota_local.c:143
Read of size 8 at addr ffff8880624a2c00 by task syz.0.17/4362

CPU: 0 PID: 4362 Comm: syz.0.17 Not tainted syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 11/06/2026
Call Trace:
 <TASK>
 dump_stack_lvl+0x188/0x250 lib/dump_stack.c:106
 print_address_description+0x60/0x2d0 mm/kasan/report.c:248
 __kasan_report mm/kasan/report.c:434 [inline]
 kasan_report+0xdf/0x130 mm/kasan/report.c:451
 ocfs2_read_quota_block+0x210/0x3b0 fs/ocfs2/quota_local.c:143
 ocfs2_local_check_quota_file+0x11c/0xe70 fs/ocfs2/quota_local.c:175
 dquot_load_quota_sb+0x5c8/0xa80 fs/quota/dquot.c:2478
 dquot_load_quota_inode+0x2d3/0x5c0 fs/quota/dquot.c:2522
 ext4_quota_on+0x4e0/0x930 fs/ext4/super.c:6378
 __do_sys_quotactl fs/quota/quota.c:959 [inline]
 __se_sys_quotactl+0x28b/0x6f0 fs/quota/quota.c:915
 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
RIP: 0033:0x7f1bbf7354d9
Code: ff c3 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 44 00 00 48 89 f8 48 89 f7 48 89 d6 48 89 ca 4d 89 c2 4d 89 c8 4c 8b 4c 24 08 0f 05 <48> 3d 01 f0 ff ff 73 01 c3 48 c7 c1 e8 ff ff ff f7 d8 64 89 01 48
RSP: 002b:00007ffefc399cb8 EFLAGS: 00000246 ORIG_RAX: 00000000000000b3
RAX: ffffffffffffffda RBX: 00007f1bbf9b1fa0 RCX: 00007f1bbf7354d9
RDX: 0000000000000003 RSI: 00002000000000c0 RDI: ffffffff80000201
RBP: 00007f1bbf7c404e R08: 0000000000000000 R09: 0000000000000000
R10: 0000200000000200 R11: 0000000000000246 R12: 0000000000000000
R13: 00007f1bbf9b1fac R14: 00007f1bbf9b1fa0 R15: 00007f1bbf9b1fa0
 </TASK>

Allocated by task 4362:
 kasan_save_stack mm/kasan/common.c:38 [inline]
 kasan_set_track mm/kasan/common.c:46 [inline]
 set_alloc_info mm/kasan/common.c:434 [inline]
 __kasan_slab_alloc+0x92/0xc0 mm/kasan/common.c:467
 kasan_slab_alloc include/linux/kasan.h:254 [inline]
 slab_post_alloc_hook+0x4c/0x380 mm/slab.h:519
 slab_alloc_node mm/slub.c:3225 [inline]
 slab_alloc mm/slub.c:3233 [inline]
 kmem_cache_alloc+0x15d/0x280 mm/slub.c:3238
 ext4_alloc_inode+0x1d/0x590 fs/ext4/super.c:1295
 alloc_inode fs/inode.c:261 [inline]
 iget_locked+0x18c/0x820 fs/inode.c:1305
 __ext4_iget+0x233/0x3e90 fs/ext4/inode.c:4687
 ext4_orphan_get+0x1bb/0x5f0 fs/ext4/ialloc.c:1410
 ext4_orphan_cleanup+0xb44/0x14f0 fs/ext4/orphan.c:465
 ext4_fill_super+0x8c65/0x93f0 fs/ext4/super.c:5006
 mount_bdev+0x28a/0x3c0 fs/super.c:1411
 legacy_get_tree+0xe6/0x180 fs/fs_context.c:611
 vfs_get_tree+0x88/0x270 fs/super.c:1541
 do_new_mount+0x247/0xa50 fs/namespace.c:3060
 do_mount fs/namespace.c:3431 [inline]
 __do_sys_mount fs/namespace.c:3639 [inline]
 __se_sys_mount+0x2e3/0x3d0 fs/namespace.c:3616
 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 4357:
 kasan_save_stack mm/kasan/common.c:38 [inline]
 kasan_set_track+0x4b/0x70 mm/kasan/common.c:46
 kasan_set_free_info+0x1f/0x40 mm/kasan/generic.c:360
 ____kasan_slab_free+0xd5/0x110 mm/kasan/common.c:366
 kasan_slab_free include/linux/kasan.h:230 [inline]
 slab_free_hook mm/slub.c:1710 [inline]
 slab_free_freelist_hook+0xec/0x170 mm/slub.c:1736
 slab_free mm/slub.c:3504 [inline]
 kmem_cache_free+0x8f/0x210 mm/slub.c:3520
 rcu_do_batch kernel/rcu/tree.c:2523 [inline]
 rcu_core+0x96e/0x1650 kernel/rcu/tree.c:2763
 handle_softirqs+0x336/0x830 kernel/softirq.c:576
 __do_softirq kernel/softirq.c:610 [inline]
 invoke_softirq kernel/softirq.c:450 [inline]
 __irq_exit_rcu+0x13b/0x230 kernel/softirq.c:659
 irq_exit_rcu+0x5/0x20 kernel/softirq.c:671
 instr_sysvec_apic_timer_interrupt arch/x86/kernel/apic/apic.c:1108 [inline]
 sysvec_apic_timer_interrupt+0xa0/0xc0 arch/x86/kernel/apic/apic.c:1108
 asm_sysvec_apic_timer_interrupt+0x16/0x20 arch/x86/include/asm/idtentry.h:676

Last potentially related work creation:
 kasan_save_stack+0x35/0x60 mm/kasan/common.c:38
 kasan_record_aux_stack+0xb8/0x100 mm/kasan/generic.c:348
 __call_rcu kernel/rcu/tree.c:3011 [inline]
 call_rcu+0x189/0x900 kernel/rcu/tree.c:3091
 destroy_inode fs/inode.c:316 [inline]
 evict+0x915/0x9d0 fs/inode.c:659
 ext4_orphan_cleanup+0xc96/0x14f0 fs/ext4/orphan.c:472
 ext4_fill_super+0x8c65/0x93f0 fs/ext4/super.c:5006
 mount_bdev+0x28a/0x3c0 fs/super.c:1411
 legacy_get_tree+0xe6/0x180 fs/fs_context.c:611
 vfs_get_tree+0x88/0x270 fs/super.c:1541
 do_new_mount+0x247/0xa50 fs/namespace.c:3060
 do_mount fs/namespace.c:3431 [inline]
 __do_sys_mount fs/namespace.c:3639 [inline]
 __se_sys_mount+0x2e3/0x3d0 fs/namespace.c:3616
 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 ffff8880624a27e0
 which belongs to the cache ext4_inode_cache of size 2424
The buggy address is located 1056 bytes inside of
 2424-byte region [ffff8880624a27e0, ffff8880624a3158)
The buggy address belongs to the page:
page:ffffea0001892800 refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x624a0
head:ffffea0001892800 order:3 compound_mapcount:0 compound_pincount:0
memcg:ffff888073acf301
flags: 0xfff00000010200(slab|head|node=0|zone=1|lastcpupid=0x7ff)
raw: 00fff00000010200 0000000000000000 dead000000000122 ffff88801e39e8c0
raw: 0000000000000000 00000000800c000c 00000001ffffffff ffff888073acf301
page dumped because: kasan: bad access detected
page_owner tracks the page as allocated
page last allocated via order 3, migratetype Reclaimable, gfp_mask 0x1d2050(__GFP_IO|__GFP_NOWARN|__GFP_NORETRY|__GFP_COMP|__GFP_NOMEMALLOC|__GFP_HARDWALL|__GFP_RECLAIMABLE), pid 4347, ts 69553744706, free_ts 58862801168
 prep_new_page mm/page_alloc.c:2426 [inline]
 get_page_from_freelist+0x24f6/0x2670 mm/page_alloc.c:4192
 __alloc_pages+0x1ee/0x480 mm/page_alloc.c:5501
 alloc_slab_page mm/slub.c:1780 [inline]
 allocate_slab mm/slub.c:1917 [inline]
 new_slab+0xc0/0x4b0 mm/slub.c:1980
 ___slab_alloc+0x807/0xdd0 mm/slub.c:3013
 __slab_alloc mm/slub.c:3100 [inline]
 slab_alloc_node mm/slub.c:3191 [inline]
 slab_alloc mm/slub.c:3233 [inline]
 kmem_cache_alloc+0xf0/0x280 mm/slub.c:3238
 ext4_alloc_inode+0x1d/0x590 fs/ext4/super.c:1295
 alloc_inode fs/inode.c:261 [inline]
 new_inode_pseudo+0x5f/0x210 fs/inode.c:998
 new_inode+0x25/0x1d0 fs/inode.c:1027
 __ext4_new_inode+0x2ad/0x3a90 fs/ext4/ialloc.c:969
 ext4_mkdir+0x407/0xc90 fs/ext4/namei.c:3068
 vfs_mkdir+0x386/0x570 fs/namei.c:4116
 do_mkdirat+0x1dd/0x5c0 fs/namei.c:4141
 __do_sys_mkdirat fs/namei.c:4156 [inline]
 __se_sys_mkdirat fs/namei.c:4154 [inline]
 __x64_sys_mkdirat+0x85/0x90 fs/namei.c:4154
 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
page last free stack trace:
 reset_page_owner include/linux/page_owner.h:24 [inline]
 free_pages_prepare mm/page_alloc.c:1340 [inline]
 free_pcp_prepare mm/page_alloc.c:1391 [inline]
 free_unref_page_prepare+0x637/0x6c0 mm/page_alloc.c:3317
 free_unref_page+0x8f/0x2a0 mm/page_alloc.c:3396
 __vunmap+0x8e0/0xa80 mm/vmalloc.c:2661
 kcov_put kernel/kcov.c:422 [inline]
 kcov_close+0x27/0x50 kernel/kcov.c:524
 __fput+0x212/0x8c0 fs/file_table.c:311
 task_work_run+0x125/0x1a0 kernel/task_work.c:188
 exit_task_work include/linux/task_work.h:33 [inline]
 do_exit+0x635/0x2100 kernel/exit.c:890
 do_group_exit+0x12c/0x2f0 kernel/exit.c:1004
 get_signal+0x7eb/0x12e0 kernel/signal.c:2917
 arch_do_signal_or_restart+0xe6/0x12a0 arch/x86/kernel/signal.c:867
 handle_signal_work kernel/entry/common.c:157 [inline]
 exit_to_user_mode_loop+0x9e/0x130 kernel/entry/common.c:181
 exit_to_user_mode_prepare+0xee/0x180 kernel/entry/common.c:217
 __syscall_exit_to_user_mode_work kernel/entry/common.c:299 [inline]
 syscall_exit_to_user_mode+0x16/0x40 kernel/entry/common.c:310
 do_syscall_64+0x58/0xa0 arch/x86/entry/common.c:86
 entry_SYSCALL_64_after_hwframe+0x66/0xd0

Memory state around the buggy address:
 ffff8880624a2b00: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
 ffff8880624a2b80: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
>ffff8880624a2c00: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
                   ^
 ffff8880624a2c80: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
 ffff8880624a2d00: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
==================================================================

Crashes (4):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2026/11/15 11:26 linux-5.15.y 29c6cdaac04a 819ebe34 .config console log report syz / log C [disk image] [vmlinux] [kernel image] [mounted in repro (corrupt fs)] ci2-linux-5-15-kasan KASAN: use-after-free Read in ocfs2_read_quota_block
2026/11/29 23:50 linux-5.15.y 4f2df9a01754 e1f06033 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan KASAN: use-after-free Read in ocfs2_read_quota_block
2026/11/17 15:34 linux-5.15.y 29c6cdaac04a 43af6cac .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan KASAN: use-after-free Read in ocfs2_read_quota_block
2026/11/15 11:08 linux-5.15.y 29c6cdaac04a 819ebe34 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan KASAN: use-after-free Read in ocfs2_read_quota_block
* Struck through repros no longer work on HEAD.