[v5.15] KASAN: use-after-free Read in ocfs2_fault

6 views
Skip to first unread message

syzbot

unread,
May 10, 2025, 3:54:23 AM5/10/25
to syzkaller...@googlegroups.com
Hello,

syzbot found the following issue on:

HEAD commit: 3b8db0e4f263 Linux 5.15.182
git tree: linux-5.15.y
console output: https://syzkaller.appspot.com/x/log.txt?x=15468cf4580000
kernel config: https://syzkaller.appspot.com/x/.config?x=dd5e00a2e31fafd7
dashboard link: https://syzkaller.appspot.com/bug?extid=af8c6eb5765c3ac0de6e
compiler: Debian clang version 20.1.2 (++20250402124445+58df0ef89dd6-1~exp1~20250402004600.97), Debian LLD 20.1.2
userspace arch: arm64

Unfortunately, I don't have any reproducer for this issue yet.

Downloadable assets:
disk image: https://storage.googleapis.com/syzbot-assets/ff1afedf7b4d/disk-3b8db0e4.raw.xz
vmlinux: https://storage.googleapis.com/syzbot-assets/19cb045784cf/vmlinux-3b8db0e4.xz
kernel image: https://storage.googleapis.com/syzbot-assets/43c663d2f6a5/Image-3b8db0e4.gz.xz

IMPORTANT: if you fix the issue, please add the following tag to the commit:
Reported-by: syzbot+af8c6e...@syzkaller.appspotmail.com

netlink: 'syz.4.275': attribute type 2 has an invalid length.
netlink: 'syz.4.275': attribute type 2 has an invalid length.
==================================================================
BUG: KASAN: use-after-free in ocfs2_fault+0xc8/0x414 fs/ocfs2/mmap.c:41
Read of size 8 at addr ffff0000c1da03b8 by task syz.4.275/5117

CPU: 0 PID: 5117 Comm: syz.4.275 Not tainted 5.15.182-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 04/19/2025
Call trace:
dump_backtrace+0x0/0x43c arch/arm64/kernel/stacktrace.c:152
show_stack+0x2c/0x3c arch/arm64/kernel/stacktrace.c:216
__dump_stack+0x30/0x40 lib/dump_stack.c:88
dump_stack_lvl+0xf8/0x160 lib/dump_stack.c:106
print_address_description+0x78/0x30c mm/kasan/report.c:248
__kasan_report mm/kasan/report.c:434 [inline]
kasan_report+0xec/0x15c mm/kasan/report.c:451
__asan_report_load8_noabort+0x44/0x50 mm/kasan/report_generic.c:309
ocfs2_fault+0xc8/0x414 fs/ocfs2/mmap.c:41
__do_fault+0x120/0x5d0 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+0x1b4c/0x2950 mm/memory.c:4883
__do_page_fault arch/arm64/mm/fault.c:505 [inline]
do_page_fault+0x694/0xad4 arch/arm64/mm/fault.c:605
do_translation_fault+0xe0/0x130 arch/arm64/mm/fault.c:686
do_mem_abort+0x6c/0x1ac arch/arm64/mm/fault.c:819
el1_abort+0x3c/0x5c arch/arm64/kernel/entry-common.c:358
el1h_64_sync_handler+0x80/0xcc arch/arm64/kernel/entry-common.c:418
el1h_64_sync+0x78/0x7c arch/arm64/kernel/entry.S:522
__arch_copy_from_user+0x84/0x218 arch/arm64/lib/copy_template.S:89
copy_msghdr_from_user net/socket.c:2369 [inline]
sendmsg_copy_msghdr net/socket.c:2467 [inline]
___sys_sendmsg+0x140/0x240 net/socket.c:2486
__sys_sendmsg net/socket.c:2519 [inline]
__do_sys_sendmsg net/socket.c:2528 [inline]
__se_sys_sendmsg net/socket.c:2526 [inline]
__arm64_sys_sendmsg+0x1a8/0x254 net/socket.c:2526
__invoke_syscall arch/arm64/kernel/syscall.c:38 [inline]
invoke_syscall+0x98/0x2b8 arch/arm64/kernel/syscall.c:52
el0_svc_common+0x138/0x258 arch/arm64/kernel/syscall.c:142
do_el0_svc+0x58/0x14c arch/arm64/kernel/syscall.c:181
el0_svc+0x78/0x1e0 arch/arm64/kernel/entry-common.c:608
el0t_64_sync_handler+0xcc/0xe4 arch/arm64/kernel/entry-common.c:626
el0t_64_sync+0x1a0/0x1a4 arch/arm64/kernel/entry.S:584

Allocated by task 5154:
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+0x8c/0xcc mm/kasan/common.c:467
kasan_slab_alloc include/linux/kasan.h:254 [inline]
slab_post_alloc_hook+0x74/0x408 mm/slab.h:519
slab_alloc_node mm/slub.c:3220 [inline]
slab_alloc mm/slub.c:3228 [inline]
kmem_cache_alloc+0x1e0/0x3e4 mm/slub.c:3233
vm_area_alloc+0x2c/0xe0 kernel/fork.c:350
__mmap_region mm/mmap.c:1770 [inline]
mmap_region+0x99c/0x1390 mm/mmap.c:2921
do_mmap+0x67c/0xdb4 mm/mmap.c:1574
vm_mmap_pgoff+0x184/0x284 mm/util.c:551
ksys_mmap_pgoff+0x410/0x620 mm/mmap.c:1623
__do_sys_mmap arch/arm64/kernel/sys.c:28 [inline]
__se_sys_mmap arch/arm64/kernel/sys.c:21 [inline]
__arm64_sys_mmap+0xf8/0x110 arch/arm64/kernel/sys.c:21
__invoke_syscall arch/arm64/kernel/syscall.c:38 [inline]
invoke_syscall+0x98/0x2b8 arch/arm64/kernel/syscall.c:52
el0_svc_common+0x138/0x258 arch/arm64/kernel/syscall.c:142
do_el0_svc+0x58/0x14c arch/arm64/kernel/syscall.c:181
el0_svc+0x78/0x1e0 arch/arm64/kernel/entry-common.c:608
el0t_64_sync_handler+0xcc/0xe4 arch/arm64/kernel/entry-common.c:626
el0t_64_sync+0x1a0/0x1a4 arch/arm64/kernel/entry.S:584

Freed by task 5154:
kasan_save_stack mm/kasan/common.c:38 [inline]
kasan_set_track+0x4c/0x84 mm/kasan/common.c:46
kasan_set_free_info+0x28/0x4c mm/kasan/generic.c:360
____kasan_slab_free+0x118/0x164 mm/kasan/common.c:366
__kasan_slab_free+0x18/0x28 mm/kasan/common.c:374
kasan_slab_free include/linux/kasan.h:230 [inline]
slab_free_hook mm/slub.c:1705 [inline]
slab_free_freelist_hook+0x128/0x1e8 mm/slub.c:1731
slab_free mm/slub.c:3499 [inline]
kmem_cache_free+0xdc/0x3b4 mm/slub.c:3515
vm_area_free+0x28/0x38 kernel/fork.c:376
remove_vma mm/mmap.c:187 [inline]
remove_vma_list mm/mmap.c:2616 [inline]
__do_munmap+0xaa0/0xc04 mm/mmap.c:2890
do_munmap mm/mmap.c:2898 [inline]
munmap_vma_range mm/mmap.c:602 [inline]
__mmap_region mm/mmap.c:1745 [inline]
mmap_region+0x7b0/0x1390 mm/mmap.c:2921
do_mmap+0x67c/0xdb4 mm/mmap.c:1574
vm_mmap_pgoff+0x184/0x284 mm/util.c:551
ksys_mmap_pgoff+0x410/0x620 mm/mmap.c:1623
__do_sys_mmap arch/arm64/kernel/sys.c:28 [inline]
__se_sys_mmap arch/arm64/kernel/sys.c:21 [inline]
__arm64_sys_mmap+0xf8/0x110 arch/arm64/kernel/sys.c:21
__invoke_syscall arch/arm64/kernel/syscall.c:38 [inline]
invoke_syscall+0x98/0x2b8 arch/arm64/kernel/syscall.c:52
el0_svc_common+0x138/0x258 arch/arm64/kernel/syscall.c:142
do_el0_svc+0x58/0x14c arch/arm64/kernel/syscall.c:181
el0_svc+0x78/0x1e0 arch/arm64/kernel/entry-common.c:608
el0t_64_sync_handler+0xcc/0xe4 arch/arm64/kernel/entry-common.c:626
el0t_64_sync+0x1a0/0x1a4 arch/arm64/kernel/entry.S:584

The buggy address belongs to the object at ffff0000c1da0318
which belongs to the cache vm_area_struct of size 200
The buggy address is located 160 bytes inside of
200-byte region [ffff0000c1da0318, ffff0000c1da03e0)
The buggy address belongs to the page:
page:000000005e52425c refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x101da0
memcg:ffff0000c9b4fe01
flags: 0x5ffc00000000200(slab|node=0|zone=2|lastcpupid=0x7ff)
raw: 05ffc00000000200 0000000000000000 0000000900000001 ffff0000c0841500
raw: 0000000000000000 00000000000f000f 00000001ffffffff ffff0000c9b4fe01
page dumped because: kasan: bad access detected

Memory state around the buggy address:
ffff0000c1da0280: fb fb fb fb fb fb fb fb fb fb fb fc fc fc fc fc
ffff0000c1da0300: fc fc fc fa fb fb fb fb fb fb fb fb fb fb fb fb
>ffff0000c1da0380: fb fb fb fb fb fb fb fb fb fb fb fb fc fc fc fc
^
ffff0000c1da0400: fc fc fc fc fa fb fb fb fb fb fb fb fb fb fb fb
ffff0000c1da0480: fb fb fb fb fb fb fb fb fb fb fb fb fb fc fc fc
==================================================================


---
This report is generated by a bot. It may contain errors.
See https://goo.gl/tpsmEJ for more information about syzbot.
syzbot engineers can be reached at syzk...@googlegroups.com.

syzbot will keep track of this issue. See:
https://goo.gl/tpsmEJ#status for how to communicate with syzbot.

If the report is already addressed, let syzbot know by replying with:
#syz fix: exact-commit-title

If you want to overwrite report's subsystems, reply with:
#syz set subsystems: new-subsystem
(See the list of subsystem names on the web dashboard)

If the report is a duplicate of another one, reply with:
#syz dup: exact-subject-of-another-report

If you want to undo deduplication, reply with:
#syz undup

syzbot

unread,
Aug 18, 2025, 3:54:19 AM8/18/25
to syzkaller...@googlegroups.com
Auto-closing this bug as obsolete.
Crashes did not happen for a while, no reproducer and no activity.
Reply all
Reply to author
Forward
0 new messages