Skip to content

[syzbot] [nilfs?] WARNING in nilfs_cpfile_delete_checkpoints #173

Description

@konis

Link: https://syzkaller.appspot.com/bug?extid=79b815da3aec0a6a4d02
Link: https://lore.kernel.org/r/6a4b46d4.b42ede87.8bd1.001b.GAE@google.com

Hello,

syzbot found the following issue on:

HEAD commit:    71dfdfb0209b Merge tag 'vfs-7.2-rc2.fixes' of git://[git.ke](http://git.ke/)..
git tree:       upstream
console output: https://syzkaller.appspot.com/x/log.txt?x=10c00d39580000
kernel config:  https://syzkaller.appspot.com/x/.config?x=20c9876b0f77b546
dashboard link: https://syzkaller.appspot.com/bug?extid=79b815da3aec0a6a4d02
compiler:       Debian clang version 22.1.8 (++20260613092233+e80beda6e255-1~exp1~20260613092250.77), Debian LLD 22.1.8
syz repro:      https://syzkaller.appspot.com/x/repro.syz?x=14d01c6e580000
C reproducer:   https://syzkaller.appspot.com/x/repro.c?x=12776e6e580000

Downloadable assets:
disk image (non-bootable): https://storage.googleapis.com/syzbot-assets/d900f083ada3/non_bootable_disk-71dfdfb0.raw.xz
vmlinux: https://storage.googleapis.com/syzbot-assets/522f1a761fe1/vmlinux-71dfdfb0.xz
kernel image: https://storage.googleapis.com/syzbot-assets/595943c8baaa/bzImage-71dfdfb0.xz
mounted in repro #1: https://storage.googleapis.com/syzbot-assets/e2143050dc41/mount_0.gz
mounted in repro #2: https://storage.googleapis.com/syzbot-assets/958ab3f4c7bb/mount_5.gz
mounted in repro #3: https://storage.googleapis.com/syzbot-assets/77f82daa3be0/mount_6.gz
  fsck result: OK (log: https://syzkaller.appspot.com/x/fsck.log?x=15143946580000)

IMPORTANT: if you fix the issue, please add the following tag to the commit:
Reported-by: [syzbot+79b815da3aec0a6a4d02@syzkaller.appspotmail.com](mailto:syzbot%2B79b815da3aec0a6a4d02@syzkaller.appspotmail.com)

------------[ cut here ]------------
le32_to_cpu(cp->cp_checkpoints_count) < n
WARNING: fs/nilfs2/cpfile.c:94 at nilfs_cpfile_block_sub_valid_checkpoints fs/nilfs2/cpfile.c:94 [inline], CPU#0: syz.0.17/5467
WARNING: fs/nilfs2/cpfile.c:94 at nilfs_cpfile_delete_checkpoints+0x913/0xce0 fs/nilfs2/cpfile.c:522, CPU#0: syz.0.17/5467
Modules linked in:
CPU: 0 UID: 0 PID: 5467 Comm: syz.0.17 Not tainted syzkaller #0 PREEMPT(full)
Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2 04/01/2014
RIP: 0010:nilfs_cpfile_block_sub_valid_checkpoints fs/nilfs2/cpfile.c:94 [inline]
RIP: 0010:nilfs_cpfile_delete_checkpoints+0x913/0xce0 fs/nilfs2/cpfile.c:522
Code: fb ff 41 89 c6 31 ff 89 c6 e8 e9 f9 f1 fd 45 85 f6 0f 85 6a 03 00 00 e8 9b f5 f1 fd 45 31 f6 e9 23 fd ff ff e8 8e f5 f1 fd 90 <0f> 0b 90 e9 d0 fe ff ff 89 d9 80 e1 07 80 c1 03 38 c1 0f 8c 0a f9
RSP: 0018:ffffc900025df4e0 EFLAGS: 00010293
RAX: ffffffff83d48d02 RBX: 1ffff11006feb480 RCX: ffff88803462a540
RDX: 0000000000000000 RSI: 0000000000000005 RDI: 0000000000000000
RBP: ffffc900025df630 R08: ffffea0000dfd687 R09: 1ffffd40001bfad0
R10: dffffc0000000000 R11: fffff940001bfad1 R12: 0000000000000005
R13: dffffc0000000000 R14: 0000000000000000 R15: ffff888037f5a404
FS:  0000555559731500(0000) GS:ffff88808c54e000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 0000000000000010 CR3: 0000000044683000 CR4: 0000000000352ef0
Call Trace:
 <TASK>
 nilfs_ioctl_delete_checkpoints fs/nilfs2/ioctl.c:680 [inline]
 nilfs_ioctl_prepare_clean_segments+0x158/0x840 fs/nilfs2/ioctl.c:787
 nilfs_clean_segments+0x2b6/0xbb0 fs/nilfs2/segment.c:2546
 nilfs_ioctl_clean_segments fs/nilfs2/ioctl.c:922 [inline]
 nilfs_ioctl+0x2619/0x2780 fs/nilfs2/ioctl.c:1352
 vfs_ioctl fs/ioctl.c:51 [inline]
 __do_sys_ioctl fs/ioctl.c:597 [inline]
 __se_sys_ioctl+0xfc/0x170 fs/ioctl.c:583
 do_syscall_x64 arch/x86/entry/syscall_64.c:63 [inline]
 do_syscall_64+0x174/0x580 arch/x86/entry/syscall_64.c:94
 entry_SYSCALL_64_after_hwframe+0x77/0x7f
RIP: 0033:0x7ff42779de59
Code: ff c3 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 44 00 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 e8 ff ff ff f7 d8 64 89 01 48
RSP: 002b:00007ffd20bf4538 EFLAGS: 00000246 ORIG_RAX: 0000000000000010
RAX: ffffffffffffffda RBX: 00007ff427a25fa0 RCX: 00007ff42779de59
RDX: 0000200000000640 RSI: 0000000040786e88 RDI: 0000000000000009
RBP: 00007ff427833e6f R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000
R13: 00007ff427a25fac R14: 00007ff427a25fa0 R15: 00007ff427a25fa0
 </TASK>


---
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 [syzkaller@googlegroups.com](mailto:syzkaller@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 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.

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingpatch proposedA patch has been proposed and is in on the way to the main line.syzbot

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions