[v6.6] KASAN: stack-out-of-bounds Read in xfs_buf_lock

0 views
Skip to first unread message

syzbot

unread,
Oct 16, 2025, 11:43:33 PMOct 16
to syzkaller...@googlegroups.com
Hello,

syzbot found the following issue on:

HEAD commit: 0bbbd97a442d Linux 6.6.112
git tree: linux-6.6.y
console output: https://syzkaller.appspot.com/x/log.txt?x=168e9c58580000
kernel config: https://syzkaller.appspot.com/x/.config?x=12606d4b8832c7e4
dashboard link: https://syzkaller.appspot.com/bug?extid=6ee20f9609e4dc7dd708
compiler: Debian clang version 20.1.8 (++20250708063551+0c9f909b7976-1~exp1~20250708183702.136), Debian LLD 20.1.8

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

Downloadable assets:
disk image: https://storage.googleapis.com/syzbot-assets/7e387d57d751/disk-0bbbd97a.raw.xz
vmlinux: https://storage.googleapis.com/syzbot-assets/810d42505365/vmlinux-0bbbd97a.xz
kernel image: https://storage.googleapis.com/syzbot-assets/5d2fe115c227/bzImage-0bbbd97a.xz

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

==================================================================
BUG: KASAN: stack-out-of-bounds in __lock_acquire+0xff/0x7c80 kernel/locking/lockdep.c:5005
Read of size 8 at addr ffffc9000b9bf918 by task syz.6.2685/17328

CPU: 0 PID: 17328 Comm: syz.6.2685 Not tainted syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 10/02/2025
Call Trace:
<TASK>
dump_stack_lvl+0x16c/0x230 lib/dump_stack.c:106
print_address_description mm/kasan/report.c:364 [inline]
print_report+0xac/0x220 mm/kasan/report.c:468
kasan_report+0x117/0x150 mm/kasan/report.c:581
__lock_acquire+0xff/0x7c80 kernel/locking/lockdep.c:5005
lock_acquire+0x197/0x410 kernel/locking/lockdep.c:5754
__raw_spin_lock_irqsave include/linux/spinlock_api_smp.h:110 [inline]
_raw_spin_lock_irqsave+0xa8/0xf0 kernel/locking/spinlock.c:162
down+0x39/0xd0 kernel/locking/semaphore.c:60
xfs_buf_lock+0x14d/0x470 fs/xfs/xfs_buf.c:1126
xfs_buf_delwri_submit_buffers+0x152/0x890 fs/xfs/xfs_buf.c:2210
xfs_buf_delwri_submit+0xba/0x240 fs/xfs/xfs_buf.c:2288
xfs_qm_shrink_scan+0x198/0x380 fs/xfs/xfs_qm.c:522
do_shrink_slab+0x50f/0xd10 mm/vmscan.c:907
shrink_slab+0x1b7/0x7d0 mm/vmscan.c:1067
drop_slab_node mm/vmscan.c:1095 [inline]
drop_slab+0x15b/0x2a0 mm/vmscan.c:1113
drop_caches_sysctl_handler+0xc7/0x170 fs/drop_caches.c:68
proc_sys_call_handler+0x45d/0x6d0 fs/proc/proc_sysctl.c:599
do_iter_readv_writev fs/read_write.c:-1 [inline]
do_iter_write+0x79a/0xc70 fs/read_write.c:860
iter_file_splice_write+0x66f/0xc50 fs/splice.c:736
do_splice_from fs/splice.c:933 [inline]
direct_splice_actor+0xe8/0x130 fs/splice.c:1142
splice_direct_to_actor+0x2f0/0x870 fs/splice.c:1088
do_splice_direct+0x1b7/0x2c0 fs/splice.c:1194
do_sendfile+0x5dc/0xf70 fs/read_write.c:1254
__do_sys_sendfile64 fs/read_write.c:1316 [inline]
__se_sys_sendfile64+0xda/0x190 fs/read_write.c:1308
do_syscall_x64 arch/x86/entry/common.c:51 [inline]
do_syscall_64+0x55/0xb0 arch/x86/entry/common.c:81
entry_SYSCALL_64_after_hwframe+0x68/0xd2
RIP: 0033:0x7fb920d8eec9
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:00007fb921bb6038 EFLAGS: 00000246 ORIG_RAX: 0000000000000028
RAX: ffffffffffffffda RBX: 00007fb920fe5fa0 RCX: 00007fb920d8eec9
RDX: 0000200000002080 RSI: 0000000000000003 RDI: 0000000000000005
RBP: 00007fb920e11f91 R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000007 R11: 0000000000000246 R12: 0000000000000000
R13: 00007fb920fe6038 R14: 00007fb920fe5fa0 R15: 00007fff3e381eb8
</TASK>

The buggy address belongs to a 8-page vmalloc region starting at 0xffffc9000b9b8000 allocated at copy_process+0x549/0x3d70 kernel/fork.c:2331
The buggy address belongs to the physical page:
page:ffffea0001d0c700 refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x7431c
memcg:ffff88802de58082
flags: 0xfff00000000000(node=0|zone=1|lastcpupid=0x7ff)
page_type: 0xffffffff()
raw: 00fff00000000000 0000000000000000 dead000000000122 0000000000000000
raw: 0000000000000000 0000000000000000 00000001ffffffff ffff88802de58082
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 17305, tgid 17305 (syz.8.2683), ts 1715823227805, free_ts 1707751233558
set_page_owner include/linux/page_owner.h:31 [inline]
post_alloc_hook+0x1cd/0x210 mm/page_alloc.c:1554
prep_new_page mm/page_alloc.c:1561 [inline]
get_page_from_freelist+0x195c/0x19f0 mm/page_alloc.c:3191
__alloc_pages+0x1e3/0x460 mm/page_alloc.c:4457
vm_area_alloc_pages mm/vmalloc.c:3089 [inline]
__vmalloc_area_node mm/vmalloc.c:3158 [inline]
__vmalloc_node_range+0x96b/0x1320 mm/vmalloc.c:3339
alloc_thread_stack_node kernel/fork.c:310 [inline]
dup_task_struct+0x3d0/0x7c0 kernel/fork.c:1124
copy_process+0x549/0x3d70 kernel/fork.c:2331
kernel_clone+0x21b/0x840 kernel/fork.c:2914
__do_sys_clone3 kernel/fork.c:3215 [inline]
__se_sys_clone3+0x252/0x2c0 kernel/fork.c:3199
do_syscall_x64 arch/x86/entry/common.c:51 [inline]
do_syscall_64+0x55/0xb0 arch/x86/entry/common.c:81
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:1154 [inline]
free_unref_page_prepare+0x7ce/0x8e0 mm/page_alloc.c:2336
free_unref_page+0x32/0x2e0 mm/page_alloc.c:2429
pcpu_free_pages mm/percpu-vm.c:65 [inline]
pcpu_depopulate_chunk+0x465/0x500 mm/percpu-vm.c:330
pcpu_reclaim_populated mm/percpu.c:2188 [inline]
pcpu_balance_workfn+0x335/0x10e0 mm/percpu.c:2239
process_one_work kernel/workqueue.c:2634 [inline]
process_scheduled_works+0xa45/0x15b0 kernel/workqueue.c:2711
worker_thread+0xa55/0xfc0 kernel/workqueue.c:2792
kthread+0x2fa/0x390 kernel/kthread.c:388
ret_from_fork+0x48/0x80 arch/x86/kernel/process.c:152
ret_from_fork_asm+0x11/0x20 arch/x86/entry/entry_64.S:293

Memory state around the buggy address:
ffffc9000b9bf800: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
ffffc9000b9bf880: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
>ffffc9000b9bf900: f3 f3 f3 f3 f3 f3 f3 f3 00 00 00 00 00 00 00 00
^
ffffc9000b9bf980: 00 00 00 00 00 00 00 00 00 00 00 00 f1 f1 f1 f1
ffffc9000b9bfa00: 00 00 f3 f3 00 00 00 00 00 00 00 00 00 00 00 00
==================================================================


---
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
Reply all
Reply to author
Forward
0 new messages