syzbot


kernel BUG at fs/ext4/inline.c:LINE!

Status: upstream: reported C repro on 2020/10/14 12:01
Reported-by: syzbot+4faa160fa96bfba639f8@syzkaller.appspotmail.com
Fix commit: ef09ed5d37b8 ext4: fix bug_on in ext4_writepages
Patched on: [ci-qemu-upstream ci-qemu-upstream-386 ci-qemu2-arm32 ci-qemu2-arm64 ci-qemu2-arm64-compat ci-qemu2-arm64-mte ci-upstream-bpf-kasan-gce ci-upstream-bpf-next-kasan-gce ci-upstream-gce-arm64 ci-upstream-gce-leak ci-upstream-kasan-gce ci-upstream-kasan-gce-386 ci-upstream-kasan-gce-root ci-upstream-kasan-gce-selinux-root ci-upstream-kasan-gce-smack-root ci-upstream-kmsan-gce ci-upstream-kmsan-gce-386 ci-upstream-linux-next-kasan-gce-root ci-upstream-net-kasan-gce ci-upstream-net-this-kasan-gce ci2-upstream-fs ci2-upstream-kcsan-gce ci2-upstream-usb], missing on: [ci-qemu2-riscv64]
First crash: 726d, last: 1d14h

Cause bisection: the issue happens on the oldest tested release (bisect log)
Crash: kernel BUG at fs/ext4/inline.c:LINE! (log)
Repro: syz .config

Fix bisection: fixed by (bisect log) :
commit 1045a06724f322ed61f1ffb994427c7bdbe64647
Author: Christoph Hellwig <hch@lst.de>
Date: Wed Jun 29 15:01:02 2022 +0000

  remove CONFIG_ANDROID

similar bugs (6):
Kernel Title Repro Cause bisect Fix bisect Count Last Reported Patched Status
android-54 kernel BUG in ext4_write_inline_data_end C 4 83d 216d 2/2 fixed on 2022/09/27 22:24
android-5-10 kernel BUG in ext4_write_inline_data_end C error 3 149d 216d 0/2 closed as dup on 2022/03/04 15:25
android-5-10 kernel BUG in ext4_write_inline_data_end (2) C error 1 101d 101d 2/2 upstream: reported C repro on 2022/06/27 15:18
android-5-15 kernel BUG in ext4_write_inline_data_end C error 2 1d07h 1d12h 0/2 upstream: reported C repro on 2022/10/05 10:32
linux-4.19 kernel BUG in ext4_write_inline_data_end C error 6 20h40m 599d 0/1 upstream: reported C repro on 2021/02/14 13:39
linux-4.14 kernel BUG in ext4_write_inline_data_end C error 3 43d 524d 0/1 upstream: reported C repro on 2021/04/30 02:18
Patch testing requests:
Created Duration User Patch Repo Result
2022/05/01 09:39 10m (218) phil@philpotter.co.uk https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master report log

Sample crash report:
------------[ cut here ]------------
kernel BUG at fs/ext4/inline.c:755!
invalid opcode: 0000 [#1] PREEMPT SMP KASAN
CPU: 1 PID: 3795 Comm: syz-executor673 Not tainted 5.16.0-rc7-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011
RIP: 0010:ext4_write_inline_data_end+0xe50/0xea0 fs/ext4/inline.c:755
Code: 38 c1 0f 8c fd f9 ff ff 4c 89 f7 e8 2a d6 a8 ff e9 f0 f9 ff ff 49 ff cf 4d 89 fe e9 74 fd ff ff e8 15 42 e4 07 e8 70 67 5e ff <0f> 0b e8 69 67 5e ff 0f 0b e8 62 67 5e ff 48 8b 7c 24 10 48 c7 c6
RSP: 0018:ffffc90002fef100 EFLAGS: 00010293
RAX: ffffffff822616a0 RBX: 0000000000000000 RCX: ffff888021850000
RDX: 0000000000000000 RSI: 0000000000000000 RDI: 0000000000000000
RBP: ffffc90002fef248 R08: ffffffff82260a96 R09: ffffed100e4d0c81
R10: ffffed100e4d0c81 R11: 0000000000000000 R12: ffff888021850000
R13: dffffc0000000000 R14: 0000000c00000000 R15: ffffc90002fef1c0
FS:  00007fc4014a7700(0000) GS:ffff8880b9b00000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 0000555556ddf628 CR3: 0000000022e6e000 CR4: 00000000003506e0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
Call Trace:
 <TASK>
 ext4_da_write_end+0x87/0x870 fs/ext4/inode.c:3026
 generic_perform_write+0x3da/0x600 mm/filemap.c:3765
 ext4_buffered_write_iter+0x391/0x520 fs/ext4/file.c:269
 ext4_file_write_iter+0x8f7/0x1bd0
 do_iter_readv_writev+0x54f/0x740
 do_iter_write+0x21e/0x7b0 fs/read_write.c:851
 iter_file_splice_write+0x7eb/0xfa0 fs/splice.c:689
 do_splice_from fs/splice.c:767 [inline]
 direct_splice_actor+0xe6/0x1c0 fs/splice.c:936
 splice_direct_to_actor+0x529/0xd00 fs/splice.c:891
 do_splice_direct+0x291/0x3e0 fs/splice.c:979
 do_sendfile+0x6fe/0x1040 fs/read_write.c:1245
 __do_sys_sendfile64 fs/read_write.c:1310 [inline]
 __se_sys_sendfile64+0x171/0x1d0 fs/read_write.c:1296
 do_syscall_x64 arch/x86/entry/common.c:50 [inline]
 do_syscall_64+0x44/0xd0 arch/x86/entry/common.c:80
 entry_SYSCALL_64_after_hwframe+0x44/0xae
RIP: 0033:0x7fc4014fade9
Code: ff ff c3 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 40 00 48 89 f8 48 89 f7 48 89 d6 48 89 ca 4d 89 c2 4d 89 c8 4c 8b 4c 24 08 0f 05 <48> 3d 01 f0 ff ff 73 01 c3 48 c7 c1 b8 ff ff ff f7 d8 64 89 01 48
RSP: 002b:00007fc4014a72f8 EFLAGS: 00000246 ORIG_RAX: 0000000000000028
RAX: ffffffffffffffda RBX: 00007fc4015804c0 RCX: 00007fc4014fade9
RDX: 0000000000000000 RSI: 0000000000000004 RDI: 0000000000000003
RBP: 00007fc40154d0cc R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000010000 R11: 0000000000000246 R12: 0030656c69662f2e
R13: 00007fc40154c0c8 R14: 0000000300000002 R15: 00007fc4015804c8
 </TASK>
Modules linked in:
---[ end trace f1f7de10b78a7c25 ]---
RIP: 0010:ext4_write_inline_data_end+0xe50/0xea0 fs/ext4/inline.c:755
Code: 38 c1 0f 8c fd f9 ff ff 4c 89 f7 e8 2a d6 a8 ff e9 f0 f9 ff ff 49 ff cf 4d 89 fe e9 74 fd ff ff e8 15 42 e4 07 e8 70 67 5e ff <0f> 0b e8 69 67 5e ff 0f 0b e8 62 67 5e ff 48 8b 7c 24 10 48 c7 c6
RSP: 0018:ffffc90002fef100 EFLAGS: 00010293
RAX: ffffffff822616a0 RBX: 0000000000000000 RCX: ffff888021850000
RDX: 0000000000000000 RSI: 0000000000000000 RDI: 0000000000000000
RBP: ffffc90002fef248 R08: ffffffff82260a96 R09: ffffed100e4d0c81
R10: ffffed100e4d0c81 R11: 0000000000000000 R12: ffff888021850000
R13: dffffc0000000000 R14: 0000000c00000000 R15: ffffc90002fef1c0
FS:  00007fc4014a7700(0000) GS:ffff8880b9a00000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 00007fc401486718 CR3: 0000000022e6e000 CR4: 00000000003506f0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400

Crashes (4):
Manager Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Title
ci-upstream-kasan-gce-smack-root 2021/12/28 14:35 upstream a8ad9a2434dc 6b3c5e64 .config log report syz C kernel BUG in ext4_write_inline_data_end
ci-upstream-kasan-gce-root 2021/12/13 19:00 upstream 2585cf9dfaad 49ca1f59 .config log report syz C kernel BUG in ext4_write_inline_data_end
ci-upstream-kasan-gce-smack-root 2020/10/10 21:03 upstream 6f2f486d57c4 4a77ae0b .config log report syz
ci2-upstream-fs 2022/10/05 08:49 upstream 0326074ff465 267e3bb1 .config log report info kernel BUG in ext4_write_inline_data
* Struck through repros no longer work on HEAD.