syzbot


kernel BUG in ext4_write_inline_data_end

Status: fixed on 2022/09/27 22:24
Reported-by: syzbot+5a7a005b7fb3843f6adc@syzkaller.appspotmail.com
Fix commit: 18881d7e5171 ext4: fix race condition between ext4_write and ext4_convert_inline_data
First crash: 777d, last: 643d
Similar bugs (13)
Kernel Title Repro Cause bisect Fix bisect Count Last Reported Patched Status
upstream kernel BUG at fs/ext4/inline.c:LINE! ext4 C done done 76 459d 1283d 22/26 fixed on 2023/02/24 13:50
android-5-10 kernel BUG in ext4_write_inline_data_end C error 3 710d 777d 0/2 closed as dup on 2022/03/04 15:25
android-5-15 kernel BUG in ext4_write_inline_data_end (2) origin:lts C 6 23d 208d 0/2 upstream: reported C repro on 2023/09/24 12:05
android-5-10 kernel BUG in ext4_write_inline_data_end (2) C error 12 156d 662d 2/2 upstream: reported C repro on 2022/06/27 15:18
linux-6.1 kernel BUG in ext4_write_inline_data_end origin:upstream C 36 1d06h 403d 0/3 upstream: reported C repro on 2023/03/12 18:03
android-6-1 kernel BUG in ext4_write_inline_data_end origin:lts C error 1 8d23h 157d 0/2 upstream: reported C repro on 2023/11/14 10:56
android-5-15 kernel BUG in ext4_write_inline_data_end C error 11 501d 562d 2/2 fixed on 2023/02/02 00:40
linux-4.19 kernel BUG in ext4_write_inline_data_end ext4 C error 12 413d 1160d 0/1 upstream: reported C repro on 2021/02/14 13:39
linux-5.15 kernel BUG in ext4_write_inline_data_end origin:upstream C error 3 12d 325d 0/3 upstream: reported C repro on 2023/05/30 10:48
upstream kernel BUG in ext4_write_inline_data_end ext4 C error done 32 116d 414d 26/26 fixed on 2024/01/30 23:26
android-54 kernel BUG in ext4_write_inline_data_end (2) ext4 syz 4 62d 450d 0/2 upstream: reported syz repro on 2023/01/25 15:39
linux-4.14 kernel BUG in ext4_write_inline_data_end C error 4 500d 1085d 0/1 upstream: reported C repro on 2021/04/30 02:18
upstream kernel BUG in ext4_write_inline_data_end (2) ext4 C inconclusive 14 6d10h 77d 0/26 upstream: reported C repro on 2024/02/02 09:24
Last patch testing requests (1)
Created Duration User Patch Repo Result
2022/07/12 19:31 15m tadeusz.struk@linaro.org patch android12-5.4 OK log

Sample crash report:
EXT4-fs (loop0): mounted filesystem without journal. Opts: ,errors=continue
------------[ cut here ]------------
kernel BUG at fs/ext4/inline.c:760!
invalid opcode: 0000 [#1] PREEMPT SMP KASAN
CPU: 0 PID: 2992 Comm: syz-executor145 Not tainted 5.4.190-syzkaller-00046-g9ce4508d6de9 #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011
RIP: 0010:ext4_write_inline_data_end+0x426/0x430 fs/ext4/ext4.h:3239
Code: ff ff 44 89 e9 80 e1 07 80 c1 03 38 c1 0f 8c 11 fe ff ff 4c 89 ef e8 69 73 d4 ff e9 04 fe ff ff e8 0f 44 81 ff e8 aa 06 a8 ff <0f> 0b e8 a3 06 a8 ff 0f 0b 90 55 41 57 41 56 41 55 41 54 53 48 83
RSP: 0018:ffff8881dc5f7a68 EFLAGS: 00010293
RAX: ffffffff81b83416 RBX: 0000000000000000 RCX: ffff8881ec1a8000
RDX: 0000000000000000 RSI: 0000000000000000 RDI: 0000000000000000
RBP: 0000008c00080000 R08: ffffffff81b83151 R09: ffffed103cd7f297
R10: ffffed103cd7f297 R11: 1ffff1103cd7f296 R12: ffff8881e6bf9560
R13: 1ffff1103cd7f296 R14: ffff8881e6bf94b0 R15: 0000000000000028
FS:  00007f0168092700(0000) GS:ffff8881f6e00000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 00007f0168071718 CR3: 00000001e3d6b000 CR4: 00000000003406f0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
Call Trace:
 ext4_write_end+0x1cd/0xe40 fs/ext4/inode.c:1446
 generic_perform_write+0x395/0x510 mm/filemap.c:3322
 __generic_file_write_iter+0x239/0x490 mm/filemap.c:3440
 ext4_file_write_iter+0x46e/0x1040 fs/ext4/file.c:270
 call_write_iter include/linux/fs.h:1976 [inline]
 new_sync_write fs/read_write.c:483 [inline]
 __vfs_write+0x4f9/0x6a0 fs/read_write.c:496
 vfs_write+0x210/0x4f0 fs/read_write.c:558
 ksys_write+0x158/0x260 fs/read_write.c:611
 do_syscall_64+0xcb/0x1c0 arch/x86/entry/common.c:290
 entry_SYSCALL_64_after_hwframe+0x44/0xa9
RIP: 0033:0x7f01680e5d29
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:00007f01680922f8 EFLAGS: 00000246 ORIG_RAX: 0000000000000001
RAX: ffffffffffffffda RBX: 00007f016816b4a0 RCX: 00007f01680e5d29
RDX: 0000000000000028 RSI: 0000000020000280 RDI: 0000000000000003
RBP: 00007f01681380ac R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000246 R12: 0030656c69662f2e
R13: 00007f01681370a8 R14: e5d26e84aa4cf3c6 R15: 00007f016816b4a8
Modules linked in:
---[ end trace 1b97d445b2b2039d ]---
RIP: 0010:ext4_write_inline_data_end+0x426/0x430 fs/ext4/ext4.h:3239
Code: ff ff 44 89 e9 80 e1 07 80 c1 03 38 c1 0f 8c 11 fe ff ff 4c 89 ef e8 69 73 d4 ff e9 04 fe ff ff e8 0f 44 81 ff e8 aa 06 a8 ff <0f> 0b e8 a3 06 a8 ff 0f 0b 90 55 41 57 41 56 41 55 41 54 53 48 83
RSP: 0018:ffff8881dc5f7a68 EFLAGS: 00010293
RAX: ffffffff81b83416 RBX: 0000000000000000 RCX: ffff8881ec1a8000
RDX: 0000000000000000 RSI: 0000000000000000 RDI: 0000000000000000
RBP: 0000008c00080000 R08: ffffffff81b83151 R09: ffffed103cd7f297
R10: ffffed103cd7f297 R11: 1ffff1103cd7f296 R12: ffff8881e6bf9560
R13: 1ffff1103cd7f296 R14: ffff8881e6bf94b0 R15: 0000000000000028
FS:  00007f0168092700(0000) GS:ffff8881f6e00000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 00007f0168071718 CR3: 00000001e3d6b000 CR4: 00000000003406f0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400

Crashes (4):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2022/06/27 16:21 android12-5.4 9ce4508d6de9 a371c43c .config strace log report syz C ci2-android-5-4-kasan kernel BUG in ext4_write_inline_data_end
2022/03/04 06:32 android12-5.4 8a3679a75730 45a13a73 .config console log report syz C ci2-android-5-4-kasan kernel BUG in ext4_write_inline_data_end
2022/07/15 16:17 android12-5.4 330fa791a029 5d921b08 .config console log report info ci2-android-5-4-kasan kernel BUG in ext4_write_inline_data_end
2022/05/12 15:08 android12-5.4 b2ca0128d238 9ad6612a .config console log report info ci2-android-5-4-kasan kernel BUG in ext4_write_inline_data_end
* Struck through repros no longer work on HEAD.