KASAN: use-after-free Read in ocfs2_read_quota_block

Status: upstream: reported C repro on 2026/11/17 15:28
Bug presence: origin:lts-only
[Documentation on labels]
Reported-by: syzbot+e592d261937dc2203274@syzkaller.appspotmail.com
First crash: 12d, last: 1h48m
▶ ▼ Bug presence (2)
Date Name Commit Repro Result
2026/11/22 linux-6.1.y (ToT) c75b0cf0982c C [report] BUG: spinlock bad magic in ocfs2_handle_error
2026/11/22 upstream (ToT) 4843f6873f7c C Didn't crash
▶ ▼ Similar bugs (2)
Kernel Title Rank 🛈 Repro Cause bisect Fix bisect Count Last Reported Patched Status
linux-5.15 KASAN: use-after-free Read in ocfs2_read_quota_block 19 syz, C 4 3h17m 14d 0/3 upstream: reported C repro on 2026/11/15 11:08
linux-6.6 KASAN: slab-use-after-free Read in ocfs2_read_quota_block 19 2 1h09m 14d 0/2 upstream: reported on 2026/11/15 09:35

Sample crash report:
loop0: detected capacity change from 0 to 33792
EXT4-fs (loop0): mounted filesystem without journal. 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 ffff88805be9fa38 by task syz.0.17/4466

CPU: 0 PID: 4466 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/0x24e lib/dump_stack.c:106
 print_address_description mm/kasan/report.c:316 [inline]
 print_report+0xa8/0x210 mm/kasan/report.c:420
 kasan_report+0x10b/0x140 mm/kasan/report.c:524
 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:2488
 dquot_load_quota_inode+0x2d3/0x5c0 fs/quota/dquot.c:2532
 ext4_quota_on+0x4e0/0x930 fs/ext4/super.c:6990
 __do_sys_quotactl fs/quota/quota.c:960 [inline]
 __se_sys_quotactl+0x28b/0x6f0 fs/quota/quota.c:916
 do_syscall_x64 arch/x86/entry/common.c:46 [inline]
 do_syscall_64+0x4c/0xa0 arch/x86/entry/common.c:76
 entry_SYSCALL_64_after_hwframe+0x68/0xd2
RIP: 0033:0x7fd2905a9559
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:00007ffdeb1ff9a8 EFLAGS: 00000246 ORIG_RAX: 00000000000000b3
RAX: ffffffffffffffda RBX: 00007fd290825fa0 RCX: 00007fd2905a9559
RDX: 0000000000000003 RSI: 0000200000006e80 RDI: ffffffff80000201
RBP: 00007fd290638136 R08: 0000000000000000 R09: 0000000000000000
R10: 0000200000006ec0 R11: 0000000000000246 R12: 0000000000000000
R13: 00007fd290825fac R14: 00007fd290825fa0 R15: 00007fd290825fa0
 </TASK>

Allocated by task 4420:
 kasan_save_stack mm/kasan/common.c:46 [inline]
 kasan_set_track+0x4b/0x70 mm/kasan/common.c:53
 __kasan_slab_alloc+0x6b/0x80 mm/kasan/common.c:329
 kasan_slab_alloc include/linux/kasan.h:201 [inline]
 slab_post_alloc_hook+0x4b/0x490 mm/slab.h:742
 slab_alloc_node mm/slub.c:3366 [inline]
 slab_alloc mm/slub.c:3374 [inline]
 __kmem_cache_alloc_lru mm/slub.c:3381 [inline]
 kmem_cache_alloc_lru+0x182/0x2e0 mm/slub.c:3397
 alloc_inode_sb include/linux/fs.h:3278 [inline]
 sock_alloc_inode+0x24/0xc0 net/socket.c:306
 alloc_inode fs/inode.c:261 [inline]
 new_inode_pseudo+0x5f/0x1c0 fs/inode.c:1061
 sock_alloc net/socket.c:631 [inline]
 __sock_create+0x129/0x940 net/socket.c:1514
 sock_create net/socket.c:1606 [inline]
 __sys_socket_create net/socket.c:1643 [inline]
 __sys_socket+0xc4/0x190 net/socket.c:1671
 __do_sys_socket net/socket.c:1684 [inline]
 __se_sys_socket net/socket.c:1682 [inline]
 __x64_sys_socket+0x76/0x80 net/socket.c:1682
 do_syscall_x64 arch/x86/entry/common.c:46 [inline]
 do_syscall_64+0x4c/0xa0 arch/x86/entry/common.c:76
 entry_SYSCALL_64_after_hwframe+0x68/0xd2

Freed by task 4420:
 kasan_save_stack mm/kasan/common.c:46 [inline]
 kasan_set_track+0x4b/0x70 mm/kasan/common.c:53
 kasan_save_free_info+0x27/0x40 mm/kasan/generic.c:516
 ____kasan_slab_free+0x126/0x1f0 mm/kasan/common.c:237
 kasan_slab_free include/linux/kasan.h:177 [inline]
 slab_free_hook mm/slub.c:1735 [inline]
 slab_free_freelist_hook+0x133/0x1b0 mm/slub.c:1761
 slab_free mm/slub.c:3694 [inline]
 kmem_cache_free+0xf7/0x2a0 mm/slub.c:3716
 rcu_do_batch kernel/rcu/tree.c:2297 [inline]
 rcu_core+0x9a3/0x1740 kernel/rcu/tree.c:2557
 handle_softirqs+0x291/0x910 kernel/softirq.c:596
 __do_softirq kernel/softirq.c:630 [inline]
 invoke_softirq kernel/softirq.c:470 [inline]
 __irq_exit_rcu+0x13b/0x230 kernel/softirq.c:679
 irq_exit_rcu+0x5/0x20 kernel/softirq.c:691
 instr_sysvec_apic_timer_interrupt arch/x86/kernel/apic/apic.c:1118 [inline]
 sysvec_apic_timer_interrupt+0xa0/0xc0 arch/x86/kernel/apic/apic.c:1118
 asm_sysvec_apic_timer_interrupt+0x16/0x20 arch/x86/include/asm/idtentry.h:691

Last potentially related work creation:
 kasan_save_stack+0x3a/0x60 mm/kasan/common.c:46
 __kasan_record_aux_stack+0xb2/0xc0 mm/kasan/generic.c:486
 call_rcu+0x14f/0x950 kernel/rcu/tree.c:2849
 destroy_inode fs/inode.c:316 [inline]
 evict+0x915/0x9d0 fs/inode.c:718
 __dentry_kill+0x412/0x630 fs/dcache.c:611
 dentry_kill+0xb8/0x290 fs/dcache.c:-1
 dput+0xfa/0x1d0 fs/dcache.c:918
 __fput+0x597/0x8b0 fs/file_table.c:328
 task_work_run+0x1d0/0x260 kernel/task_work.c:203
 resume_user_mode_work include/linux/resume_user_mode.h:49 [inline]
 exit_to_user_mode_loop+0xe6/0x110 kernel/entry/common.c:180
 exit_to_user_mode_prepare+0xee/0x180 kernel/entry/common.c:213
 __syscall_exit_to_user_mode_work kernel/entry/common.c:295 [inline]
 syscall_exit_to_user_mode+0x16/0x40 kernel/entry/common.c:306
 do_syscall_64+0x58/0xa0 arch/x86/entry/common.c:82
 entry_SYSCALL_64_after_hwframe+0x68/0xd2

The buggy address belongs to the object at ffff88805be9f800
 which belongs to the cache sock_inode_cache of size 1408
The buggy address is located 568 bytes inside of
 1408-byte region [ffff88805be9f800, ffff88805be9fd80)

The buggy address belongs to the physical page:
page:ffffea00016fa600 refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x5be98
head:ffffea00016fa600 order:3 compound_mapcount:0 compound_pincount:0
memcg:ffff8880318f8001
flags: 0xfff00000010200(slab|head|node=0|zone=1|lastcpupid=0x7ff)
raw: 00fff00000010200 0000000000000000 dead000000000122 ffff8880192ea8c0
raw: 0000000000000000 0000000000150015 00000001ffffffff ffff8880318f8001
page dumped because: kasan: bad access detected
page_owner tracks the page as allocated
page last allocated via order 3, migratetype Reclaimable, gfp_mask 0x1d20d0(__GFP_IO|__GFP_FS|__GFP_NOWARN|__GFP_NORETRY|__GFP_COMP|__GFP_NOMEMALLOC|__GFP_HARDWALL|__GFP_RECLAIMABLE), pid 4420, tgid 4420 (syz-executor), ts 86895665458, free_ts 23099938228
 set_page_owner include/linux/page_owner.h:31 [inline]
 post_alloc_hook+0x173/0x1a0 mm/page_alloc.c:2560
 prep_new_page mm/page_alloc.c:2567 [inline]
 get_page_from_freelist+0x206b/0x2180 mm/page_alloc.c:4358
 __alloc_pages+0x1ec/0x4f0 mm/page_alloc.c:5658
 alloc_slab_page+0x5d/0x180 mm/slub.c:1805
 allocate_slab mm/slub.c:1950 [inline]
 new_slab+0x87/0x2d0 mm/slub.c:2003
 ___slab_alloc+0xbc5/0x1240 mm/slub.c:3161
 __slab_alloc mm/slub.c:3247 [inline]
 slab_alloc_node mm/slub.c:3332 [inline]
 slab_alloc mm/slub.c:3374 [inline]
 __kmem_cache_alloc_lru mm/slub.c:3381 [inline]
 kmem_cache_alloc_lru+0x104/0x2e0 mm/slub.c:3397
 alloc_inode_sb include/linux/fs.h:3278 [inline]
 sock_alloc_inode+0x24/0xc0 net/socket.c:306
 alloc_inode fs/inode.c:261 [inline]
 new_inode_pseudo+0x5f/0x1c0 fs/inode.c:1061
 sock_alloc net/socket.c:631 [inline]
 __sock_create+0x129/0x940 net/socket.c:1514
 sock_create net/socket.c:1606 [inline]
 __sys_socket_create net/socket.c:1643 [inline]
 __sys_socket+0xc4/0x190 net/socket.c:1671
 __do_sys_socket net/socket.c:1684 [inline]
 __se_sys_socket net/socket.c:1682 [inline]
 __x64_sys_socket+0x76/0x80 net/socket.c:1682
 do_syscall_x64 arch/x86/entry/common.c:46 [inline]
 do_syscall_64+0x4c/0xa0 arch/x86/entry/common.c:76
 entry_SYSCALL_64_after_hwframe+0x68/0xd2
page last free stack trace:
 reset_page_owner include/linux/page_owner.h:24 [inline]
 free_pages_prepare mm/page_alloc.c:1487 [inline]
 free_pcp_prepare mm/page_alloc.c:1537 [inline]
 free_unref_page_prepare+0x8e5/0x9e0 mm/page_alloc.c:3414
 free_unref_page+0x2e/0x3f0 mm/page_alloc.c:3509
 free_contig_range+0x9d/0x150 mm/page_alloc.c:9506
 destroy_args+0xef/0xa0e mm/debug_vm_pgtable.c:1031
 debug_vm_pgtable+0x33c/0x38e mm/debug_vm_pgtable.c:1359
 do_one_initcall+0x257/0x800 init/main.c:1271
 do_initcall_level+0x13d/0x1ed init/main.c:1344
 do_initcalls+0x4b/0x8a init/main.c:1360
 kernel_init_freeable+0x401/0x5ab init/main.c:1599
 kernel_init+0x19/0x1b0 init/main.c:1487
 ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:295

Memory state around the buggy address:
 ffff88805be9f900: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
 ffff88805be9f980: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
>ffff88805be9fa00: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
                                        ^
 ffff88805be9fa80: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
 ffff88805be9fb00: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
==================================================================

Crashes (12):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2026/11/19 17:15 linux-6.1.y c75b0cf0982c f138241c .config console log report syz / log C [disk image] [vmlinux] [kernel image] [mounted in repro (corrupt fs)] ci2-linux-6-1-kasan KASAN: use-after-free Read in ocfs2_read_quota_block
2026/11/30 01:19 linux-6.1.y 1ca1436ccc68 e1f06033 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan KASAN: use-after-free Read in ocfs2_read_quota_block
2026/11/26 17:38 linux-6.1.y 1ca1436ccc68 1c78e8c0 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan KASAN: use-after-free Read in ocfs2_read_quota_block
2026/11/26 17:37 linux-6.1.y 1ca1436ccc68 1c78e8c0 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan KASAN: use-after-free Read in ocfs2_read_quota_block
2026/11/25 23:28 linux-6.1.y 1ca1436ccc68 01ff072a .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan KASAN: use-after-free Read in ocfs2_read_quota_block
2026/11/17 15:28 linux-6.1.y c75b0cf0982c 43af6cac .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan KASAN: use-after-free Read in ocfs2_read_quota_block
2026/11/17 15:28 linux-6.1.y c75b0cf0982c 43af6cac .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan KASAN: use-after-free Read in ocfs2_read_quota_block
2026/11/26 17:02 linux-6.1.y 1ca1436ccc68 1c78e8c0 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan-arm64 KASAN: use-after-free Read in ocfs2_read_quota_block
2026/11/26 09:38 linux-6.1.y 1ca1436ccc68 9a575fe5 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan-arm64 KASAN: use-after-free Read in ocfs2_read_quota_block
2026/11/25 22:53 linux-6.1.y 1ca1436ccc68 01ff072a .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan-arm64 KASAN: use-after-free Read in ocfs2_read_quota_block
2026/11/25 22:53 linux-6.1.y 1ca1436ccc68 01ff072a .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan-arm64 KASAN: use-after-free Read in ocfs2_read_quota_block
2026/11/25 20:26 linux-6.1.y 1ca1436ccc68 01ff072a .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan-arm64 KASAN: use-after-free Read in ocfs2_read_quota_block
* Struck through repros no longer work on HEAD.