syzbot


kernel BUG in __block_write_begin_int

Status: fixed on 2023/12/21 03:45
Subsystems: block
[Documentation on labels]
Reported-by: syzbot+4a08ffdf3667b36650a1@syzkaller.appspotmail.com
Fix commit: 4aa8cdd5e523 iomap: handle error conditions more gracefully in iomap_to_bh
First crash: 237d, last: 217d
Cause bisection: introduced by (bisect log) :
commit 8b0472b50bcf0f19a5119b00a53b63579c8e1e4d
Author: Zhang Shurong <zhang_shurong@foxmail.com>
Date: Sat Jul 22 07:53:53 2023 +0000

  md: raid1: fix potential OOB in raid1_remove_disk()

Crash: kernel BUG in __block_write_begin_int (log)
Repro: C syz .config
  
Discussions (6)
Title Replies (including bot) Last reply
[GIT PULL] iomap: fix unshare data corruption bug 2 (2) 2023/09/23 18:25
[ANNOUNCE] xfs-linux: iomap-for-next updated to a5f31a5028d1 1 (1) 2023/09/20 14:33
[ANNOUNCE] xfs-linux: iomap-for-next updated to 4aa8cdd5e523 1 (1) 2023/09/12 17:12
[PATCH] iomap: handle error conditions more gracefully in iomap_to_bh 8 (8) 2023/09/06 14:54
Re: [syzbot] [xfs?] [ext4?] kernel BUG in __block_write_begin_int 2 (3) 2023/09/05 12:26
[syzbot] [xfs?] [ext4?] kernel BUG in __block_write_begin_int 5 (6) 2023/09/05 09:26
Last patch testing requests (3)
Created Duration User Patch Repo Result
2023/09/05 09:27 22m nogikh@google.com git://git.infradead.org/users/hch/misc.git bdev-iomap-fix report log
2023/09/04 15:15 21m nogikh@google.com https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git a705b11b358dee677aad80630e7608b2d5f56691 report log
2023/09/04 15:14 17m nogikh@google.com https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git 8b0472b50bcf0f19a5119b00a53b63579c8e1e4d report log

Sample crash report:
------------[ cut here ]------------
kernel BUG at fs/buffer.c:2028!
invalid opcode: 0000 [#1] PREEMPT SMP KASAN
CPU: 1 PID: 5408 Comm: syz-executor126 Not tainted 6.6.0-rc1-syzkaller-00196-g57d88e8a5974 #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 08/04/2023
RIP: 0010:iomap_to_bh fs/buffer.c:2028 [inline]
RIP: 0010:__block_write_begin_int+0x18f7/0x1a40 fs/buffer.c:2111
Code: 1f 07 85 ff 48 8b 7c 24 08 48 c7 c6 e0 21 18 8b e8 fe 89 c6 ff 0f 0b e8 07 07 85 ff eb 13 e8 00 07 85 ff eb c7 e8 f9 06 85 ff <0f> 0b e8 f2 06 85 ff 48 8b 7c 24 08 48 c7 c6 e0 21 18 8b e8 d1 89
RSP: 0018:ffffc90004c9f520 EFLAGS: 00010293
RAX: ffffffff82089ca7 RBX: 0000000000040000 RCX: ffff88801dad5940
RDX: 0000000000000000 RSI: 0000000000040000 RDI: 00000000000dc000
RBP: ffffc90004c9f6b0 R08: ffffffff82088d12 R09: 1ffff1100ebfdd22
R10: dffffc0000000000 R11: ffffed100ebfdd23 R12: 00000000000dc000
R13: 0000000000000400 R14: 0000000000000000 R15: ffff888075fee910
FS:  00007f6a68d1b6c0(0000) GS:ffff8880b9900000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 0000000020042000 CR3: 0000000027861000 CR4: 00000000003506e0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
Call Trace:
 <TASK>
 iomap_write_begin+0xaf6/0x1f00 fs/iomap/buffered-io.c:772
 iomap_write_iter fs/iomap/buffered-io.c:907 [inline]
 iomap_file_buffered_write+0x587/0x1020 fs/iomap/buffered-io.c:968
 blkdev_buffered_write block/fops.c:634 [inline]
 blkdev_write_iter+0x3f5/0x5b0 block/fops.c:684
 call_write_iter include/linux/fs.h:1985 [inline]
 new_sync_write fs/read_write.c:491 [inline]
 vfs_write+0x782/0xaf0 fs/read_write.c:584
 ksys_write+0x1a0/0x2c0 fs/read_write.c:637
 do_syscall_x64 arch/x86/entry/common.c:50 [inline]
 do_syscall_64+0x41/0xc0 arch/x86/entry/common.c:80
 entry_SYSCALL_64_after_hwframe+0x63/0xcd
RIP: 0033:0x7f6a68d7fb19
Code: 28 00 00 00 75 05 48 83 c4 28 c3 e8 b1 18 00 00 90 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 b0 ff ff ff f7 d8 64 89 01 48
RSP: 002b:00007f6a68d1b218 EFLAGS: 00000246 ORIG_RAX: 0000000000000001
RAX: ffffffffffffffda RBX: 00007f6a68e086d8 RCX: 00007f6a68d7fb19
RDX: 000000000156a396 RSI: 0000000020002a40 RDI: 0000000000000003
RBP: 00007f6a68e086d0 R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000246 R12: 00007f6a68dd46d0
R13: 00007f6a68dd40c0 R14: 0031656c69662f2e R15: 6f6f6c2f7665642f
 </TASK>
Modules linked in:
---[ end trace 0000000000000000 ]---
RIP: 0010:iomap_to_bh fs/buffer.c:2028 [inline]
RIP: 0010:__block_write_begin_int+0x18f7/0x1a40 fs/buffer.c:2111
Code: 1f 07 85 ff 48 8b 7c 24 08 48 c7 c6 e0 21 18 8b e8 fe 89 c6 ff 0f 0b e8 07 07 85 ff eb 13 e8 00 07 85 ff eb c7 e8 f9 06 85 ff <0f> 0b e8 f2 06 85 ff 48 8b 7c 24 08 48 c7 c6 e0 21 18 8b e8 d1 89
RSP: 0018:ffffc90004c9f520 EFLAGS: 00010293
RAX: ffffffff82089ca7 RBX: 0000000000040000 RCX: ffff88801dad5940
RDX: 0000000000000000 RSI: 0000000000040000 RDI: 00000000000dc000
RBP: ffffc90004c9f6b0 R08: ffffffff82088d12 R09: 1ffff1100ebfdd22
R10: dffffc0000000000 R11: ffffed100ebfdd23 R12: 00000000000dc000
R13: 0000000000000400 R14: 0000000000000000 R15: ffff888075fee910
FS:  00007f6a68d1b6c0(0000) GS:ffff8880b9900000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 0000000020042000 CR3: 0000000027861000 CR4: 00000000003506e0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400

Crashes (14):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2023/09/16 20:41 upstream 57d88e8a5974 0b6a67ac .config strace log report syz C [disk image] [vmlinux] [kernel image] [mounted in repro] ci2-upstream-fs kernel BUG in __block_write_begin_int
2023/09/08 08:34 upstream 4a0fc73da97e 72324844 .config strace log report syz C [disk image] [vmlinux] [kernel image] [mounted in repro] ci-upstream-kasan-gce-root kernel BUG in __block_write_begin_int
2023/09/07 06:26 upstream 744a759492b5 72324844 .config console log report syz C [disk image] [vmlinux] [kernel image] [mounted in repro] ci2-upstream-fs kernel BUG in __block_write_begin_int
2023/09/04 22:31 upstream 708283abf896 db3306a6 .config strace log report syz C [disk image] [vmlinux] [kernel image] [mounted in repro] ci2-upstream-fs kernel BUG in __block_write_begin_int
2023/09/02 19:26 upstream 0468be89b3fa 696ea0d2 .config strace log report syz C [disk image] [vmlinux] [kernel image] [mounted in repro] ci2-upstream-fs kernel BUG in __block_write_begin_int
2023/09/23 05:19 upstream dc912ba91b7e 0b6a67ac .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-kasan-gce-root kernel BUG in __block_write_begin_int
2023/09/11 23:19 upstream 0bb80ecc33a8 59da8366 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-fs kernel BUG in __block_write_begin_int
2023/09/11 22:34 upstream 0bb80ecc33a8 59da8366 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-kasan-gce-smack-root kernel BUG in __block_write_begin_int
2023/09/09 18:46 upstream 6099776f9f26 6654cf89 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-kasan-gce-selinux-root kernel BUG in __block_write_begin_int
2023/09/04 05:12 upstream 6e32dfcccfcc 696ea0d2 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-fs kernel BUG in __block_write_begin_int
2023/09/03 23:45 upstream 6e32dfcccfcc 696ea0d2 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-fs kernel BUG in __block_write_begin_int
2023/09/03 20:49 upstream 6e32dfcccfcc 696ea0d2 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-fs kernel BUG in __block_write_begin_int
2023/09/02 17:57 upstream 0468be89b3fa 696ea0d2 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-fs kernel BUG in __block_write_begin_int
2023/09/03 19:14 upstream 92901222f83d 696ea0d2 .config console log report info [disk image (non-bootable)] [vmlinux] [kernel image] ci-qemu-upstream-386 kernel BUG in __block_write_begin_int
* Struck through repros no longer work on HEAD.