syzbot


general protection fault in update_sit_entry

Status: upstream: reported C repro on 2025/01/07 01:40
Bug presence: origin:lts-only
[Documentation on labels]
Reported-by: syzbot+fd9d30bfbd5d4a966056@syzkaller.appspotmail.com
First crash: 29d, last: 28d
Fix commit to backport (bisect log) :
tree: upstream
commit 458c15dfbce62c35fefd9ca637b20a051309c9f1
Author: Chao Yu <chao@kernel.org>
Date: Tue May 23 03:58:22 2023 +0000

  f2fs: don't reset unchangable mount option in f2fs_remount()

  
Bug presence (2)
Date Name Commit Repro Result
2025/01/07 linux-6.1.y (ToT) 7dc732d24ff7 C [report] general protection fault in update_sit_entry
2025/01/07 upstream (ToT) fbfd64d25c7a C Didn't crash
Similar bugs (5)
Kernel Title Repro Cause bisect Fix bisect Count Last Reported Patched Status
linux-5.15 general protection fault in update_sit_entry origin:lts-only C 16 14d 116d 0/3 upstream: reported C repro on 2024/10/11 17:04
linux-4.14 general protection fault in update_sit_entry f2fs C 9 703d 816d 0/1 upstream: reported C repro on 2022/11/12 02:17
android-5-10 general protection fault in update_sit_entry C 7 27d 67d 0/2 upstream: reported C repro on 2024/11/29 11:40
android-6-1 general protection fault in update_sit_entry origin:downstream C 7 4d17h 58d 0/2 upstream: reported C repro on 2024/12/08 18:16
android-5-15 general protection fault in update_sit_entry origin:downstream C 8 2d21h 73d 0/2 upstream: reported C repro on 2024/11/24 02:28
Fix bisection attempts (1)
Created Duration User Patch Repo Result
2025/01/27 12:16 8h40m fix candidate upstream OK (1) job log

Sample crash report:
F2FS-fs (loop0): Mounted with checkpoint version = 48b305e5
general protection fault, probably for non-canonical address 0xdffffc0000000000: 0000 [#1] PREEMPT SMP KASAN
KASAN: null-ptr-deref in range [0x0000000000000000-0x0000000000000007]
CPU: 0 PID: 4251 Comm: syz-executor342 Not tainted 6.1.123-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 09/13/2024
RIP: 0010:f2fs_test_and_set_bit fs/f2fs/f2fs.h:2927 [inline]
RIP: 0010:update_sit_entry+0x67f/0x10d0 fs/f2fs/segment.c:2227
Code: 24 30 48 8d 5c 08 20 48 89 d8 48 c1 e8 03 42 80 3c 38 00 74 08 48 89 df e8 3e 44 04 fe 4c 8b 33 4d 01 ee 4c 89 f3 48 c1 eb 03 <42> 0f b6 04 3b 84 c0 4d 89 fd 0f 85 8a 08 00 00 41 0f b6 2e 41 89
RSP: 0018:ffffc90003d76a70 EFLAGS: 00010247
RAX: 1ffff11003ad7e88 RBX: 0000000000000000 RCX: 0000000000000420
RDX: ffff88801abb3b80 RSI: 0000000000000000 RDI: 0000000000000000
RBP: 0000000000000080 R08: ffffffff83ddea38 R09: ffffffff83dde58a
R10: 0000000000000003 R11: ffff88801abb3b80 R12: 0000000000000001
R13: 0000000000000005 R14: 0000000000000005 R15: dffffc0000000000
FS:  00007faf044d46c0(0000) GS:ffff8880b8e00000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 00007faf044b3d58 CR3: 0000000075919000 CR4: 00000000003506f0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
Call Trace:
 <TASK>
 f2fs_allocate_data_block+0x149a/0x3310 fs/f2fs/segment.c:3275
 do_write_page+0x172/0x6e0 fs/f2fs/segment.c:3363
 f2fs_do_write_node_page+0xec/0x1a0 fs/f2fs/segment.c:3416
 __write_node_page+0xc36/0x2600 fs/f2fs/node.c:1665
 f2fs_fsync_node_pages+0x17c0/0x22d0 fs/f2fs/node.c:1818
 f2fs_do_sync_file+0x157e/0x1cf0 fs/f2fs/file.c:343
 generic_write_sync include/linux/fs.h:2962 [inline]
 iomap_dio_complete+0x64e/0x7d0 fs/iomap/direct-io.c:130
 f2fs_dio_write_iter fs/f2fs/file.c:4735 [inline]
 f2fs_file_write_iter+0x1344/0x2490 fs/f2fs/file.c:4839
 do_iter_write+0x6e6/0xc40 fs/read_write.c:861
 iter_file_splice_write+0x830/0xfc0 fs/splice.c:685
 do_splice_from fs/splice.c:763 [inline]
 direct_splice_actor+0xe3/0x1c0 fs/splice.c:950
 splice_direct_to_actor+0x4c7/0xc30 fs/splice.c:896
 do_splice_direct+0x2a5/0x3e0 fs/splice.c:1002
 do_sendfile+0x619/0xff0 fs/read_write.c:1255
 __do_sys_sendfile64 fs/read_write.c:1323 [inline]
 __se_sys_sendfile64+0x178/0x1e0 fs/read_write.c:1309
 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:0x7faf045167e9
Code: 28 00 00 00 75 05 48 83 c4 28 c3 e8 f1 17 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:00007faf044d4218 EFLAGS: 00000246 ORIG_RAX: 0000000000000028
RAX: ffffffffffffffda RBX: 00007faf045af728 RCX: 00007faf045167e9
RDX: 0000000000000000 RSI: 0000000000000005 RDI: 0000000000000006
RBP: 00007faf045af720 R08: 0000000000000000 R09: 0000000000000000
R10: 0000000080000002 R11: 0000000000000246 R12: 00007faf0457c624
R13: a92483129444e42d R14: 0000000020020c40 R15: b8651aa520050f65
 </TASK>
Modules linked in:
---[ end trace 0000000000000000 ]---
RIP: 0010:f2fs_test_and_set_bit fs/f2fs/f2fs.h:2927 [inline]
RIP: 0010:update_sit_entry+0x67f/0x10d0 fs/f2fs/segment.c:2227
Code: 24 30 48 8d 5c 08 20 48 89 d8 48 c1 e8 03 42 80 3c 38 00 74 08 48 89 df e8 3e 44 04 fe 4c 8b 33 4d 01 ee 4c 89 f3 48 c1 eb 03 <42> 0f b6 04 3b 84 c0 4d 89 fd 0f 85 8a 08 00 00 41 0f b6 2e 41 89
RSP: 0018:ffffc90003d76a70 EFLAGS: 00010247
RAX: 1ffff11003ad7e88 RBX: 0000000000000000 RCX: 0000000000000420
RDX: ffff88801abb3b80 RSI: 0000000000000000 RDI: 0000000000000000
RBP: 0000000000000080 R08: ffffffff83ddea38 R09: ffffffff83dde58a
R10: 0000000000000003 R11: ffff88801abb3b80 R12: 0000000000000001
R13: 0000000000000005 R14: 0000000000000005 R15: dffffc0000000000
FS:  00007faf044d46c0(0000) GS:ffff8880b8e00000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 00007faf044b3d58 CR3: 0000000075919000 CR4: 00000000003506f0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
----------------
Code disassembly (best guess):
   0:	24 30                	and    $0x30,%al
   2:	48 8d 5c 08 20       	lea    0x20(%rax,%rcx,1),%rbx
   7:	48 89 d8             	mov    %rbx,%rax
   a:	48 c1 e8 03          	shr    $0x3,%rax
   e:	42 80 3c 38 00       	cmpb   $0x0,(%rax,%r15,1)
  13:	74 08                	je     0x1d
  15:	48 89 df             	mov    %rbx,%rdi
  18:	e8 3e 44 04 fe       	call   0xfe04445b
  1d:	4c 8b 33             	mov    (%rbx),%r14
  20:	4d 01 ee             	add    %r13,%r14
  23:	4c 89 f3             	mov    %r14,%rbx
  26:	48 c1 eb 03          	shr    $0x3,%rbx
* 2a:	42 0f b6 04 3b       	movzbl (%rbx,%r15,1),%eax <-- trapping instruction
  2f:	84 c0                	test   %al,%al
  31:	4d 89 fd             	mov    %r15,%r13
  34:	0f 85 8a 08 00 00    	jne    0x8c4
  3a:	41 0f b6 2e          	movzbl (%r14),%ebp
  3e:	41                   	rex.B
  3f:	89                   	.byte 0x89

Crashes (4):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2025/01/07 07:01 linux-6.1.y 7dc732d24ff7 f3558dbf .config console log report syz / log C [disk image] [vmlinux] [kernel image] [mounted in repro] ci2-linux-6-1-kasan general protection fault in update_sit_entry
2025/01/07 06:14 linux-6.1.y 7dc732d24ff7 f3558dbf .config console log report syz / log C [disk image] [vmlinux] [kernel image] [mounted in repro] ci2-linux-6-1-kasan general protection fault in update_sit_entry
2025/01/07 03:56 linux-6.1.y 7dc732d24ff7 f3558dbf .config console log report syz / log [disk image] [vmlinux] [kernel image] [mounted in repro] ci2-linux-6-1-kasan general protection fault in update_sit_entry
2025/01/07 01:40 linux-6.1.y 7dc732d24ff7 f3558dbf .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan general protection fault in update_sit_entry
* Struck through repros no longer work on HEAD.