[v6.1] KASAN: vmalloc-out-of-bounds Read in xfs_buf_lock

0 views
Skip to first unread message

syzbot

unread,
Feb 1, 2026, 12:42:34 AMFeb 1
to syzkaller...@googlegroups.com
Hello,

syzbot found the following issue on:

HEAD commit: cd9b81672742 Linux 6.1.161
git tree: linux-6.1.y
console output: https://syzkaller.appspot.com/x/log.txt?x=14babbfa580000
kernel config: https://syzkaller.appspot.com/x/.config?x=f0605c5af04d7603
dashboard link: https://syzkaller.appspot.com/bug?extid=80c9974e520006157dec
compiler: Debian clang version 21.1.8 (++20251221033036+2078da43e25a-1~exp1~20251221153213.50), Debian LLD 21.1.8

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

Downloadable assets:
disk image: https://storage.googleapis.com/syzbot-assets/7c7d6fd2ef9f/disk-cd9b8167.raw.xz
vmlinux: https://storage.googleapis.com/syzbot-assets/544b7fd5d4e0/vmlinux-cd9b8167.xz
kernel image: https://storage.googleapis.com/syzbot-assets/3454f19d3753/bzImage-cd9b8167.xz

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

syz.3.647 (6511): drop_caches: 2
syz.3.647 (6511): drop_caches: 2
syz.3.647 (6511): drop_caches: 2
syz.3.647 (6511): drop_caches: 2
syz.3.647 (6511): drop_caches: 2
==================================================================
BUG: KASAN: vmalloc-out-of-bounds in xfs_buf_lock+0x2a8/0x560 fs/xfs/xfs_buf.c:1118
Read of size 4 at addr ffffc900037f795c by task syz.3.647/6511

CPU: 1 PID: 6511 Comm: syz.3.647 Not tainted syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 10/25/2025
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
xfs_buf_lock+0x2a8/0x560 fs/xfs/xfs_buf.c:1118
xfs_buf_delwri_submit_buffers+0x161/0xa30 fs/xfs/xfs_buf.c:2201
xfs_buf_delwri_submit+0xc1/0x250 fs/xfs/xfs_buf.c:2279
xfs_qm_shrink_scan+0x1a3/0x390 fs/xfs/xfs_qm.c:522
do_shrink_slab+0x504/0xdb0 mm/vmscan.c:853
shrink_slab+0x1dd/0x770 mm/vmscan.c:1013
drop_slab_node mm/vmscan.c:1048 [inline]
drop_slab+0x164/0x290 mm/vmscan.c:1058
drop_caches_sysctl_handler+0xbe/0x160 fs/drop_caches.c:66
proc_sys_call_handler+0x45e/0x6d0 fs/proc/proc_sysctl.c:602
do_iter_readv_writev fs/read_write.c:-1 [inline]
do_iter_write+0x642/0xb10 fs/read_write.c:861
iter_file_splice_write+0x699/0xcc0 fs/splice.c:685
do_splice_from fs/splice.c:763 [inline]
direct_splice_actor+0xe1/0x130 fs/splice.c:950
splice_direct_to_actor+0x48b/0xb90 fs/splice.c:896
do_splice_direct+0x1ce/0x2f0 fs/splice.c:1002
do_sendfile+0x5f3/0xea0 fs/read_write.c:1255
__do_sys_sendfile64 fs/read_write.c:1323 [inline]
__se_sys_sendfile64+0x141/0x1a0 fs/read_write.c:1309
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:0x7f2bdb39aeb9
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:00007f2bdc220028 EFLAGS: 00000246 ORIG_RAX: 0000000000000028
RAX: ffffffffffffffda RBX: 00007f2bdb615fa0 RCX: 00007f2bdb39aeb9
RDX: 0000000000000000 RSI: 0000000000000003 RDI: 0000000000000004
RBP: 00007f2bdb408c1f R08: 0000000000000000 R09: 0000000000000000
R10: 0000000020fffe82 R11: 0000000000000246 R12: 0000000000000000
R13: 00007f2bdb616038 R14: 00007f2bdb615fa0 R15: 00007ffc7c041628
</TASK>

The buggy address belongs to a 8-page vmalloc region starting at 0xffffc900037f0000 allocated at copy_process+0x5fa/0x4030 kernel/fork.c:2186
The buggy address belongs to the physical page:
page:ffffea0000bca2c0 refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x2f28b
memcg:ffff888078823482
flags: 0xfff00000000000(node=0|zone=1|lastcpupid=0x7ff)
raw: 00fff00000000000 0000000000000000 dead000000000122 0000000000000000
raw: 0000000000000000 0000000000000000 00000001ffffffff ffff888078823482
page dumped because: kasan: bad access detected
page_owner tracks the page as allocated
page last allocated via order 0, migratetype Unmovable, gfp_mask 0x102dc2(GFP_HIGHUSER|__GFP_NOWARN|__GFP_ZERO), pid 6498, tgid 6498 (syz.4.644), ts 212166810432, free_ts 212076004432
set_page_owner include/linux/page_owner.h:31 [inline]
post_alloc_hook+0x173/0x1a0 mm/page_alloc.c:2532
prep_new_page mm/page_alloc.c:2539 [inline]
get_page_from_freelist+0x1a1e/0x1ab0 mm/page_alloc.c:4328
__alloc_pages+0x1ec/0x4f0 mm/page_alloc.c:5614
vm_area_alloc_pages mm/vmalloc.c:3002 [inline]
__vmalloc_area_node mm/vmalloc.c:3071 [inline]
__vmalloc_node_range+0x944/0x13b0 mm/vmalloc.c:3243
alloc_thread_stack_node kernel/fork.c:312 [inline]
dup_task_struct+0x3d3/0x6b0 kernel/fork.c:994
copy_process+0x5fa/0x4030 kernel/fork.c:2186
kernel_clone+0x24b/0x900 kernel/fork.c:2762
__do_sys_clone3 kernel/fork.c:3061 [inline]
__se_sys_clone3+0x32d/0x3f0 kernel/fork.c:3045
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:1459 [inline]
free_pcp_prepare mm/page_alloc.c:1509 [inline]
free_unref_page_prepare+0x8b4/0x9a0 mm/page_alloc.c:3384
free_unref_page_list+0xbb/0x8e0 mm/page_alloc.c:3525
release_pages+0x1fa6/0x2220 mm/swap.c:1035
tlb_batch_pages_flush mm/mmu_gather.c:59 [inline]
tlb_flush_mmu_free mm/mmu_gather.c:254 [inline]
tlb_flush_mmu+0x105/0x220 mm/mmu_gather.c:261
tlb_finish_mmu+0xbd/0x1c0 mm/mmu_gather.c:361
exit_mmap+0x384/0x960 mm/mmap.c:3262
__mmput+0x118/0x3c0 kernel/fork.c:1205
exit_mm+0x1fe/0x2d0 kernel/exit.c:565
do_exit+0x905/0x2480 kernel/exit.c:867
do_group_exit+0x217/0x2d0 kernel/exit.c:1022
__do_sys_exit_group kernel/exit.c:1033 [inline]
__se_sys_exit_group kernel/exit.c:1031 [inline]
__x64_sys_exit_group+0x3b/0x40 kernel/exit.c:1031
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

Memory state around the buggy address:
ffffc900037f7800: 00 00 00 00 00 00 00 00 f1 f1 f1 f1 f8 f8 f8 f8
ffffc900037f7880: f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8
>ffffc900037f7900: f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f3 f3 f3 f3
^
ffffc900037f7980: f3 f3 f3 f3 00 00 00 00 00 00 00 00 00 00 00 00
ffffc900037f7a00: 00 00 00 00 00 00 00 00 f1 f1 f1 f1 00 00 f3 f3
==================================================================


---
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,
12:43 PM (8 hours ago) 12:43 PM
to syzkaller...@googlegroups.com
syzbot has found a reproducer for the following issue on:

HEAD commit: 1989cd3d56e2 Linux 6.1.167
git tree: linux-6.1.y
console output: https://syzkaller.appspot.com/x/log.txt?x=10660bd6580000
kernel config: https://syzkaller.appspot.com/x/.config?x=f0605c5af04d7603
dashboard link: https://syzkaller.appspot.com/bug?extid=80c9974e520006157dec
compiler: Debian clang version 21.1.8 (++20251221033036+2078da43e25a-1~exp1~20251221153213.50), Debian LLD 21.1.8
syz repro: https://syzkaller.appspot.com/x/repro.syz?x=11fd4e06580000
C reproducer: https://syzkaller.appspot.com/x/repro.c?x=137a86ba580000

Downloadable assets:
disk image: https://storage.googleapis.com/syzbot-assets/814271465bd5/disk-1989cd3d.raw.xz
vmlinux: https://storage.googleapis.com/syzbot-assets/bd559379c491/vmlinux-1989cd3d.xz
kernel image: https://storage.googleapis.com/syzbot-assets/063c12bf8ba7/bzImage-1989cd3d.xz
mounted in repro: https://storage.googleapis.com/syzbot-assets/02fe6d0c80ea/mount_0.gz
fsck result: failed (log: https://syzkaller.appspot.com/x/fsck.log?x=155ecdda580000)

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

XFS (loop1): Quotacheck needed: Please wait.
XFS (loop1): Quotacheck: Done.
==================================================================
BUG: KASAN: vmalloc-out-of-bounds in xfs_buf_lock+0x2a8/0x560 fs/xfs/xfs_buf.c:1118
Read of size 4 at addr ffffc90005d3795c by task syz.1.104/5242

CPU: 0 PID: 5242 Comm: syz.1.104 Not tainted syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 03/18/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
xfs_buf_lock+0x2a8/0x560 fs/xfs/xfs_buf.c:1118
xfs_buf_delwri_submit_buffers+0x161/0xa30 fs/xfs/xfs_buf.c:2201
xfs_buf_delwri_submit+0xc1/0x250 fs/xfs/xfs_buf.c:2279
xfs_qm_shrink_scan+0x1a3/0x390 fs/xfs/xfs_qm.c:522
do_shrink_slab+0x504/0xdb0 mm/vmscan.c:853
shrink_slab+0x1dd/0x770 mm/vmscan.c:1013
drop_slab_node mm/vmscan.c:1048 [inline]
drop_slab+0x164/0x290 mm/vmscan.c:1058
drop_caches_sysctl_handler+0xbe/0x160 fs/drop_caches.c:66
proc_sys_call_handler+0x45e/0x6d0 fs/proc/proc_sysctl.c:602
do_iter_readv_writev fs/read_write.c:-1 [inline]
do_iter_write+0x642/0xb10 fs/read_write.c:861
iter_file_splice_write+0x699/0xcc0 fs/splice.c:685
do_splice_from fs/splice.c:763 [inline]
direct_splice_actor+0xe1/0x130 fs/splice.c:950
splice_direct_to_actor+0x48b/0xb90 fs/splice.c:896
do_splice_direct+0x1ce/0x2f0 fs/splice.c:1002
do_sendfile+0x5f3/0xea0 fs/read_write.c:1255
__do_sys_sendfile64 fs/read_write.c:1317 [inline]
__se_sys_sendfile64+0xdc/0x1a0 fs/read_write.c:1309
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:0x7f05bd79c819
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:00007ffee3aca918 EFLAGS: 00000246 ORIG_RAX: 0000000000000028
RAX: ffffffffffffffda RBX: 00007f05bda15fa0 RCX: 00007f05bd79c819
RDX: 0000200000002080 RSI: 0000000000000004 RDI: 0000000000000005
RBP: 00007f05bd832c91 R08: 0000000000000000 R09: 0000000000000000
R10: 000000000000023b R11: 0000000000000246 R12: 0000000000000000
R13: 00007f05bda15fac R14: 00007f05bda15fa0 R15: 00007f05bda15fa0
</TASK>

The buggy address belongs to a 8-page vmalloc region starting at 0xffffc90005d30000 allocated at copy_process+0x5fa/0x4030 kernel/fork.c:2186
The buggy address belongs to the physical page:
page:ffffea0000bc4c00 refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x2f130
memcg:ffff88814338fa82
flags: 0xfff00000000000(node=0|zone=1|lastcpupid=0x7ff)
raw: 00fff00000000000 0000000000000000 dead000000000122 0000000000000000
raw: 0000000000000000 0000000000000000 00000001ffffffff ffff88814338fa82
page dumped because: kasan: bad access detected
page_owner tracks the page as allocated
page last allocated via order 0, migratetype Unmovable, gfp_mask 0x102dc2(GFP_HIGHUSER|__GFP_NOWARN|__GFP_ZERO), pid 2, tgid 2 (kthreadd), ts 142565482694, free_ts 141567530433
set_page_owner include/linux/page_owner.h:31 [inline]
post_alloc_hook+0x173/0x1a0 mm/page_alloc.c:2559
prep_new_page mm/page_alloc.c:2566 [inline]
get_page_from_freelist+0x1a1e/0x1ab0 mm/page_alloc.c:4357
__alloc_pages+0x1ec/0x4f0 mm/page_alloc.c:5657
vm_area_alloc_pages mm/vmalloc.c:3002 [inline]
__vmalloc_area_node mm/vmalloc.c:3071 [inline]
__vmalloc_node_range+0x944/0x13b0 mm/vmalloc.c:3243
alloc_thread_stack_node kernel/fork.c:312 [inline]
dup_task_struct+0x3d3/0x6b0 kernel/fork.c:994
copy_process+0x5fa/0x4030 kernel/fork.c:2186
kernel_clone+0x24b/0x900 kernel/fork.c:2762
kernel_thread+0x118/0x180 kernel/fork.c:2822
create_kthread kernel/kthread.c:399 [inline]
kthreadd+0x555/0x700 kernel/kthread.c:748
ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:295
page last free stack trace:
reset_page_owner include/linux/page_owner.h:24 [inline]
free_pages_prepare mm/page_alloc.c:1486 [inline]
free_pcp_prepare mm/page_alloc.c:1536 [inline]
free_unref_page_prepare+0x8b4/0x9a0 mm/page_alloc.c:3413
free_unref_page_list+0xbb/0x8e0 mm/page_alloc.c:3554
release_pages+0x1fa6/0x2220 mm/swap.c:1035
__pagevec_release+0x6d/0xe0 mm/swap.c:1055
pagevec_release include/linux/pagevec.h:71 [inline]
folio_batch_release include/linux/pagevec.h:135 [inline]
invalidate_mapping_pagevec+0x5c8/0x6f0 mm/truncate.c:567
xfs_free_buftarg+0x74/0xd0 fs/xfs/xfs_buf.c:1948
xfs_fs_put_super+0x248/0x2d0 fs/xfs/xfs_super.c:1126
generic_shutdown_super+0x130/0x340 fs/super.c:501
kill_block_super+0x7c/0xe0 fs/super.c:1470
deactivate_locked_super+0x93/0xf0 fs/super.c:332
cleanup_mnt+0x42c/0x4b0 fs/namespace.c:1191
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:177
exit_to_user_mode_prepare+0xee/0x180 kernel/entry/common.c:210
__syscall_exit_to_user_mode_work kernel/entry/common.c:292 [inline]
syscall_exit_to_user_mode+0x16/0x40 kernel/entry/common.c:303
do_syscall_64+0x58/0xa0 arch/x86/entry/common.c:82

Memory state around the buggy address:
ffffc90005d37800: 00 00 00 00 00 00 00 00 f1 f1 f1 f1 f8 f8 f8 f8
ffffc90005d37880: f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8
>ffffc90005d37900: f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f3 f3 f3 f3
^
ffffc90005d37980: f3 f3 f3 f3 00 00 00 00 00 00 00 00 00 00 00 00
ffffc90005d37a00: 00 00 00 00 00 00 00 00 f1 f1 f1 f1 00 00 f3 f3
==================================================================


---
If you want syzbot to run the reproducer, reply with:
#syz test: git://repo/address.git branch-or-commit-hash
If you attach or paste a git patch, syzbot will apply it before testing.
Reply all
Reply to author
Forward
0 new messages