Re: [syzbot] [mm?] BUG: unable to handle kernel paging request in list_lru_add
From: syzbot
Date: Fri Jul 12 2024 - 22:15:10 EST
Hello,
syzbot has tested the proposed patch but the reproducer is still triggering an issue:
general protection fault in list_lru_del
Oops: general protection fault, probably for non-canonical address 0xdffffc0000000002: 0000 [#1] PREEMPT SMP KASAN PTI
KASAN: null-ptr-deref in range [0x0000000000000010-0x0000000000000017]
CPU: 1 PID: 5638 Comm: syz-executor Not tainted 6.10.0-rc7-syzkaller-00141-g43db1e03c086-dirty #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 06/07/2024
RIP: 0010:list_lru_del+0x247/0x310 mm/list_lru.c:132
Code: 1c 00 4d 89 3f 49 8d 7f 08 48 89 f8 48 c1 e8 03 80 3c 28 00 74 05 e8 88 02 1c 00 4d 89 7f 08 48 83 c3 10 48 89 d8 48 c1 e8 03 <80> 3c 28 00 74 08 48 89 df e8 7b 01 1c 00 48 ff 0b 48 8b 44 24 28
RSP: 0018:ffffc9000405fbd8 EFLAGS: 00010202
RAX: 0000000000000002 RBX: 0000000000000010 RCX: dffffc0000000000
RDX: 0000000000000000 RSI: ffffffff8bcaccc0 RDI: ffff88806ced81c0
RBP: dffffc0000000000 R08: ffffffff8fac686f R09: 1ffffffff1f58d0d
R10: dffffc0000000000 R11: fffffbfff1f58d0e R12: ffff88801fb75240
R13: ffff88801fb75200 R14: ffff88801fb75240 R15: ffff88806ced81b8
FS: 000055555b96b500(0000) GS:ffff8880b9500000(0000) knlGS:0000000000000000
CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 000055d5667df000 CR3: 000000007b826000 CR4: 00000000003506f0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
Call Trace:
<TASK>
inode_lru_list_del fs/inode.c:485 [inline]
evict_inodes+0x22d/0x690 fs/inode.c:732
generic_shutdown_super+0x9d/0x2d0 fs/super.c:627
bch2_kill_sb+0x41/0x50 fs/bcachefs/fs.c:2052
deactivate_locked_super+0xc4/0x130 fs/super.c:473
cleanup_mnt+0x41f/0x4b0 fs/namespace.c:1267
task_work_run+0x24f/0x310 kernel/task_work.c:180
resume_user_mode_work include/linux/resume_user_mode.h:50 [inline]
exit_to_user_mode_loop kernel/entry/common.c:114 [inline]
exit_to_user_mode_prepare include/linux/entry-common.h:328 [inline]
__syscall_exit_to_user_mode_work kernel/entry/common.c:207 [inline]
syscall_exit_to_user_mode+0x168/0x360 kernel/entry/common.c:218
do_syscall_64+0x100/0x230 arch/x86/entry/common.c:89
entry_SYSCALL_64_after_hwframe+0x77/0x7f
RIP: 0033:0x7f9fb9b76f07
Code: a8 ff ff ff f7 d8 64 89 01 48 83 c8 ff c3 0f 1f 44 00 00 31 f6 e9 09 00 00 00 66 0f 1f 84 00 00 00 00 00 b8 a6 00 00 00 0f 05 <48> 3d 00 f0 ff ff 77 01 c3 48 c7 c2 a8 ff ff ff f7 d8 64 89 02 b8
RSP: 002b:00007ffcfeb94e78 EFLAGS: 00000246 ORIG_RAX: 00000000000000a6
RAX: 0000000000000000 RBX: 0000000000000000 RCX: 00007f9fb9b76f07
RDX: 0000000000000000 RSI: 0000000000000009 RDI: 00007ffcfeb94f30
RBP: 00007ffcfeb94f30 R08: 0000000000000000 R09: 0000000000000000
R10: 00000000ffffffff R11: 0000000000000246 R12: 00007ffcfeb95ff0
R13: 00007f9fb9be3515 R14: 000000000001ce83 R15: 000000000001cd13
</TASK>
Modules linked in:
---[ end trace 0000000000000000 ]---
RIP: 0010:list_lru_del+0x247/0x310 mm/list_lru.c:132
Code: 1c 00 4d 89 3f 49 8d 7f 08 48 89 f8 48 c1 e8 03 80 3c 28 00 74 05 e8 88 02 1c 00 4d 89 7f 08 48 83 c3 10 48 89 d8 48 c1 e8 03 <80> 3c 28 00 74 08 48 89 df e8 7b 01 1c 00 48 ff 0b 48 8b 44 24 28
RSP: 0018:ffffc9000405fbd8 EFLAGS: 00010202
RAX: 0000000000000002 RBX: 0000000000000010 RCX: dffffc0000000000
RDX: 0000000000000000 RSI: ffffffff8bcaccc0 RDI: ffff88806ced81c0
RBP: dffffc0000000000 R08: ffffffff8fac686f R09: 1ffffffff1f58d0d
R10: dffffc0000000000 R11: fffffbfff1f58d0e R12: ffff88801fb75240
R13: ffff88801fb75200 R14: ffff88801fb75240 R15: ffff88806ced81b8
FS: 000055555b96b500(0000) GS:ffff8880b9500000(0000) knlGS:0000000000000000
CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 000055d5667df000 CR3: 000000007b826000 CR4: 00000000003506f0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
----------------
Code disassembly (best guess):
0: 1c 00 sbb $0x0,%al
2: 4d 89 3f mov %r15,(%r15)
5: 49 8d 7f 08 lea 0x8(%r15),%rdi
9: 48 89 f8 mov %rdi,%rax
c: 48 c1 e8 03 shr $0x3,%rax
10: 80 3c 28 00 cmpb $0x0,(%rax,%rbp,1)
14: 74 05 je 0x1b
16: e8 88 02 1c 00 call 0x1c02a3
1b: 4d 89 7f 08 mov %r15,0x8(%r15)
1f: 48 83 c3 10 add $0x10,%rbx
23: 48 89 d8 mov %rbx,%rax
26: 48 c1 e8 03 shr $0x3,%rax
* 2a: 80 3c 28 00 cmpb $0x0,(%rax,%rbp,1) <-- trapping instruction
2e: 74 08 je 0x38
30: 48 89 df mov %rbx,%rdi
33: e8 7b 01 1c 00 call 0x1c01b3
38: 48 ff 0b decq (%rbx)
3b: 48 8b 44 24 28 mov 0x28(%rsp),%rax
Tested on:
commit: 43db1e03 Merge tag 'for-6.10/dm-fixes-2' of git://git...
git tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
console output: https://syzkaller.appspot.com/x/log.txt?x=1566ca21980000
kernel config: https://syzkaller.appspot.com/x/.config?x=42a432cfd0e579e0
dashboard link: https://syzkaller.appspot.com/bug?extid=2403e3909382fbdeaf6c
compiler: Debian clang version 15.0.6, GNU ld (GNU Binutils for Debian) 2.40
patch: https://syzkaller.appspot.com/x/patch.diff?x=16185766980000