syzbot


KASAN: use-after-free Read in ocfs2_fault (2)

Status: upstream: reported C repro on 2026/01/15 08:30
Bug presence: origin:upstream
[Documentation on labels]
Reported-by: syzbot+f898b1c69dd9e471ab17@syzkaller.appspotmail.com
First crash: 2d23h, last: 2d22h
Bug presence (1)
Date Name Commit Repro Result
2026/01/15 upstream (ToT) 603c05a1639f C [report] KASAN: slab-use-after-free Read in ocfs2_fault
Similar bugs (4)
Kernel Title Rank 🛈 Repro Cause bisect Fix bisect Count Last Reported Patched Status
linux-5.15 KASAN: use-after-free Read in ocfs2_fault 19 1 253d 253d 0/3 auto-obsoleted due to no activity on 2025/08/18 07:54
linux-6.1 KASAN: use-after-free Read in ocfs2_fault origin:lts-only 19 C 20 1d20h 232d 0/3 upstream: reported C repro on 2025/05/31 00:13
upstream KASAN: slab-use-after-free Read in ocfs2_fault ocfs2 19 C done 295 7h19m 492d 0/29 upstream: reported C repro on 2024/09/12 09:21
linux-6.6 KASAN: slab-use-after-free Read in ocfs2_fault origin:upstream missing-backport 19 C 3 24d 122d 0/2 upstream: reported C repro on 2025/09/17 19:37

Sample crash report:
         and is ignored by this kernel. Remove the mand
         option from the mount to silence this warning.
=======================================================
JBD2: Ignoring recovery information on journal
ocfs2: Mounting device (7,0) on (node local, slot 0) with ordered data mode.
==================================================================
BUG: KASAN: use-after-free in ocfs2_fault+0xd3/0x3c0 fs/ocfs2/mmap.c:41
Read of size 8 at addr ffff8880757a4e08 by task syz.0.17/4520

CPU: 1 PID: 4520 Comm: syz.0.17 Not tainted syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 10/25/2025
Call Trace:
 <TASK>
 dump_stack_lvl+0x168/0x230 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_fault+0xd3/0x3c0 fs/ocfs2/mmap.c:41
 __do_fault+0x141/0x330 mm/memory.c:3928
 do_read_fault mm/memory.c:4264 [inline]
 do_fault mm/memory.c:4392 [inline]
 handle_pte_fault mm/memory.c:4650 [inline]
 __handle_mm_fault mm/memory.c:4785 [inline]
 handle_mm_fault+0x2946/0x43b0 mm/memory.c:4883
 faultin_page mm/gup.c:976 [inline]
 __get_user_pages+0x93e/0x11c0 mm/gup.c:1197
 populate_vma_page_range+0x213/0x290 mm/gup.c:1529
 __mm_populate+0x26f/0x3a0 mm/gup.c:1638
 mm_populate include/linux/mm.h:2646 [inline]
 vm_mmap_pgoff+0x203/0x2b0 mm/util.c:556
 ksys_mmap_pgoff+0x542/0x780 mm/mmap.c:1635
 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:0x7f1732588749
Code: ff ff c3 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 40 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 a8 ff ff ff f7 d8 64 89 01 48
RSP: 002b:00007f1731bf7038 EFLAGS: 00000246 ORIG_RAX: 0000000000000009
RAX: ffffffffffffffda RBX: 00007f17327defa0 RCX: 00007f1732588749
RDX: 0000000000000002 RSI: 0000000000b36000 RDI: 0000200000000000
RBP: 00007f173260cf91 R08: 0000000000000004 R09: 0000000000000000
R10: 0000000000028011 R11: 0000000000000246 R12: 0000000000000000
R13: 00007f17327df038 R14: 00007f17327defa0 R15: 00007ffebee0e888
 </TASK>

Allocated by task 4520:
 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+0x9c/0xd0 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+0x100/0x290 mm/slub.c:3238
 vm_area_alloc+0x20/0xe0 kernel/fork.c:350
 __mmap_region mm/mmap.c:1782 [inline]
 mmap_region+0xac7/0x1660 mm/mmap.c:2933
 do_mmap+0x81f/0xea0 mm/mmap.c:1586
 vm_mmap_pgoff+0x1b2/0x2b0 mm/util.c:551
 ksys_mmap_pgoff+0x542/0x780 mm/mmap.c:1635
 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 4554:
 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+0xea/0x170 mm/slub.c:1736
 slab_free mm/slub.c:3504 [inline]
 kmem_cache_free+0x8f/0x210 mm/slub.c:3520
 remove_vma mm/mmap.c:188 [inline]
 remove_vma_list mm/mmap.c:2628 [inline]
 __do_munmap+0xc54/0xdc0 mm/mmap.c:2902
 do_munmap mm/mmap.c:2910 [inline]
 munmap_vma_range mm/mmap.c:603 [inline]
 __mmap_region mm/mmap.c:1757 [inline]
 mmap_region+0x8bb/0x1660 mm/mmap.c:2933
 do_mmap+0x81f/0xea0 mm/mmap.c:1586
 vm_mmap_pgoff+0x1b2/0x2b0 mm/util.c:551
 ksys_mmap_pgoff+0x542/0x780 mm/mmap.c:1635
 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 ffff8880757a4d68
 which belongs to the cache vm_area_struct of size 200
The buggy address is located 160 bytes inside of
 200-byte region [ffff8880757a4d68, ffff8880757a4e30)
The buggy address belongs to the page:
page:ffffea0001d5e900 refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x757a4
memcg:ffff88805c6f2e01
flags: 0xfff00000000200(slab|node=0|zone=1|lastcpupid=0x7ff)
raw: 00fff00000000200 ffffea0001d5ff00 0000000600000006 ffff888140007a00
raw: 0000000000000000 00000000800f000f 00000001ffffffff ffff88805c6f2e01
page dumped because: kasan: bad access detected
page_owner tracks the page as allocated
page last allocated via order 0, migratetype Unmovable, gfp_mask 0x12cc0(GFP_KERNEL|__GFP_NOWARN|__GFP_NORETRY), pid 3693, ts 20484920719, free_ts 20458344389
 prep_new_page mm/page_alloc.c:2426 [inline]
 get_page_from_freelist+0x1b77/0x1c60 mm/page_alloc.c:4192
 __alloc_pages+0x1e1/0x470 mm/page_alloc.c:5487
 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+0x81e/0xdf0 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+0x195/0x290 mm/slub.c:3238
 vm_area_dup+0x1e/0xb0 kernel/fork.c:358
 __split_vma+0xb1/0x410 mm/mmap.c:2730
 __do_munmap+0x3eb/0xdc0 mm/mmap.c:2865
 do_munmap mm/mmap.c:2910 [inline]
 munmap_vma_range mm/mmap.c:603 [inline]
 __mmap_region mm/mmap.c:1757 [inline]
 mmap_region+0x8bb/0x1660 mm/mmap.c:2933
 do_mmap+0x81f/0xea0 mm/mmap.c:1586
 vm_mmap_pgoff+0x1b2/0x2b0 mm/util.c:551
 ksys_mmap_pgoff+0x542/0x780 mm/mmap.c:1635
 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_list+0x122/0x7e0 mm/page_alloc.c:3433
 release_pages+0x184b/0x1bb0 mm/swap.c:963
 tlb_batch_pages_flush mm/mmu_gather.c:49 [inline]
 tlb_flush_mmu_free mm/mmu_gather.c:240 [inline]
 tlb_flush_mmu mm/mmu_gather.c:247 [inline]
 tlb_finish_mmu+0x164/0x2e0 mm/mmu_gather.c:338
 exit_mmap+0x3a6/0x5f0 mm/mmap.c:3218
 __mmput+0x115/0x3b0 kernel/fork.c:1127
 exit_mm+0x567/0x6c0 kernel/exit.c:550
 do_exit+0x5a1/0x20a0 kernel/exit.c:870
 do_group_exit+0x12e/0x300 kernel/exit.c:997
 __do_sys_exit_group kernel/exit.c:1008 [inline]
 __se_sys_exit_group kernel/exit.c:1006 [inline]
 __x64_sys_exit_group+0x3b/0x40 kernel/exit.c:1006
 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

Memory state around the buggy address:
 ffff8880757a4d00: fb fb fb fb fb fc fc fc fc fc fc fc fc fa fb fb
 ffff8880757a4d80: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
>ffff8880757a4e00: fb fb fb fb fb fb fc fc fc fc fc fc fc fc fb fb
                      ^
 ffff8880757a4e80: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
 ffff8880757a4f00: fb fb fb fb fb fb fb fc fc fc fc fc fc fc fc fc
==================================================================

Crashes (2):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2026/01/15 09:47 linux-5.15.y 68efe5a6c16a d6526ea3 .config console log report syz / log C [disk image] [vmlinux] [kernel image] [mounted in repro (clean fs)] ci2-linux-5-15-kasan KASAN: use-after-free Read in ocfs2_fault
2026/01/15 08:29 linux-5.15.y 68efe5a6c16a d6526ea3 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan KASAN: use-after-free Read in ocfs2_fault
* Struck through repros no longer work on HEAD.