syzbot


kernel BUG in mark_buffer_dirty_inode

Status: premoderation: reported syz repro on 2024/10/08 01:07
Reported-by: syzbot+320fec3e1714d38548fd@syzkaller.appspotmail.com
First crash: 44d, last: 44d
Bug presence (2)
Date Name Commit Repro Result
2024/10/08 lts (merge base) cac15753b8ce C Didn't crash
2024/10/08 upstream (ToT) 5b7c893ed5ed C Didn't crash
Similar bugs (1)
Kernel Title Repro Cause bisect Fix bisect Count Last Reported Patched Status
android-54 kernel BUG at fs/buffer.c:LINE! ext4 C 1187 28d 1766d 0/2 upstream: reported C repro on 2020/01/21 13:12

Sample crash report:
loop0: detected capacity change from 0 to 8192
FAT-fs (loop0): Volume was not properly unmounted. Some data may be corrupt. Please run fsck.
------------[ cut here ]------------
kernel BUG at fs/buffer.c:622!
invalid opcode: 0000 [#1] PREEMPT SMP KASAN
CPU: 0 PID: 409 Comm: syz.0.15 Not tainted 6.1.99-syzkaller-00109-g0e8b65e41ffd #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 08/06/2024
RIP: 0010:mark_buffer_dirty_inode+0x305/0x310 fs/buffer.c:622
Code: ef e8 ff 26 e7 ff 48 8b 45 b8 49 89 45 00 48 89 df e8 1f 78 4a 03 48 83 c4 28 5b 41 5c 41 5d 41 5e 41 5f 5d c3 e8 ab e6 9f ff <0f> 0b 66 0f 1f 84 00 00 00 00 00 55 48 89 e5 41 57 41 56 41 55 41
RSP: 0018:ffffc90000b27128 EFLAGS: 00010293
RAX: ffffffff81d5bc95 RBX: 1ffff110249c1455 RCX: ffff888115571440
RDX: 0000000000000000 RSI: 0000000000000000 RDI: ffffea0004b79ac0
RBP: ffffc90000b27178 R08: ffffffff81ab34e3 R09: fffff9400096f359
R10: 0000000000000000 R11: dffffc0000000001 R12: 0000000000000000
R13: ffff888124e0a1c0 R14: ffff88813009fa80 R15: ffff888124e0a2a8
FS:  00007f005e9406c0(0000) GS:ffff8881f6e00000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 00007ff8886bad58 CR3: 0000000121cbd000 CR4: 00000000003506b0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
Call Trace:
 <TASK>
 fat_mirror_bhs+0x335/0x470 fs/fat/fatent.c:398
 fat_alloc_clusters+0xd85/0x1190 fs/fat/fatent.c:543
 fat_add_cluster fs/fat/inode.c:108 [inline]
 __fat_get_block fs/fat/inode.c:155 [inline]
 fat_get_block+0x4c0/0xcf0 fs/fat/inode.c:190
 __block_write_begin_int+0x49c/0x1440 fs/buffer.c:2034
 __block_write_begin fs/buffer.c:2084 [inline]
 block_write_begin fs/buffer.c:2145 [inline]
 cont_write_begin+0x68e/0x950 fs/buffer.c:2504
 fat_write_begin+0xa1/0x170 fs/fat/inode.c:235
 cont_expand_zero fs/buffer.c:2431 [inline]
 cont_write_begin+0x30e/0x950 fs/buffer.c:2494
 fat_write_begin+0xa1/0x170 fs/fat/inode.c:235
 generic_cont_expand_simple+0x187/0x2a0 fs/buffer.c:2395
 fat_cont_expand+0x6b/0x1f0 fs/fat/file.c:223
 fat_setattr+0x477/0x1070 fs/fat/file.c:513
 notify_change+0xd53/0x1010 fs/attr.c:499
 do_truncate fs/open.c:66 [inline]
 do_sys_ftruncate+0x5ab/0x820 fs/open.c:194
 __do_sys_ftruncate fs/open.c:205 [inline]
 __se_sys_ftruncate fs/open.c:203 [inline]
 __x64_sys_ftruncate+0x60/0x70 fs/open.c:203
 x64_sys_call+0x243/0x9a0 arch/x86/include/generated/asm/syscalls_64.h:78
 do_syscall_x64 arch/x86/entry/common.c:51 [inline]
 do_syscall_64+0x3b/0xb0 arch/x86/entry/common.c:81
 entry_SYSCALL_64_after_hwframe+0x68/0xd2
RIP: 0033:0x7f005db7dff9
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 a8 ff ff ff f7 d8 64 89 01 48
RSP: 002b:00007f005e940038 EFLAGS: 00000246 ORIG_RAX: 000000000000004d
RAX: ffffffffffffffda RBX: 00007f005dd36058 RCX: 00007f005db7dff9
RDX: 0000000000000000 RSI: 000000000100c17a RDI: 0000000000000005
RBP: 00007f005dbf0296 R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000
R13: 0000000000000000 R14: 00007f005dd36058 R15: 00007ffc9cd464b8
 </TASK>
Modules linked in:
---[ end trace 0000000000000000 ]---
RIP: 0010:mark_buffer_dirty_inode+0x305/0x310 fs/buffer.c:622
Code: ef e8 ff 26 e7 ff 48 8b 45 b8 49 89 45 00 48 89 df e8 1f 78 4a 03 48 83 c4 28 5b 41 5c 41 5d 41 5e 41 5f 5d c3 e8 ab e6 9f ff <0f> 0b 66 0f 1f 84 00 00 00 00 00 55 48 89 e5 41 57 41 56 41 55 41
RSP: 0018:ffffc90000b27128 EFLAGS: 00010293
RAX: ffffffff81d5bc95 RBX: 1ffff110249c1455 RCX: ffff888115571440
RDX: 0000000000000000 RSI: 0000000000000000 RDI: ffffea0004b79ac0
RBP: ffffc90000b27178 R08: ffffffff81ab34e3 R09: fffff9400096f359
R10: 0000000000000000 R11: dffffc0000000001 R12: 0000000000000000
R13: ffff888124e0a1c0 R14: ffff88813009fa80 R15: ffff888124e0a2a8
FS:  00007f005e9406c0(0000) GS:ffff8881f6e00000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 00007ff87f102000 CR3: 0000000121cbd000 CR4: 00000000003506b0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400

Crashes (1):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2024/10/08 01:06 android14-6.1 0e8b65e41ffd d7906eff .config console log report syz / log [disk image] [vmlinux] [kernel image] [mounted in repro] ci2-android-6-1 kernel BUG in mark_buffer_dirty_inode
* Struck through repros no longer work on HEAD.