WARNING in nilfs_dat_prepare_end

11 views
Skip to first unread message

syzbot

unread,
Oct 9, 2022, 8:14:38 AM10/9/22
to syzkaller...@googlegroups.com
Hello,

syzbot found the following issue on:

HEAD commit: 3f8a27f9e27b Linux 4.19.211
git tree: linux-4.19.y
console output: https://syzkaller.appspot.com/x/log.txt?x=1731afa2880000
kernel config: https://syzkaller.appspot.com/x/.config?x=9b9277b418617afe
dashboard link: https://syzkaller.appspot.com/bug?extid=cc30088e2be0470cc7be
compiler: gcc version 10.2.1 20210110 (Debian 10.2.1-6)
syz repro: https://syzkaller.appspot.com/x/repro.syz?x=10f0988a880000
C reproducer: https://syzkaller.appspot.com/x/repro.c?x=1411fadc880000

Downloadable assets:
disk image: https://storage.googleapis.com/syzbot-assets/98c0bdb4abb3/disk-3f8a27f9.raw.xz
vmlinux: https://storage.googleapis.com/syzbot-assets/ea228ff02669/vmlinux-3f8a27f9.xz
mounted in repro: https://storage.googleapis.com/syzbot-assets/890303d53afb/mount_0.gz

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

NILFS error (device loop0): nilfs_check_page: bad entry in directory #12: rec_len is smaller than minimal - offset=0, inode=0, rec_len=0, name_len=0
Remounting filesystem read-only
------------[ cut here ]------------
WARNING: CPU: 1 PID: 8101 at fs/nilfs2/dat.c:151 nilfs_dat_prepare_end.cold+0x11/0x18 fs/nilfs2/dat.c:151
Kernel panic - not syncing: panic_on_warn set ...

CPU: 1 PID: 8101 Comm: syz-executor289 Not tainted 4.19.211-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 09/22/2022
Call Trace:
__dump_stack lib/dump_stack.c:77 [inline]
dump_stack+0x1fc/0x2ef lib/dump_stack.c:118
panic+0x26a/0x50e kernel/panic.c:186
__warn.cold+0x20/0x5a kernel/panic.c:541
report_bug+0x262/0x2b0 lib/bug.c:183
fixup_bug arch/x86/kernel/traps.c:178 [inline]
fixup_bug arch/x86/kernel/traps.c:173 [inline]
do_error_trap+0x1d7/0x310 arch/x86/kernel/traps.c:296
invalid_op+0x14/0x20 arch/x86/entry/entry_64.S:1038
RIP: 0010:nilfs_dat_prepare_end.cold+0x11/0x18 fs/nilfs2/dat.c:151
Code: c1 e8 b0 4f 69 f9 48 c7 c7 80 df 9e 88 e8 0f 81 fa ff 0f 0b e9 20 61 b6 fa e8 98 4f 69 f9 48 c7 c7 80 df 9e 88 e8 f7 80 fa ff <0f> 0b e9 1a 66 b6 fa e8 80 4f 69 f9 48 c7 c7 80 df 9e 88 e8 df 80
RSP: 0018:ffff8880b0dbf8e8 EFLAGS: 00010282
RAX: 0000000000000024 RBX: ffff8880b0dbf950 RCX: 0000000000000000
RDX: 0000000000000000 RSI: ffffffff814dff01 RDI: ffffed10161b7f0f
RBP: ffff88808e5a49c0 R08: 0000000000000024 R09: 0000000000000000
R10: 0000000000000005 R11: 0000000000000000 R12: 00000000fffffffe
R13: ffff8880b0dbf968 R14: ffff88808e5a49c0 R15: ffff8880a2cf78c8
nilfs_bmap_prepare_end_ptr fs/nilfs2/bmap.h:211 [inline]
nilfs_direct_delete+0x20c/0x2d0 fs/nilfs2/direct.c:155
nilfs_bmap_do_delete+0x225/0x2e0 fs/nilfs2/bmap.c:176
nilfs_bmap_do_truncate fs/nilfs2/bmap.c:264 [inline]
nilfs_bmap_truncate+0x109/0x300 fs/nilfs2/bmap.c:297
nilfs_truncate_bmap+0x13d/0x350 fs/nilfs2/inode.c:710
nilfs_evict_inode+0x14d/0x440 fs/nilfs2/inode.c:797
evict+0x2ed/0x760 fs/inode.c:559
iput_final fs/inode.c:1555 [inline]
iput+0x4f1/0x860 fs/inode.c:1581
dentry_unlink_inode+0x265/0x320 fs/dcache.c:374
d_delete+0x210/0x280 fs/dcache.c:2372
vfs_rmdir.part.0+0x28a/0x3d0 fs/namei.c:3895
vfs_rmdir fs/namei.c:3868 [inline]
do_rmdir+0x3fd/0x490 fs/namei.c:3943
do_syscall_64+0xf9/0x620 arch/x86/entry/common.c:293
entry_SYSCALL_64_after_hwframe+0x49/0xbe
RIP: 0033:0x7efc3d39a289
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 c0 ff ff ff f7 d8 64 89 01 48
RSP: 002b:00007ffc141eac78 EFLAGS: 00000246 ORIG_RAX: 0000000000000054
RAX: ffffffffffffffda RBX: 0030656c69662f2e RCX: 00007efc3d39a289
RDX: 00007efc3d358823 RSI: 0000000000000000 RDI: 0000000020000780
RBP: 00007efc3d359af0 R08: 00005555572e82c0 R09: 0000000000000000
R10: 00007ffc141eab40 R11: 0000000000000246 R12: 00007efc3d359b80
R13: 0000000000000000 R14: 0000000000000000 R15: 0000000000000000
Kernel Offset: disabled
Rebooting in 86400 seconds..


---
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.
syzbot can test patches for this issue, for details see:
https://goo.gl/tpsmEJ#testing-patches

syzbot

unread,
Oct 9, 2022, 10:44:40 PM10/9/22
to syzkaller...@googlegroups.com
Hello,

syzbot found the following issue on:

HEAD commit: 9d5c0b3a8e1a Linux 4.14.295
git tree: linux-4.14.y
console output: https://syzkaller.appspot.com/x/log.txt?x=1611d51a880000
kernel config: https://syzkaller.appspot.com/x/.config?x=746c079015a92425
dashboard link: https://syzkaller.appspot.com/bug?extid=683c851b3ddd51b50708
compiler: gcc version 10.2.1 20210110 (Debian 10.2.1-6)
syz repro: https://syzkaller.appspot.com/x/repro.syz?x=114af83a880000
C reproducer: https://syzkaller.appspot.com/x/repro.c?x=157292a4880000

Downloadable assets:
disk image: https://storage.googleapis.com/syzbot-assets/ed6fcf5895a2/disk-9d5c0b3a.raw.xz
vmlinux: https://storage.googleapis.com/syzbot-assets/341aa3534116/vmlinux-9d5c0b3a.xz
mounted in repro: https://storage.googleapis.com/syzbot-assets/78ddb0caf38b/mount_0.gz

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

NILFS error (device loop0): nilfs_check_page: bad entry in directory #12: rec_len is smaller than minimal - offset=0, inode=0, rec_len=0, name_len=0
Remounting filesystem read-only
------------[ cut here ]------------
WARNING: CPU: 0 PID: 7980 at fs/nilfs2/dat.c:160 nilfs_dat_prepare_end+0x1e8/0x2e0 fs/nilfs2/dat.c:160
Kernel panic - not syncing: panic_on_warn set ...

CPU: 0 PID: 7980 Comm: syz-executor160 Not tainted 4.14.295-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 09/22/2022
Call Trace:
__dump_stack lib/dump_stack.c:17 [inline]
dump_stack+0x1b2/0x281 lib/dump_stack.c:58
panic+0x1f9/0x42d kernel/panic.c:183
__warn.cold+0x20/0x44 kernel/panic.c:547
report_bug+0x208/0x250 lib/bug.c:183
fixup_bug arch/x86/kernel/traps.c:177 [inline]
fixup_bug arch/x86/kernel/traps.c:172 [inline]
do_error_trap+0x195/0x2d0 arch/x86/kernel/traps.c:295
invalid_op+0x1b/0x40 arch/x86/entry/entry_64.S:964
RIP: 0010:nilfs_dat_prepare_end+0x1e8/0x2e0 fs/nilfs2/dat.c:160
RSP: 0018:ffff888095d8f968 EFLAGS: 00010297
RAX: ffff88809c6fe1c0 RBX: ffff888095d8f9d0 RCX: 61c8864680b583eb
RDX: 0000000000000000 RSI: 0000000000000002 RDI: ffff88808df1ba38
RBP: ffff888095d8f9e8 R08: 0000000000000000 R09: 0000000000000005
R10: 0000000000000000 R11: 0000000000000000 R12: 00000000fffffffe
R13: ffff88808df1f9c8 R14: ffff88808df1f9c8 R15: ffff88808df1a1b0
nilfs_bmap_prepare_end_ptr fs/nilfs2/bmap.h:220 [inline]
nilfs_direct_delete+0x1b7/0x250 fs/nilfs2/direct.c:164
nilfs_bmap_do_delete+0x1d8/0x280 fs/nilfs2/bmap.c:185
nilfs_bmap_do_truncate fs/nilfs2/bmap.c:273 [inline]
nilfs_bmap_truncate+0xe9/0x280 fs/nilfs2/bmap.c:306
nilfs_truncate_bmap+0x101/0x2c0 fs/nilfs2/inode.c:719
nilfs_evict_inode+0x11b/0x3a0 fs/nilfs2/inode.c:806
evict+0x2c8/0x700 fs/inode.c:555
iput_final fs/inode.c:1524 [inline]
iput+0x458/0x7e0 fs/inode.c:1551
dentry_unlink_inode+0x25c/0x310 fs/dcache.c:387
d_delete+0x1c5/0x280 fs/dcache.c:2417
vfs_rmdir.part.0+0x260/0x390 fs/namei.c:3922
vfs_rmdir fs/namei.c:3895 [inline]
do_rmdir+0x334/0x3c0 fs/namei.c:3970
do_syscall_64+0x1d5/0x640 arch/x86/entry/common.c:292
entry_SYSCALL_64_after_hwframe+0x46/0xbb
RIP: 0033:0x7f2fff57c289
RSP: 002b:00007ffe7a12ead8 EFLAGS: 00000246 ORIG_RAX: 0000000000000054
RAX: ffffffffffffffda RBX: 0030656c69662f2e RCX: 00007f2fff57c289
RDX: 00007f2fff53a823 RSI: 0000000000000000 RDI: 0000000020000780
RBP: 00007f2fff53baf0 R08: 0000555556e662c0 R09: 0000000000000000
R10: 00007ffe7a12e9a0 R11: 0000000000000246 R12: 00007f2fff53bb80
Reply all
Reply to author
Forward
0 new messages