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

0 views
Skip to first unread message

syzbot

unread,
Jun 16, 2025, 2:33:31 AMJun 16
to syzkaller...@googlegroups.com
Hello,

syzbot found the following issue on:

HEAD commit: 1c700860e8bc Linux 5.15.185
git tree: linux-5.15.y
console output: https://syzkaller.appspot.com/x/log.txt?x=142f890c580000
kernel config: https://syzkaller.appspot.com/x/.config?x=1ea6d61094f2bc7
dashboard link: https://syzkaller.appspot.com/bug?extid=40d017dda3401fc816fd
compiler: Debian clang version 20.1.6 (++20250514063057+1e4d39e07757-1~exp1~20250514183223.118), Debian LLD 20.1.6
userspace arch: arm64

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

Downloadable assets:
disk image: https://storage.googleapis.com/syzbot-assets/5b3869563672/disk-1c700860.raw.xz
vmlinux: https://storage.googleapis.com/syzbot-assets/382d7f427d53/vmlinux-1c700860.xz
kernel image: https://storage.googleapis.com/syzbot-assets/c344c3ce2e27/Image-1c700860.gz.xz

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

==================================================================
BUG: KASAN: use-after-free in __list_lru_walk_one+0x1e4/0x558 mm/list_lru.c:211
Read of size 8 at addr ffff0000c52a7078 by task syz.0.633/7079

CPU: 1 PID: 7079 Comm: syz.0.633 Not tainted 5.15.185-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 05/07/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
__list_lru_walk_one+0x1e4/0x558 mm/list_lru.c:211
list_lru_walk_one+0xa8/0xf0 mm/list_lru.c:266
list_lru_shrink_walk include/linux/list_lru.h:195 [inline]
gfs2_qd_shrink_scan+0x12c/0x7b0 fs/gfs2/quota.c:172
do_shrink_slab+0x4c0/0xfb8 mm/vmscan.c:765
shrink_slab+0x190/0x6fc mm/vmscan.c:925
drop_slab_node+0xcc/0x170 mm/vmscan.c:960
drop_slab+0x84/0xf8 mm/vmscan.c:970
drop_caches_sysctl_handler+0x16c/0x2fc fs/drop_caches.c:66
proc_sys_call_handler+0x3fc/0x69c fs/proc/proc_sysctl.c:588
proc_sys_write+0x2c/0x3c fs/proc/proc_sysctl.c:614
do_iter_readv_writev+0x3a0/0x4f8 fs/read_write.c:-1
do_iter_write+0x1c4/0x670 fs/read_write.c:855
vfs_writev fs/read_write.c:928 [inline]
do_writev+0x1e0/0x380 fs/read_write.c:971
__do_sys_writev fs/read_write.c:1044 [inline]
__se_sys_writev fs/read_write.c:1041 [inline]
__arm64_sys_writev+0x80/0x94 fs/read_write.c:1041
__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 6118:
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
kmem_cache_zalloc include/linux/slab.h:725 [inline]
qd_alloc+0x64/0x22c fs/gfs2/quota.c:216
qd_get+0x294/0x608 fs/gfs2/quota.c:275
gfs2_set_dqblk+0x1a8/0x9cc fs/gfs2/quota.c:1704
quota_setquota+0x428/0x4b8 fs/quota/quota.c:309
do_quotactl+0x65c/0x738 fs/quota/quota.c:801
__do_sys_quotactl fs/quota/quota.c:959 [inline]
__se_sys_quotactl fs/quota/quota.c:915 [inline]
__arm64_sys_quotactl+0x2ac/0x734 fs/quota/quota.c:915
__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

Last potentially related work creation:
kasan_save_stack+0x38/0x68 mm/kasan/common.c:38
kasan_record_aux_stack+0xcc/0x114 mm/kasan/generic.c:348
__call_rcu kernel/rcu/tree.c:3007 [inline]
call_rcu+0x110/0x8f0 kernel/rcu/tree.c:3087
gfs2_quota_cleanup+0x3f0/0x670 fs/gfs2/quota.c:1490
gfs2_make_fs_ro+0x1f0/0x51c fs/gfs2/super.c:557
signal_our_withdraw fs/gfs2/util.c:166 [inline]
gfs2_withdraw+0x4cc/0x129c fs/gfs2/util.c:343
gfs2_consist_inode_i+0xcc/0xe8 fs/gfs2/util.c:456
gfs2_dirent_scan+0x458/0x584 fs/gfs2/dir.c:602
gfs2_dirent_search+0x24c/0x6f0 fs/gfs2/dir.c:850
gfs2_dir_search+0x5c/0x204 fs/gfs2/dir.c:1651
gfs2_lookupi+0x3bc/0x530 fs/gfs2/inode.c:332
__gfs2_lookup+0xa8/0x268 fs/gfs2/inode.c:873
gfs2_lookup+0x2c/0x3c fs/gfs2/inode.c:907
lookup_one_qstr_excl+0x108/0x230 fs/namei.c:1563
do_rmdir+0x18c/0x634 fs/namei.c:4198
__do_sys_unlinkat fs/namei.c:4390 [inline]
__se_sys_unlinkat fs/namei.c:4384 [inline]
__arm64_sys_unlinkat+0xcc/0xfc fs/namei.c:4384
__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 ffff0000c52a7000
which belongs to the cache gfs2_quotad of size 272
The buggy address is located 120 bytes inside of
272-byte region [ffff0000c52a7000, ffff0000c52a7110)
The buggy address belongs to the page:
page:00000000cb7694cb refcount:1 mapcount:0 mapping:0000000000000000 index:0xffff0000c52a7000 pfn:0x1052a7
flags: 0x5ffc00000000200(slab|node=0|zone=2|lastcpupid=0x7ff)
raw: 05ffc00000000200 0000000000000000 dead000000000122 ffff0000c6d42300
raw: ffff0000c52a7000 00000000800c000b 00000001ffffffff 0000000000000000
page dumped because: kasan: bad access detected

Memory state around the buggy address:
ffff0000c52a6f00: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
ffff0000c52a6f80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
>ffff0000c52a7000: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
^
ffff0000c52a7080: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
ffff0000c52a7100: fb fb fc fc fc fc fc fc fc fc fc fc fc fc fc fc
==================================================================
list_del corruption, ffff0000c52a7010->next is LIST_POISON1 (dead000000000100)
------------[ cut here ]------------
kernel BUG at lib/list_debug.c:55!
Internal error: Oops - BUG: 00000000f2000800 [#1] PREEMPT SMP
Modules linked in:
CPU: 1 PID: 7079 Comm: syz.0.633 Tainted: G B 5.15.185-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 05/07/2025
pstate: 60400005 (nZCv daif +PAN -UAO -TCO -DIT -SSBS BTYPE=--)
pc : __list_del_entry_valid+0x110/0x150 lib/list_debug.c:53
lr : __list_del_entry_valid+0x110/0x150 lib/list_debug.c:53
sp : ffff80001f7e73d0
x29: ffff80001f7e73d0 x28: dead000000000100 x27: ffff0000c52a70c8
x26: ffff800014835ca0 x25: ffff0000c52a7010 x24: 1fffe00018a54e0f
x23: ffff80001f7e7468 x22: dead000000000100 x21: dfff800000000000
x20: dead000000000122 x19: ffff0000c52a7010 x18: 0000000000000002
x17: 0000000000000002 x16: ffff8000111a97c4 x15: 00000000ffffffff
x14: 0000000000ff0100 x13: 0000000000000001 x12: 0000000000080000
x11: 000000000007ffff x10: ffff80002e88f000 x9 : e4544906ad1e9100
x8 : e4544906ad1e9100 x7 : 0000000000000001 x6 : 0000000000000001
x5 : ffff80001f7e6cb8 x4 : ffff80001423f280 x3 : ffff80000a732684
x2 : ffff0001a110ad10 x1 : 0000000000000001 x0 : 000000000000004e
Call trace:
__list_del_entry_valid+0x110/0x150 lib/list_debug.c:53
__list_del_entry include/linux/list.h:132 [inline]
list_del include/linux/list.h:146 [inline]
gfs2_qd_dispose fs/gfs2/quota.c:125 [inline]
gfs2_qd_shrink_scan+0x26c/0x7b0 fs/gfs2/quota.c:175
do_shrink_slab+0x4c0/0xfb8 mm/vmscan.c:765
shrink_slab+0x190/0x6fc mm/vmscan.c:925
drop_slab_node+0xcc/0x170 mm/vmscan.c:960
drop_slab+0x84/0xf8 mm/vmscan.c:970
drop_caches_sysctl_handler+0x16c/0x2fc fs/drop_caches.c:66
proc_sys_call_handler+0x3fc/0x69c fs/proc/proc_sysctl.c:588
proc_sys_write+0x2c/0x3c fs/proc/proc_sysctl.c:614
do_iter_readv_writev+0x3a0/0x4f8 fs/read_write.c:-1
do_iter_write+0x1c4/0x670 fs/read_write.c:855
vfs_writev fs/read_write.c:928 [inline]
do_writev+0x1e0/0x380 fs/read_write.c:971
__do_sys_writev fs/read_write.c:1044 [inline]
__se_sys_writev fs/read_write.c:1041 [inline]
__arm64_sys_writev+0x80/0x94 fs/read_write.c:1041
__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
Code: 912e0000 aa1303e1 f2fbd5a2 95a5823a (d4210000)
---[ end trace 4e885e368a8975d6 ]---


---
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,
Sep 24, 2025, 2:33:23 AM (2 days ago) Sep 24
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