[<prev] [next>] [day] [month] [year] [list]
Message-ID: <CANikGpcXzNWJTkghnzFgqrPm_p=Lpm1r7oujrxQhw6k_xZW=nA@mail.gmail.com>
Date: Tue, 27 Aug 2024 21:29:10 -0700
From: Juefei Pu <juefei.pu@...il.ucr.edu>
To: viro@...iv.linux.org.uk, brauner@...nel.org, jack@...e.cz,
linux-fsdevel@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: BUG: corrupted list in list_lru_del
Hello,
We found the following issue using syzkaller on Linux v6.10.
When `to_shrink_list` tried to delete dentry via `d_lru_del(dentry)`,
a list corruption happened.
Unfortunately, the syzkaller failed to generate a reproducer.
But at least we have the report:
list_del corruption. prev->next should be ffff88802c7c32a0, but was
0000000000000000. (prev=ffff88803d1de410)
------------[ cut here ]------------
kernel BUG at lib/list_debug.c:64!
Oops: invalid opcode: 0000 [#1] PREEMPT SMP KASAN PTI
CPU: 0 PID: 8670 Comm: syz-executor Not tainted 6.10.0 #13
Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS 1.15.0-1 04/01/2014
RIP: 0010:__list_del_entry_valid_or_report+0x10a/0x120 lib/list_debug.c:62
Code: e8 bb ff 96 06 0f 0b 48 c7 c7 80 5b a9 8b 4c 89 fe e8 aa ff 96
06 0f 0b 48 c7 c7 e0 5b a9 8b 4c 89 fe 48 89 d9 e8 96 ff 96 06 <0f> 0b
48 c7 c7 60 5c a9 8b 4c 89 fe 4c 89 f1 e8 82 ff 96 06 0f 0b
RSP: 0000:ffffc9000ad77428 EFLAGS: 00010246
RAX: 000000000000006d RBX: ffff88803d1de410 RCX: 4740cdb9afd41600
RDX: 0000000000000000 RSI: 0000000080000003 RDI: 0000000000000000
RBP: dffffc0000000000 R08: ffffffff8172e30c R09: 1ffff920015aee24
R10: dffffc0000000000 R11: fffff520015aee25 R12: dffffc0000000000
R13: ffff88803cf85000 R14: ffff88803d1de410 R15: ffff88802c7c32a0
FS: 000055555bfe4500(0000) GS:ffff888063a00000(0000) knlGS:0000000000000000
CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 0000562d00112406 CR3: 0000000040714000 CR4: 0000000000350ef0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
Call Trace:
<TASK>
__list_del_entry_valid include/linux/list.h:124 [inline]
__list_del_entry include/linux/list.h:215 [inline]
list_del_init include/linux/list.h:287 [inline]
list_lru_del+0x177/0x300 mm/list_lru.c:129
d_lru_del fs/dcache.c:445 [inline]
to_shrink_list+0x133/0x330 fs/dcache.c:868
select_collect+0xc8/0x1a0 fs/dcache.c:1436
d_walk+0x1d3/0x710 fs/dcache.c:1259
shrink_dcache_parent+0x140/0x3b0 fs/dcache.c:1491
d_invalidate+0x117/0x2e0 fs/dcache.c:1596
proc_invalidate_siblings_dcache+0x3af/0x6c0 fs/proc/inode.c:142
release_task+0x1619/0x1910 kernel/exit.c:281
wait_task_zombie kernel/exit.c:1187 [inline]
wait_consider_task+0x19f0/0x2e10 kernel/exit.c:1414
do_wait_thread kernel/exit.c:1477 [inline]
__do_wait+0x1a7/0x870 kernel/exit.c:1595
do_wait+0x228/0x310 kernel/exit.c:1629
kernel_wait4+0x29c/0x3e0 kernel/exit.c:1788
__do_sys_wait4 kernel/exit.c:1816 [inline]
__se_sys_wait4 kernel/exit.c:1812 [inline]
__x64_sys_wait4+0x130/0x1e0 kernel/exit.c:1812
do_syscall_x64 arch/x86/entry/common.c:52 [inline]
do_syscall_64+0x7e/0x150 arch/x86/entry/common.c:83
entry_SYSCALL_64_after_hwframe+0x67/0x6f
RIP: 0033:0x7f69a7976c17
Code: 89 7c 24 10 48 89 4c 24 18 e8 55 15 03 00 4c 8b 54 24 18 8b 54
24 14 41 89 c0 48 8b 74 24 08 8b 7c 24 10 b8 3d 00 00 00 0f 05 <48> 3d
00 f0 ff ff 77 31 44 89 c7 89 44 24 10 e8 a5 15 03 00 8b 44
RSP: 002b:00007ffe2a90f730 EFLAGS: 00000293 ORIG_RAX: 000000000000003d
RAX: ffffffffffffffda RBX: 000000000000039a RCX: 00007f69a7976c17
RDX: 0000000040000000 RSI: 00007ffe2a90f78c RDI: 00000000ffffffff
RBP: 00007ffe2a90f78c R08: 0000000000000000 R09: 00007f69a87c4080
R10: 0000000000000000 R11: 0000000000000293 R12: 000055555bff75eb
R13: 000055555bff7590 R14: 0000000000054822 R15: 00007ffe2a90f7e0
</TASK>
Modules linked in:
---[ end trace 0000000000000000 ]---
RIP: 0010:__list_del_entry_valid_or_report+0x10a/0x120 lib/list_debug.c:62
Code: e8 bb ff 96 06 0f 0b 48 c7 c7 80 5b a9 8b 4c 89 fe e8 aa ff 96
06 0f 0b 48 c7 c7 e0 5b a9 8b 4c 89 fe 48 89 d9 e8 96 ff 96 06 <0f> 0b
48 c7 c7 60 5c a9 8b 4c 89 fe 4c 89 f1 e8 82 ff 96 06 0f 0b
RSP: 0000:ffffc9000ad77428 EFLAGS: 00010246
RAX: 000000000000006d RBX: ffff88803d1de410 RCX: 4740cdb9afd41600
RDX: 0000000000000000 RSI: 0000000080000003 RDI: 0000000000000000
RBP: dffffc0000000000 R08: ffffffff8172e30c R09: 1ffff920015aee24
R10: dffffc0000000000 R11: fffff520015aee25 R12: dffffc0000000000
R13: ffff88803cf85000 R14: ffff88803d1de410 R15: ffff88802c7c32a0
FS: 000055555bfe4500(0000) GS:ffff888063a00000(0000) knlGS:0000000000000000
CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 0000562d00112406 CR3: 0000000040714000 CR4: 0000000000350ef0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
Powered by blists - more mailing lists