Re: [v6.1] UBSAN: array-index-out-of-bounds in xtInsert

syzbot
2025-04-27T15:17:02Z

Hello,

syzbot has tested the proposed patch but the reproducer is still triggering an issue:
kernel BUG in jfs_evict_inode

------------[ cut here ]------------
kernel BUG at fs/jfs/inode.c:169!
invalid opcode: 0000 [#1] PREEMPT SMP KASAN
CPU: 1 PID: 4893 Comm: syz-executor Not tainted 6.1.135-syzkaller-dirty #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 02/12/2025
RIP: 0010:jfs_evict_inode+0x42d/0x430 fs/jfs/inode.c:169
Code: ea fe e9 e0 fd ff ff 44 89 f1 80 e1 07 80 c1 03 38 c1 0f 8c 17 fe ff ff 4c 89 f7 e8 cd 86 ea fe e9 0a fe ff ff e8 a3 18 99 fe <0f> 0b 90 41 57 41 56 41 54 53 48 89 fb 49 bc 00 00 00 00 00 fc ff
RSP: 0018:ffffc90003297ac0 EFLAGS: 00010293
RAX: ffffffff82e7aafd RBX: ffff888069b5bbb0 RCX: ffff88807c185940
RDX: 0000000000000000 RSI: 0000000000000000 RDI: ffff888069b5bbb0
RBP: 0000000000000001 R08: dffffc0000000000 R09: fffffbfff2116e6c
R10: fffffbfff2116e6c R11: 1ffffffff2116e6b R12: dffffc0000000000
R13: dffffc0000000000 R14: ffff888069b5b838 R15: ffff888069b5bd80
FS: 000055557828c500(0000) GS:ffff8880b8f00000(0000) knlGS:0000000000000000
CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 00007fe798659440 CR3: 0000000029455000 CR4: 00000000003506e0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
Call Trace:
<TASK>
evict+0x485/0x870 fs/inode.c:705
dispose_list fs/inode.c:738 [inline]
evict_inodes+0x604/0x690 fs/inode.c:792
generic_shutdown_super+0x93/0x340 fs/super.c:480
kill_block_super+0x7c/0xe0 fs/super.c:1470
deactivate_locked_super+0x93/0xf0 fs/super.c:332
cleanup_mnt+0x463/0x4f0 fs/namespace.c:1186
task_work_run+0x1ca/0x250 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+0xb1/0x140 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:87
entry_SYSCALL_64_after_hwframe+0x68/0xd2
RIP: 0033:0x7f3f5d18e497
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:00007ffcbdc0ca48 EFLAGS: 00000246 ORIG_RAX: 00000000000000a6
RAX: 0000000000000000 RBX: 00007f3f5d20e08c RCX: 00007f3f5d18e497
RDX: 0000000000000000 RSI: 0000000000000009 RDI: 00007ffcbdc0cb00
RBP: 00007ffcbdc0cb00 R08: 0000000000000000 R09: 0000000000000000
R10: 00000000ffffffff R11: 0000000000000246 R12: 00007ffcbdc0db90
R13: 00007f3f5d20e08c R14: 000000000002057a R15: 00007ffcbdc0dbd0
</TASK>
Modules linked in:
---[ end trace 0000000000000000 ]---
RIP: 0010:jfs_evict_inode+0x42d/0x430 fs/jfs/inode.c:169
Code: ea fe e9 e0 fd ff ff 44 89 f1 80 e1 07 80 c1 03 38 c1 0f 8c 17 fe ff ff 4c 89 f7 e8 cd 86 ea fe e9 0a fe ff ff e8 a3 18 99 fe <0f> 0b 90 41 57 41 56 41 54 53 48 89 fb 49 bc 00 00 00 00 00 fc ff
RSP: 0018:ffffc90003297ac0 EFLAGS: 00010293
RAX: ffffffff82e7aafd RBX: ffff888069b5bbb0 RCX: ffff88807c185940
RDX: 0000000000000000 RSI: 0000000000000000 RDI: ffff888069b5bbb0
RBP: 0000000000000001 R08: dffffc0000000000 R09: fffffbfff2116e6c
R10: fffffbfff2116e6c R11: 1ffffffff2116e6b R12: dffffc0000000000
R13: dffffc0000000000 R14: ffff888069b5b838 R15: ffff888069b5bd80
FS: 000055557828c500(0000) GS:ffff8880b8f00000(0000) knlGS:0000000000000000
CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 00007f6ce8dcd5e8 CR3: 0000000029455000 CR4: 00000000003506e0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400

Tested on:

commit: 535ec20c Linux 6.1.135
git tree: git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git linux-6.1.y
console output: https://syzkaller.appspot.com/x/log.txt?x=17c5e270580000
kernel config: https://syzkaller.appspot.com/x/.config?x=f8907c20e9d898d8
dashboard link: https://syzkaller.appspot.com/bug?extid=6b1d79dad6cc6b3eef41
compiler: Debian clang version 20.1.2 (++20250402124445+58df0ef89dd6-1~exp1~20250402004600.97), Debian LLD 20.1.2
patch: https://syzkaller.appspot.com/x/patch.diff?x=1231a368580000