syzbot


kernel BUG in ext4_inline_data_truncate

Status: upstream: reported C repro on 2024/09/01 07:32
Subsystems: ext4
[Documentation on labels]
Reported-by: syzbot+8aa6090cbe3c97dc9565@syzkaller.appspotmail.com
First crash: 19d, last: 4d18h
Cause bisection: introduced by (bisect log) :
commit 67d7d8ad99beccd9fe92d585b87f1760dc9018e3
Author: Baokun Li <libaokun1@huawei.com>
Date: Thu Jun 16 02:13:56 2022 +0000

  ext4: fix use-after-free in ext4_xattr_set_entry

Crash: kernel BUG in ext4_inline_data_truncate (log)
Repro: C syz .config
  
Discussions (1)
Title Replies (including bot) Last reply
[syzbot] [ext4?] kernel BUG in ext4_inline_data_truncate 1 (3) 2024/09/01 12:34
Last patch testing requests (3)
Created Duration User Patch Repo Result
2024/09/11 23:50 12m retest repro upstream report log
2024/09/11 23:50 15m retest repro upstream report log
2024/09/01 11:52 19m eadavis@qq.com patch upstream OK log

Sample crash report:
loop0: detected capacity change from 1024 to 1023
------------[ cut here ]------------
kernel BUG at fs/ext4/inline.c:1953!
Oops: invalid opcode: 0000 [#1] PREEMPT SMP KASAN PTI
CPU: 0 UID: 0 PID: 5220 Comm: syz-executor398 Not tainted 6.11.0-rc5-syzkaller-00057-g86987d84b968 #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 08/06/2024
RIP: 0010:ext4_inline_data_truncate+0xced/0xcf0 fs/ext4/inline.c:1953
Code: e9 17 fd ff ff 89 f9 80 e1 07 80 c1 03 38 c1 0f 8c 44 fd ff ff e8 c3 fb a1 ff e9 3a fd ff ff e8 09 ad 58 09 e8 04 df 3d ff 90 <0f> 0b 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 f3 0f 1e
RSP: 0018:ffffc900035cf660 EFLAGS: 00010293
RAX: ffffffff8255ac9c RBX: ffffc900035cf700 RCX: ffff8880241b9e00
RDX: 0000000000000000 RSI: 00000000ffffffc3 RDI: 0000000000000000
RBP: ffffc900035cf7f0 R08: ffffffff8255a948 R09: 1ffff1100e59f149
R10: dffffc0000000000 R11: ffffed100e59f14a R12: ffffc900035cf760
R13: dffffc0000000000 R14: 0000000000000002 R15: 0000000000000000
FS:  0000000000000000(0000) GS:ffff8880b9200000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 00005649eaf8b000 CR3: 000000000e534000 CR4: 00000000003506f0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
Call Trace:
 <TASK>
 ext4_truncate+0x3c7/0x11a0 fs/ext4/inode.c:4174
 ext4_evict_inode+0x90f/0xf50 fs/ext4/inode.c:258
 evict+0x532/0x950 fs/inode.c:704
 __dentry_kill+0x20d/0x630 fs/dcache.c:610
 dput+0x19f/0x2b0 fs/dcache.c:852
 __fput+0x5f8/0x8a0 fs/file_table.c:430
 task_work_run+0x24f/0x310 kernel/task_work.c:228
 exit_task_work include/linux/task_work.h:40 [inline]
 do_exit+0xa2f/0x27f0 kernel/exit.c:882
 do_group_exit+0x207/0x2c0 kernel/exit.c:1031
 __do_sys_exit_group kernel/exit.c:1042 [inline]
 __se_sys_exit_group kernel/exit.c:1040 [inline]
 __x64_sys_exit_group+0x3f/0x40 kernel/exit.c:1040
 x64_sys_call+0x2634/0x2640 arch/x86/include/generated/asm/syscalls_64.h:232
 do_syscall_x64 arch/x86/entry/common.c:52 [inline]
 do_syscall_64+0xf3/0x230 arch/x86/entry/common.c:83
 entry_SYSCALL_64_after_hwframe+0x77/0x7f
RIP: 0033:0x7f841d2244b9
Code: Unable to access opcode bytes at 0x7f841d22448f.
RSP: 002b:00007fffda637bd8 EFLAGS: 00000246 ORIG_RAX: 00000000000000e7
RAX: ffffffffffffffda RBX: 0000000000000000 RCX: 00007f841d2244b9
RDX: 000000000000003c RSI: 00000000000000e7 RDI: 0000000000000000
RBP: 00007f841d2a0370 R08: ffffffffffffffb8 R09: 00007fffda637df8
R10: 0000000000000007 R11: 0000000000000246 R12: 00007f841d2a0370
R13: 0000000000000000 R14: 00007f841d2a10e0 R15: 00007f841d1f2d80
 </TASK>
Modules linked in:
---[ end trace 0000000000000000 ]---
RIP: 0010:ext4_inline_data_truncate+0xced/0xcf0 fs/ext4/inline.c:1953
Code: e9 17 fd ff ff 89 f9 80 e1 07 80 c1 03 38 c1 0f 8c 44 fd ff ff e8 c3 fb a1 ff e9 3a fd ff ff e8 09 ad 58 09 e8 04 df 3d ff 90 <0f> 0b 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 f3 0f 1e
RSP: 0018:ffffc900035cf660 EFLAGS: 00010293
RAX: ffffffff8255ac9c RBX: ffffc900035cf700 RCX: ffff8880241b9e00
RDX: 0000000000000000 RSI: 00000000ffffffc3 RDI: 0000000000000000
RBP: ffffc900035cf7f0 R08: ffffffff8255a948 R09: 1ffff1100e59f149
R10: dffffc0000000000 R11: ffffed100e59f14a R12: ffffc900035cf760
R13: dffffc0000000000 R14: 0000000000000002 R15: 0000000000000000
FS:  0000000000000000(0000) GS:ffff8880b9200000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 00005649eaf8b000 CR3: 000000000e534000 CR4: 00000000003506f0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400

Crashes (3):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2024/08/28 13:00 upstream 86987d84b968 6c853ff9 .config strace log report syz / log C [disk image] [vmlinux] [kernel image] [mounted in repro] ci2-upstream-fs kernel BUG in ext4_inline_data_truncate
2024/08/28 11:54 upstream 86987d84b968 6c853ff9 .config strace log report syz / log C [disk image] [vmlinux] [kernel image] [mounted in repro] ci2-upstream-fs kernel BUG in ext4_inline_data_truncate
2024/08/28 07:22 upstream 3ec3f5fc4a91 6c853ff9 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-fs kernel BUG in ext4_inline_data_truncate
* Struck through repros no longer work on HEAD.