syzbot


general protection fault in bfs_get_block (3)

Status: upstream: reported C repro on 2024/10/30 00:43
Subsystems: bfs
[Documentation on labels]
Reported-by: syzbot+f51a2a34984e4d8888fd@syzkaller.appspotmail.com
First crash: 253d, last: 20d
Discussions (2)
Title Replies (including bot) Last reply
[syzbot] [bfs?] general protection fault in bfs_get_block (3) 4 (10) 2024/11/15 17:58
[PATCH] bfs: add check for return value of sb_getblk 1 (1) 2024/11/03 14:36
Similar bugs (3)
Kernel Title Repro Cause bisect Fix bisect Count Last Reported Patched Status
upstream general protection fault in bfs_get_block bfs 2 844d 879d 0/29 auto-obsoleted due to no activity on 2023/07/13 12:29
linux-6.1 general protection fault in bfs_get_block origin:upstream C error 1 304d 826d 0/3 upstream: reported C repro on 2023/04/02 00:46
upstream general protection fault in bfs_get_block (2) bfs C error done 2 570d 588d 25/29 fixed on 2024/01/30 15:47
Last patch testing requests (12)
Created Duration User Patch Repo Result
2025/07/02 02:36 20m retest repro upstream OK log
2025/06/13 10:18 23m retest repro upstream OK log
2025/04/23 01:53 14m retest repro upstream report log
2025/04/04 09:51 16m retest repro upstream report log
2025/02/12 01:22 18m retest repro upstream report log
2025/01/24 09:19 12m retest repro upstream error
2024/11/29 18:03 13m retest repro upstream report log
2024/11/12 16:59 13m retest repro upstream report log
2024/11/03 14:13 18m eadavis@qq.com patch upstream OK log
2024/11/03 06:08 18m eadavis@qq.com patch upstream OK log
2024/11/03 04:37 14m eadavis@qq.com patch upstream report log
2024/11/03 01:37 18m eadavis@qq.com patch upstream report log

Sample crash report:
loop0: detected capacity change from 0 to 64
Oops: general protection fault, probably for non-canonical address 0xdffffc0000000005: 0000 [#1] SMP KASAN NOPTI
KASAN: null-ptr-deref in range [0x0000000000000028-0x000000000000002f]
CPU: 0 UID: 0 PID: 5313 Comm: syz.0.0 Not tainted 6.15.0-rc6-syzkaller-00278-g172a9d94339c #0 PREEMPT(full) 
Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2~bpo12+1 04/01/2014
RIP: 0010:bfs_move_block fs/bfs/file.c:43 [inline]
RIP: 0010:bfs_move_blocks fs/bfs/file.c:57 [inline]
RIP: 0010:bfs_get_block+0x589/0xae0 fs/bfs/file.c:126
Code: f8 48 c1 e8 03 42 80 3c 20 00 74 05 e8 c0 da 8f ff 49 8b 5d 20 4d 8d 66 28 4c 89 e0 48 c1 e8 03 48 b9 00 00 00 00 00 fc ff df <80> 3c 08 00 48 8b 6c 24 18 74 08 4c 89 e7 e8 94 da 8f ff 4c 89 ef
RSP: 0018:ffffc9000d6af658 EFLAGS: 00010206
RAX: 0000000000000005 RBX: 0000000000000200 RCX: dffffc0000000000
RDX: ffffc9000df12000 RSI: 00000000000003db RDI: ffff888044069108
RBP: ffff8880320cce68 R08: ffffea00013410b7 R09: 1ffffd4000268216
R10: dffffc0000000000 R11: fffff94000268217 R12: 0000000000000028
R13: ffff8880440690e8 R14: 0000000000000000 R15: 0000000000000013
FS:  00007fe6668386c0(0000) GS:ffff88808d6c2000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 0000200000001000 CR3: 0000000043406000 CR4: 0000000000352ef0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
Call Trace:
 <TASK>
 __block_write_begin_int+0x6b5/0x1900 fs/buffer.c:2149
 block_write_begin+0x8a/0x120 fs/buffer.c:2260
 bfs_write_begin+0x35/0xd0 fs/bfs/file.c:179
 generic_perform_write+0x2c4/0x910 mm/filemap.c:4103
 generic_file_write_iter+0x10f/0x540 mm/filemap.c:4246
 new_sync_write fs/read_write.c:591 [inline]
 vfs_write+0x548/0xa90 fs/read_write.c:684
 ksys_write+0x145/0x250 fs/read_write.c:736
 do_syscall_x64 arch/x86/entry/syscall_64.c:63 [inline]
 do_syscall_64+0xf6/0x210 arch/x86/entry/syscall_64.c:94
 entry_SYSCALL_64_after_hwframe+0x77/0x7f
RIP: 0033:0x7fe66598e969
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:00007fe666838038 EFLAGS: 00000246 ORIG_RAX: 0000000000000001
RAX: ffffffffffffffda RBX: 00007fe665bb5fa0 RCX: 00007fe66598e969
RDX: 000000000000fecc RSI: 0000200000000100 RDI: 0000000000000008
RBP: 00007fe665a10ab1 R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000
R13: 0000000000000000 R14: 00007fe665bb5fa0 R15: 00007fff2d0d8738
 </TASK>
Modules linked in:
---[ end trace 0000000000000000 ]---
RIP: 0010:bfs_move_block fs/bfs/file.c:43 [inline]
RIP: 0010:bfs_move_blocks fs/bfs/file.c:57 [inline]
RIP: 0010:bfs_get_block+0x589/0xae0 fs/bfs/file.c:126
Code: f8 48 c1 e8 03 42 80 3c 20 00 74 05 e8 c0 da 8f ff 49 8b 5d 20 4d 8d 66 28 4c 89 e0 48 c1 e8 03 48 b9 00 00 00 00 00 fc ff df <80> 3c 08 00 48 8b 6c 24 18 74 08 4c 89 e7 e8 94 da 8f ff 4c 89 ef
RSP: 0018:ffffc9000d6af658 EFLAGS: 00010206
RAX: 0000000000000005 RBX: 0000000000000200 RCX: dffffc0000000000
RDX: ffffc9000df12000 RSI: 00000000000003db RDI: ffff888044069108
RBP: ffff8880320cce68 R08: ffffea00013410b7 R09: 1ffffd4000268216
R10: dffffc0000000000 R11: fffff94000268217 R12: 0000000000000028
R13: ffff8880440690e8 R14: 0000000000000000 R15: 0000000000000013
FS:  00007fe6668386c0(0000) GS:ffff88808d6c2000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 0000200000001000 CR3: 0000000043406000 CR4: 0000000000352ef0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
----------------
Code disassembly (best guess):
   0:	f8                   	clc
   1:	48 c1 e8 03          	shr    $0x3,%rax
   5:	42 80 3c 20 00       	cmpb   $0x0,(%rax,%r12,1)
   a:	74 05                	je     0x11
   c:	e8 c0 da 8f ff       	call   0xff8fdad1
  11:	49 8b 5d 20          	mov    0x20(%r13),%rbx
  15:	4d 8d 66 28          	lea    0x28(%r14),%r12
  19:	4c 89 e0             	mov    %r12,%rax
  1c:	48 c1 e8 03          	shr    $0x3,%rax
  20:	48 b9 00 00 00 00 00 	movabs $0xdffffc0000000000,%rcx
  27:	fc ff df
* 2a:	80 3c 08 00          	cmpb   $0x0,(%rax,%rcx,1) <-- trapping instruction
  2e:	48 8b 6c 24 18       	mov    0x18(%rsp),%rbp
  33:	74 08                	je     0x3d
  35:	4c 89 e7             	mov    %r12,%rdi
  38:	e8 94 da 8f ff       	call   0xff8fdad1
  3d:	4c 89 ef             	mov    %r13,%rdi

Crashes (13):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2025/05/17 13:34 upstream 172a9d94339c f41472b0 .config console log report [disk image (non-bootable)] [vmlinux] [kernel image] ci-snapshot-upstream-root general protection fault in bfs_get_block
2025/01/29 01:03 upstream 805ba04cb7cc 865ef71e .config console log report [disk image (non-bootable)] [vmlinux] [kernel image] ci-snapshot-upstream-root general protection fault in bfs_get_block
2025/01/10 09:12 upstream 643e2e259c2b 67d7ec0a .config console log report [disk image (non-bootable)] [vmlinux] [kernel image] ci-snapshot-upstream-root general protection fault in bfs_get_block
2024/12/04 16:56 upstream feffde684ac2 b50eb251 .config console log report [disk image (non-bootable)] [vmlinux] [kernel image] ci-snapshot-upstream-root general protection fault in bfs_get_block
2024/11/15 17:57 upstream cfaaa7d010d1 eeafb645 .config console log report syz / log C [disk image (non-bootable)] [vmlinux] [kernel image] [mounted in repro] ci-snapshot-upstream-root general protection fault in bfs_get_block
2024/11/15 17:11 upstream cfaaa7d010d1 eeafb645 .config console log report [disk image (non-bootable)] [vmlinux] [kernel image] ci-snapshot-upstream-root general protection fault in bfs_get_block
2024/11/14 17:19 upstream 0a9b9d17f3a7 77f3eeb7 .config console log report [disk image (non-bootable)] [vmlinux] [kernel image] ci-snapshot-upstream-root general protection fault in bfs_get_block
2024/11/13 14:55 upstream f1b785f4c787 4dfba277 .config console log report [disk image (non-bootable)] [vmlinux] [kernel image] ci-snapshot-upstream-root general protection fault in bfs_get_block
2024/10/29 16:56 upstream e42b1a9a2557 66aeb999 .config console log report [disk image (non-bootable)] [vmlinux] [kernel image] ci-snapshot-upstream-root general protection fault in bfs_get_block
2024/10/26 10:29 upstream c71f8fb4dc91 65e8686b .config console log report syz / log [disk image (non-bootable)] [vmlinux] [kernel image] [mounted in repro] ci-snapshot-upstream-root general protection fault in bfs_get_block
2024/10/26 00:37 upstream c71f8fb4dc91 65e8686b .config console log report [disk image (non-bootable)] [vmlinux] [kernel image] ci-snapshot-upstream-root general protection fault in bfs_get_block
2025/06/16 04:06 git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux.git for-kernelci 39dfc971e42d 5f4b362d .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-gce-arm64 BUG: unable to handle kernel paging request in bfs_get_block
2025/06/16 04:06 git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux.git for-kernelci 39dfc971e42d 5f4b362d .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-gce-arm64 BUG: unable to handle kernel paging request in bfs_get_block
* Struck through repros no longer work on HEAD.