[v6.6] kernel BUG in f2fs_allocate_data_block

1 view
Skip to first unread message

syzbot

unread,
Jun 16, 2025, 4:16:29 PM6/16/25
to syzkaller...@googlegroups.com
Hello,

syzbot found the following issue on:

HEAD commit: c2603c511feb Linux 6.6.93
git tree: linux-6.6.y
console output: https://syzkaller.appspot.com/x/log.txt?x=1694c90c580000
kernel config: https://syzkaller.appspot.com/x/.config?x=486bade17c8c30b9
dashboard link: https://syzkaller.appspot.com/bug?extid=fd1280572f6ac45a8a80
compiler: Debian clang version 20.1.6 (++20250514063057+1e4d39e07757-1~exp1~20250514183223.118), Debian LLD 20.1.6

Unfortunately, I don't have any reproducer for this issue yet.

Downloadable assets:
disk image: https://storage.googleapis.com/syzbot-assets/8754f950a6e7/disk-c2603c51.raw.xz
vmlinux: https://storage.googleapis.com/syzbot-assets/3b19332dbf63/vmlinux-c2603c51.xz
kernel image: https://storage.googleapis.com/syzbot-assets/cb245e836038/bzImage-c2603c51.xz

IMPORTANT: if you fix the issue, please add the following tag to the commit:
Reported-by: syzbot+fd1280...@syzkaller.appspotmail.com

loop6: detected capacity change from 0 to 40427
F2FS-fs (loop6): invalid crc value
F2FS-fs (loop6): Found nat_bits in checkpoint
F2FS-fs (loop6): Mounted with checkpoint version = 48b305e5
------------[ cut here ]------------
kernel BUG at fs/f2fs/segment.c:3475!
invalid opcode: 0000 [#1] PREEMPT SMP KASAN
CPU: 1 PID: 23053 Comm: syz.6.4771 Not tainted 6.6.93-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 05/07/2025
RIP: 0010:f2fs_allocate_data_block+0x3f0c/0x3f50 fs/f2fs/segment.c:3475
Code: 22 fe 48 8b 54 24 30 e9 c6 eb ff ff e8 9d 66 c9 fd 48 c7 c7 f0 d4 2f 8d 4c 89 f6 e8 0e ef 95 00 e9 e2 eb ff ff e8 84 66 c9 fd <0f> 0b e8 7d 66 c9 fd 0f 0b e8 76 66 c9 fd 0f 0b e8 6f 66 c9 fd 0f
RSP: 0018:ffffc900037cf850 EFLAGS: 00010287
RAX: ffffffff83bc305c RBX: 0000000000000200 RCX: 0000000000080000
RDX: ffffc9000be49000 RSI: 0000000000029a4f RDI: 0000000000029a50
RBP: 0000000000000200 R08: ffff888024de485f R09: 1ffff110049bc90b
R10: dffffc0000000000 R11: ffffed10049bc90c R12: 1ffff920006f9f7c
R13: 0000000000000000 R14: 0000000000002600 R15: dffffc0000000000
FS: 00007f3b906e56c0(0000) GS:ffff8880b8f00000(0000) knlGS:0000000000000000
CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 0000001b3291fffc CR3: 0000000066e6a000 CR4: 00000000003506e0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
Call Trace:
<TASK>
__allocate_data_block fs/f2fs/data.c:1421 [inline]
f2fs_map_blocks+0x1697/0x3c00 fs/f2fs/data.c:1601
f2fs_expand_inode_data+0x543/0x8e0 fs/f2fs/file.c:1798
f2fs_fallocate+0x416/0x8a0 fs/f2fs/file.c:1901
vfs_fallocate+0x58e/0x700 fs/open.c:324
ksys_fallocate fs/open.c:347 [inline]
__do_sys_fallocate fs/open.c:355 [inline]
__se_sys_fallocate fs/open.c:353 [inline]
__x64_sys_fallocate+0xc1/0x110 fs/open.c:353
do_syscall_x64 arch/x86/entry/common.c:51 [inline]
do_syscall_64+0x55/0xb0 arch/x86/entry/common.c:81
entry_SYSCALL_64_after_hwframe+0x68/0xd2
RIP: 0033:0x7f3b8f78e929
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:00007f3b906e5038 EFLAGS: 00000246 ORIG_RAX: 000000000000011d
RAX: ffffffffffffffda RBX: 00007f3b8f9b5fa0 RCX: 00007f3b8f78e929
RDX: 000000000000fc01 RSI: 0000000000000000 RDI: 0000000000000005
RBP: 00007f3b8f810b39 R08: 0000000000000000 R09: 0000000000000000
R10: 00000000001000f4 R11: 0000000000000246 R12: 0000000000000000
R13: 0000000000000000 R14: 00007f3b8f9b5fa0 R15: 00007ffc220bb0a8
</TASK>
Modules linked in:
---[ end trace 0000000000000000 ]---
RIP: 0010:f2fs_allocate_data_block+0x3f0c/0x3f50 fs/f2fs/segment.c:3475
Code: 22 fe 48 8b 54 24 30 e9 c6 eb ff ff e8 9d 66 c9 fd 48 c7 c7 f0 d4 2f 8d 4c 89 f6 e8 0e ef 95 00 e9 e2 eb ff ff e8 84 66 c9 fd <0f> 0b e8 7d 66 c9 fd 0f 0b e8 76 66 c9 fd 0f 0b e8 6f 66 c9 fd 0f
RSP: 0018:ffffc900037cf850 EFLAGS: 00010287
RAX: ffffffff83bc305c RBX: 0000000000000200 RCX: 0000000000080000
RDX: ffffc9000be49000 RSI: 0000000000029a4f RDI: 0000000000029a50
RBP: 0000000000000200 R08: ffff888024de485f R09: 1ffff110049bc90b
R10: dffffc0000000000 R11: ffffed10049bc90c R12: 1ffff920006f9f7c
R13: 0000000000000000 R14: 0000000000002600 R15: dffffc0000000000
FS: 00007f3b906e56c0(0000) GS:ffff8880b8f00000(0000) knlGS:0000000000000000
CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 0000558e9f615000 CR3: 0000000066e6a000 CR4: 00000000003506e0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400


---
This report is generated by a bot. It may contain errors.
See https://goo.gl/tpsmEJ for more information about syzbot.
syzbot engineers can be reached at syzk...@googlegroups.com.

syzbot will keep track of this issue. See:
https://goo.gl/tpsmEJ#status for how to communicate with syzbot.

If the report is already addressed, let syzbot know by replying with:
#syz fix: exact-commit-title

If you want to overwrite report's subsystems, reply with:
#syz set subsystems: new-subsystem
(See the list of subsystem names on the web dashboard)

If the report is a duplicate of another one, reply with:
#syz dup: exact-subject-of-another-report

If you want to undo deduplication, reply with:
#syz undup

syzbot

unread,
Jun 20, 2025, 5:27:33 AM6/20/25
to syzkaller...@googlegroups.com
syzbot has found a reproducer for the following issue on:

HEAD commit: 6282921b6825 Linux 6.6.94
git tree: linux-6.6.y
console output: https://syzkaller.appspot.com/x/log.txt?x=11f28182580000
kernel config: https://syzkaller.appspot.com/x/.config?x=96da6b2210cda427
dashboard link: https://syzkaller.appspot.com/bug?extid=fd1280572f6ac45a8a80
compiler: Debian clang version 20.1.6 (++20250514063057+1e4d39e07757-1~exp1~20250514183223.118), Debian LLD 20.1.6
syz repro: https://syzkaller.appspot.com/x/repro.syz?x=1643f5d4580000
C reproducer: https://syzkaller.appspot.com/x/repro.c?x=12c45d0c580000

Downloadable assets:
disk image: https://storage.googleapis.com/syzbot-assets/a3bf0d8e22b2/disk-6282921b.raw.xz
vmlinux: https://storage.googleapis.com/syzbot-assets/d1d442f782d0/vmlinux-6282921b.xz
kernel image: https://storage.googleapis.com/syzbot-assets/a8378f4b7e1b/bzImage-6282921b.xz
mounted in repro: https://storage.googleapis.com/syzbot-assets/efdb8e9db93f/mount_0.gz
fsck result: failed (log: https://syzkaller.appspot.com/x/fsck.log?x=11293d0c580000)

IMPORTANT: if you fix the issue, please add the following tag to the commit:
Reported-by: syzbot+fd1280...@syzkaller.appspotmail.com

syz-executor343[5762]: memfd_create() called without MFD_EXEC or MFD_NOEXEC_SEAL set
loop0: detected capacity change from 0 to 40427
F2FS-fs (loop0): invalid crc value
F2FS-fs (loop0): Found nat_bits in checkpoint
F2FS-fs (loop0): Mounted with checkpoint version = 48b305e5
------------[ cut here ]------------
kernel BUG at fs/f2fs/segment.c:3475!
invalid opcode: 0000 [#1] PREEMPT SMP KASAN
CPU: 1 PID: 5762 Comm: syz-executor343 Not tainted 6.6.94-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 05/07/2025
RIP: 0010:f2fs_allocate_data_block+0x3f0c/0x3f50 fs/f2fs/segment.c:3475
Code: 22 fe 48 8b 54 24 30 e9 c6 eb ff ff e8 cd 59 c9 fd 48 c7 c7 30 d6 2f 8d 4c 89 f6 e8 4e f6 95 00 e9 e2 eb ff ff e8 b4 59 c9 fd <0f> 0b e8 ad 59 c9 fd 0f 0b e8 a6 59 c9 fd 0f 0b e8 9f 59 c9 fd 0f
RSP: 0018:ffffc9000459f850 EFLAGS: 00010293
RAX: ffffffff83bc3c1c RBX: 0000000000000201 RCX: ffff88802f610000
RDX: 0000000000000000 RSI: 0000000000000201 RDI: 0000000000000200
RBP: 0000000000000200 R08: ffff888025e8a45f R09: 1ffff11004bd148b
R10: dffffc0000000000 R11: ffffed1004bd148c R12: 1ffff920008b3f7c
R13: 0000000000000000 R14: 0000000000002401 R15: dffffc0000000000
FS: 0000555590526380(0000) GS:ffff8880b8f00000(0000) knlGS:0000000000000000
CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 00007fad6de12000 CR3: 000000005a16f000 CR4: 00000000003506e0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
Call Trace:
<TASK>
__allocate_data_block fs/f2fs/data.c:1421 [inline]
f2fs_map_blocks+0x1697/0x3c00 fs/f2fs/data.c:1601
f2fs_expand_inode_data+0x543/0x8e0 fs/f2fs/file.c:1798
f2fs_fallocate+0x416/0x8a0 fs/f2fs/file.c:1901
vfs_fallocate+0x58e/0x700 fs/open.c:324
ksys_fallocate fs/open.c:347 [inline]
__do_sys_fallocate fs/open.c:355 [inline]
__se_sys_fallocate fs/open.c:353 [inline]
__x64_sys_fallocate+0xc1/0x110 fs/open.c:353
do_syscall_x64 arch/x86/entry/common.c:51 [inline]
do_syscall_64+0x55/0xb0 arch/x86/entry/common.c:81
entry_SYSCALL_64_after_hwframe+0x68/0xd2
RIP: 0033:0x7f1f9fbe5879
Code: 28 00 00 00 75 05 48 83 c4 28 c3 e8 61 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 b8 ff ff ff f7 d8 64 89 01 48
RSP: 002b:00007ffcc9777b08 EFLAGS: 00000246 ORIG_RAX: 000000000000011d
RAX: ffffffffffffffda RBX: 0000200000000180 RCX: 00007f1f9fbe5879
RDX: 000000000000fc01 RSI: 0000000000000000 RDI: 0000000000000005
RBP: 00007f1f9fc5d610 R08: 00000000000b55f8 R09: 00000000000b55f8
R10: 00000000001000f4 R11: 0000000000000246 R12: 0000000000000001
R13: 00007ffcc9777cd8 R14: 0000000000000001 R15: 0000000000000001
</TASK>
Modules linked in:
---[ end trace 0000000000000000 ]---
RIP: 0010:f2fs_allocate_data_block+0x3f0c/0x3f50 fs/f2fs/segment.c:3475
Code: 22 fe 48 8b 54 24 30 e9 c6 eb ff ff e8 cd 59 c9 fd 48 c7 c7 30 d6 2f 8d 4c 89 f6 e8 4e f6 95 00 e9 e2 eb ff ff e8 b4 59 c9 fd <0f> 0b e8 ad 59 c9 fd 0f 0b e8 a6 59 c9 fd 0f 0b e8 9f 59 c9 fd 0f
RSP: 0018:ffffc9000459f850 EFLAGS: 00010293
RAX: ffffffff83bc3c1c RBX: 0000000000000201 RCX: ffff88802f610000
RDX: 0000000000000000 RSI: 0000000000000201 RDI: 0000000000000200
RBP: 0000000000000200 R08: ffff888025e8a45f R09: 1ffff11004bd148b
R10: dffffc0000000000 R11: ffffed1004bd148c R12: 1ffff920008b3f7c
R13: 0000000000000000 R14: 0000000000002401 R15: dffffc0000000000
FS: 0000555590526380(0000) GS:ffff8880b8f00000(0000) knlGS:0000000000000000
CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 00007fad6de12000 CR3: 000000005a16f000 CR4: 00000000003506e0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400


---
If you want syzbot to run the reproducer, reply with:
#syz test: git://repo/address.git branch-or-commit-hash
If you attach or paste a git patch, syzbot will apply it before testing.
Reply all
Reply to author
Forward
0 new messages