INFO: trying to register non-static key in nilfs_bmap_lookup_at_level

13 views
Skip to first unread message

syzbot

unread,
Sep 27, 2022, 6:38:38 PM9/27/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=173c13df080000
kernel config: https://syzkaller.appspot.com/x/.config?x=9b9277b418617afe
dashboard link: https://syzkaller.appspot.com/bug?extid=e9e371ccef5bf7a96b0d
compiler: gcc version 10.2.1 20210110 (Debian 10.2.1-6)
syz repro: https://syzkaller.appspot.com/x/repro.syz?x=103eba04880000
C reproducer: https://syzkaller.appspot.com/x/repro.c?x=10822898880000

Downloadable assets:
disk image: https://storage.googleapis.com/98c0bdb4abb3/disk-3f8a27f9.raw.xz
vmlinux: https://storage.googleapis.com/ea228ff02669/vmlinux-3f8a27f9.xz

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

NILFS (loop0): broken superblock, retrying with spare superblock (blocksize = 1024)
INFO: trying to register non-static key.
The code is fine but needs lockdep annotation, or maybe
you didn't initialize this object before use?
NILFS (loop0): segctord starting. Construction interval = 5 seconds, CP frequency < 30 seconds
turning off the locking correctness validator.
CPU: 0 PID: 8098 Comm: syz-executor120 Not tainted 4.19.211-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 08/26/2022
Call Trace:
__dump_stack lib/dump_stack.c:77 [inline]
dump_stack+0x1fc/0x2ef lib/dump_stack.c:118
assign_lock_key kernel/locking/lockdep.c:728 [inline]
register_lock_class+0xe82/0x11c0 kernel/locking/lockdep.c:754
__lock_acquire+0x17d/0x3ff0 kernel/locking/lockdep.c:3304
lock_acquire+0x170/0x3c0 kernel/locking/lockdep.c:3908
down_read+0x36/0x80 kernel/locking/rwsem.c:24
nilfs_bmap_lookup_at_level+0x7b/0x3e0 fs/nilfs2/bmap.c:68
nilfs_bmap_lookup fs/nilfs2/bmap.h:170 [inline]
nilfs_mdt_submit_block.constprop.0+0x1a5/0xaa0 fs/nilfs2/mdt.c:142
nilfs_mdt_read_block+0x96/0x3e0 fs/nilfs2/mdt.c:175
nilfs_mdt_get_block+0xe6/0xd40 fs/nilfs2/mdt.c:250
nilfs_palloc_get_block+0xc4/0x2b0 fs/nilfs2/alloc.c:216
nilfs_palloc_get_entry_block+0x17b/0x230 fs/nilfs2/alloc.c:318
nilfs_ifile_get_inode_block+0xbf/0x170 fs/nilfs2/ifile.c:143
__nilfs_read_inode fs/nilfs2/inode.c:483 [inline]
nilfs_iget+0x204/0x860 fs/nilfs2/inode.c:592
nilfs_get_root_dentry+0x26/0x250 fs/nilfs2/super.c:908
nilfs_fill_super fs/nilfs2/super.c:1082 [inline]
nilfs_mount+0xac8/0xe70 fs/nilfs2/super.c:1321
mount_fs+0xa3/0x310 fs/super.c:1261
vfs_kern_mount.part.0+0x68/0x470 fs/namespace.c:961
vfs_kern_mount fs/namespace.c:951 [inline]
do_new_mount fs/namespace.c:2492 [inline]
do_mount+0x115c/0x2f50 fs/namespace.c:2822
ksys_mount+0xcf/0x130 fs/namespace.c:3038
__do_sys_mount fs/namespace.c:3052 [inline]
__se_sys_mount fs/namespace.c:3049 [inline]
__x64_sys_mount+0xba/0x150 fs/namespace.c:3049
do_syscall_64+0xf9/0x620 arch/x86/entry/common.c:293
entry_SYSCALL_64_after_hwframe+0x49/0xbe
RIP: 0033:0x7efd79d5b63a
Code: 83 c4 08 5b 5d c3 66 2e 0f 1f 84 00 00 00 00 00 c3 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 44 00 00 49 89 ca b8 a5 00 00 00 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:00007fff95e1c9f8 EFLAGS: 00000286 ORIG_RAX: 00000000000000a5
RAX: ffffffffffffffda RBX: 00007fff95e1ca50 RCX: 00007efd79d5b63a
RDX: 0000000020000000 RSI: 0000000020000100 RDI: 00007fff95e1ca10
RBP: 00007fff95e1ca10 R08: 00007fff95e1ca50 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000286 R12: 0000000020000788
R13: 0000000000000003 R14: 0000000000000004 R15: 000000000000003b
kasan: CONFIG_KASAN_INLINE enabled
kasan: GPF could be caused by NULL-ptr deref or user memory access
general protection fault: 0000 [#1] PREEMPT SMP KASAN
CPU: 0 PID: 8098 Comm: syz-executor120 Not tainted 4.19.211-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 08/26/2022
RIP: 0010:nilfs_bmap_lookup_at_level+0xb5/0x3e0 fs/nilfs2/bmap.c:69
Code: df 48 89 fa 48 c1 ea 03 80 3c 02 00 0f 85 95 02 00 00 48 8b 83 c0 00 00 00 48 ba 00 00 00 00 00 fc ff df 48 89 c1 48 c1 e9 03 <80> 3c 11 00 0f 85 7d 02 00 00 4c 89 e6 48 89 e9 44 89 fa 48 89 df
RSP: 0018:ffff8880952b7650 EFLAGS: 00010246
RAX: 0000000000000000 RBX: ffff88808daa7098 RCX: 0000000000000000
RDX: dffffc0000000000 RSI: ffffffff814a9aa2 RDI: ffff88808daa7158
RBP: ffff8880952b7738 R08: 0000000000000001 R09: 0000000000000000
R10: 0000000000000005 R11: ffffffff8c66501b R12: 0000000000000002
R13: 1ffff11012a56ecb R14: ffff88808daa70d0 R15: 0000000000000001
FS: 0000555555a62300(0000) GS:ffff8880ba000000(0000) knlGS:0000000000000000
CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 00007fff95e1d000 CR3: 00000000b4482000 CR4: 00000000003406f0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
Call Trace:
nilfs_bmap_lookup fs/nilfs2/bmap.h:170 [inline]
nilfs_mdt_submit_block.constprop.0+0x1a5/0xaa0 fs/nilfs2/mdt.c:142
nilfs_mdt_read_block+0x96/0x3e0 fs/nilfs2/mdt.c:175
nilfs_mdt_get_block+0xe6/0xd40 fs/nilfs2/mdt.c:250
nilfs_palloc_get_block+0xc4/0x2b0 fs/nilfs2/alloc.c:216
nilfs_palloc_get_entry_block+0x17b/0x230 fs/nilfs2/alloc.c:318
nilfs_ifile_get_inode_block+0xbf/0x170 fs/nilfs2/ifile.c:143
__nilfs_read_inode fs/nilfs2/inode.c:483 [inline]
nilfs_iget+0x204/0x860 fs/nilfs2/inode.c:592
nilfs_get_root_dentry+0x26/0x250 fs/nilfs2/super.c:908
nilfs_fill_super fs/nilfs2/super.c:1082 [inline]
nilfs_mount+0xac8/0xe70 fs/nilfs2/super.c:1321
mount_fs+0xa3/0x310 fs/super.c:1261
vfs_kern_mount.part.0+0x68/0x470 fs/namespace.c:961
vfs_kern_mount fs/namespace.c:951 [inline]
do_new_mount fs/namespace.c:2492 [inline]
do_mount+0x115c/0x2f50 fs/namespace.c:2822
ksys_mount+0xcf/0x130 fs/namespace.c:3038
__do_sys_mount fs/namespace.c:3052 [inline]
__se_sys_mount fs/namespace.c:3049 [inline]
__x64_sys_mount+0xba/0x150 fs/namespace.c:3049
do_syscall_64+0xf9/0x620 arch/x86/entry/common.c:293
entry_SYSCALL_64_after_hwframe+0x49/0xbe
RIP: 0033:0x7efd79d5b63a
Code: 83 c4 08 5b 5d c3 66 2e 0f 1f 84 00 00 00 00 00 c3 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 44 00 00 49 89 ca b8 a5 00 00 00 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:00007fff95e1c9f8 EFLAGS: 00000286 ORIG_RAX: 00000000000000a5
RAX: ffffffffffffffda RBX: 00007fff95e1ca50 RCX: 00007efd79d5b63a
RDX: 0000000020000000 RSI: 0000000020000100 RDI: 00007fff95e1ca10
RBP: 00007fff95e1ca10 R08: 00007fff95e1ca50 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000286 R12: 0000000020000788
R13: 0000000000000003 R14: 0000000000000004 R15: 000000000000003b
Modules linked in:
---[ end trace e6952aa772eef84b ]---
RIP: 0010:nilfs_bmap_lookup_at_level+0xb5/0x3e0 fs/nilfs2/bmap.c:69
Code: df 48 89 fa 48 c1 ea 03 80 3c 02 00 0f 85 95 02 00 00 48 8b 83 c0 00 00 00 48 ba 00 00 00 00 00 fc ff df 48 89 c1 48 c1 e9 03 <80> 3c 11 00 0f 85 7d 02 00 00 4c 89 e6 48 89 e9 44 89 fa 48 89 df
RSP: 0018:ffff8880952b7650 EFLAGS: 00010246
RAX: 0000000000000000 RBX: ffff88808daa7098 RCX: 0000000000000000
RDX: dffffc0000000000 RSI: ffffffff814a9aa2 RDI: ffff88808daa7158
RBP: ffff8880952b7738 R08: 0000000000000001 R09: 0000000000000000
R10: 0000000000000005 R11: ffffffff8c66501b R12: 0000000000000002
R13: 1ffff11012a56ecb R14: ffff88808daa70d0 R15: 0000000000000001
FS: 0000555555a62300(0000) GS:ffff8880ba000000(0000) knlGS:0000000000000000
CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 00007fff95e1d000 CR3: 00000000b4482000 CR4: 00000000003406f0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
----------------
Code disassembly (best guess):
0: df 48 89 fisttps -0x77(%rax)
3: fa cli
4: 48 c1 ea 03 shr $0x3,%rdx
8: 80 3c 02 00 cmpb $0x0,(%rdx,%rax,1)
c: 0f 85 95 02 00 00 jne 0x2a7
12: 48 8b 83 c0 00 00 00 mov 0xc0(%rbx),%rax
19: 48 ba 00 00 00 00 00 movabs $0xdffffc0000000000,%rdx
20: fc ff df
23: 48 89 c1 mov %rax,%rcx
26: 48 c1 e9 03 shr $0x3,%rcx
* 2a: 80 3c 11 00 cmpb $0x0,(%rcx,%rdx,1) <-- trapping instruction
2e: 0f 85 7d 02 00 00 jne 0x2b1
34: 4c 89 e6 mov %r12,%rsi
37: 48 89 e9 mov %rbp,%rcx
3a: 44 89 fa mov %r15d,%edx
3d: 48 89 df mov %rbx,%rdi


---
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 1, 2022, 3:05:37 PM10/1/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=15b07848880000
kernel config: https://syzkaller.appspot.com/x/.config?x=746c079015a92425
dashboard link: https://syzkaller.appspot.com/bug?extid=f9b3c4018f2c63cf0976
compiler: gcc version 10.2.1 20210110 (Debian 10.2.1-6)
syz repro: https://syzkaller.appspot.com/x/repro.syz?x=16409d38880000
C reproducer: https://syzkaller.appspot.com/x/repro.c?x=17ecc904880000

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

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

NILFS (loop0): segctord starting. Construction interval = 5 seconds, CP frequency < 30 seconds
INFO: trying to register non-static key.
the code is fine but needs lockdep annotation.
turning off the locking correctness validator.
CPU: 1 PID: 7964 Comm: syz-executor560 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
register_lock_class+0x389/0x1180 kernel/locking/lockdep.c:768
__lock_acquire+0x167/0x3f20 kernel/locking/lockdep.c:3378
lock_acquire+0x170/0x3f0 kernel/locking/lockdep.c:3998
down_read+0x36/0x80 kernel/locking/rwsem.c:24
nilfs_bmap_lookup_at_level+0x6b/0x380 fs/nilfs2/bmap.c:77
nilfs_bmap_lookup fs/nilfs2/bmap.h:179 [inline]
nilfs_mdt_submit_block.constprop.0+0x152/0x970 fs/nilfs2/mdt.c:151
nilfs_mdt_read_block+0x7c/0x320 fs/nilfs2/mdt.c:184
nilfs_mdt_get_block+0xc7/0xb90 fs/nilfs2/mdt.c:259
nilfs_palloc_get_block+0xb2/0x250 fs/nilfs2/alloc.c:225
nilfs_palloc_get_entry_block+0x17d/0x230 fs/nilfs2/alloc.c:327
nilfs_ifile_get_inode_block+0xb4/0x150 fs/nilfs2/ifile.c:152
__nilfs_read_inode fs/nilfs2/inode.c:492 [inline]
nilfs_iget+0x1c2/0x810 fs/nilfs2/inode.c:601
nilfs_get_root_dentry+0x24/0x1f0 fs/nilfs2/super.c:918
nilfs_fill_super fs/nilfs2/super.c:1092 [inline]
nilfs_mount+0x984/0xd00 fs/nilfs2/super.c:1331
mount_fs+0x92/0x2a0 fs/super.c:1237
vfs_kern_mount.part.0+0x5b/0x470 fs/namespace.c:1046
vfs_kern_mount fs/namespace.c:1036 [inline]
do_new_mount fs/namespace.c:2572 [inline]
do_mount+0xe65/0x2a30 fs/namespace.c:2905
SYSC_mount fs/namespace.c:3121 [inline]
SyS_mount+0xa8/0x120 fs/namespace.c:3098
do_syscall_64+0x1d5/0x640 arch/x86/entry/common.c:292
entry_SYSCALL_64_after_hwframe+0x46/0xbb
RIP: 0033:0x7fc5df26824a
RSP: 002b:00007fc5df213168 EFLAGS: 00000286 ORIG_RAX: 00000000000000a5
RAX: ffffffffffffffda RBX: 0000000000000003 RCX: 00007fc5df26824a
RDX: 0000000020000000 RSI: 0000000020000080 RDI: 00007fc5df213180
RBP: 0000000000000004 R08: 00007fc5df2131c0 R09: 00007fc5df2136b8
R10: 0000000000000000 R11: 0000000000000286 R12: 00007fc5df2131c0
R13: 000000000000003a R14: 00007fc5df213180 R15: 0000000020000770
kasan: CONFIG_KASAN_INLINE enabled
kasan: GPF could be caused by NULL-ptr deref or user memory access
general protection fault: 0000 [#1] PREEMPT SMP KASAN
Modules linked in:
CPU: 1 PID: 7964 Comm: syz-executor560 Not tainted 4.14.295-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 09/22/2022
task: ffff8880981884c0 task.stack: ffff888091a88000
RIP: 0010:nilfs_bmap_lookup_at_level+0xa5/0x380 fs/nilfs2/bmap.c:78
RSP: 0018:ffff888091a8f750 EFLAGS: 00010246
RAX: 0000000000000000 RBX: ffff88808e2e4098 RCX: 0000000000000000
RDX: dffffc0000000000 RSI: 1ffff11012351e93 RDI: ffff88808e2e4158
RBP: ffff888091a8f818 R08: 0000000000000001 R09: 0000000000000000
R10: 0000000000000001 R11: ffff8880981884c0 R12: 0000000000000002
R13: 1ffff11012351eeb R14: ffff88808e2e40d0 R15: 0000000000000001
FS: 00007fc5df213700(0000) GS:ffff8880ba500000(0000) knlGS:0000000000000000
CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 00007fc5df2cfa2c CR3: 00000000a44dc000 CR4: 00000000003406e0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
Call Trace:
nilfs_bmap_lookup fs/nilfs2/bmap.h:179 [inline]
nilfs_mdt_submit_block.constprop.0+0x152/0x970 fs/nilfs2/mdt.c:151
nilfs_mdt_read_block+0x7c/0x320 fs/nilfs2/mdt.c:184
nilfs_mdt_get_block+0xc7/0xb90 fs/nilfs2/mdt.c:259
nilfs_palloc_get_block+0xb2/0x250 fs/nilfs2/alloc.c:225
nilfs_palloc_get_entry_block+0x17d/0x230 fs/nilfs2/alloc.c:327
nilfs_ifile_get_inode_block+0xb4/0x150 fs/nilfs2/ifile.c:152
__nilfs_read_inode fs/nilfs2/inode.c:492 [inline]
nilfs_iget+0x1c2/0x810 fs/nilfs2/inode.c:601
nilfs_get_root_dentry+0x24/0x1f0 fs/nilfs2/super.c:918
nilfs_fill_super fs/nilfs2/super.c:1092 [inline]
nilfs_mount+0x984/0xd00 fs/nilfs2/super.c:1331
mount_fs+0x92/0x2a0 fs/super.c:1237
vfs_kern_mount.part.0+0x5b/0x470 fs/namespace.c:1046
vfs_kern_mount fs/namespace.c:1036 [inline]
do_new_mount fs/namespace.c:2572 [inline]
do_mount+0xe65/0x2a30 fs/namespace.c:2905
SYSC_mount fs/namespace.c:3121 [inline]
SyS_mount+0xa8/0x120 fs/namespace.c:3098
do_syscall_64+0x1d5/0x640 arch/x86/entry/common.c:292
entry_SYSCALL_64_after_hwframe+0x46/0xbb
RIP: 0033:0x7fc5df26824a
RSP: 002b:00007fc5df213168 EFLAGS: 00000286 ORIG_RAX: 00000000000000a5
RAX: ffffffffffffffda RBX: 0000000000000003 RCX: 00007fc5df26824a
RDX: 0000000020000000 RSI: 0000000020000080 RDI: 00007fc5df213180
RBP: 0000000000000004 R08: 00007fc5df2131c0 R09: 00007fc5df2136b8
R10: 0000000000000000 R11: 0000000000000286 R12: 00007fc5df2131c0
R13: 000000000000003a R14: 00007fc5df213180 R15: 0000000020000770
Code: ff df 48 89 fa 48 c1 ea 03 80 3c 02 00 0f 85 69 02 00 00 48 8b 83 c0 00 00 00 48 ba 00 00 00 00 00 fc ff df 48 89 c1 48 c1 e9 03 <80> 3c 11 00 0f 85 32 02 00 00 4c 89 e6 48 89 e9 44 89 fa 48 89
RIP: nilfs_bmap_lookup_at_level+0xa5/0x380 fs/nilfs2/bmap.c:78 RSP: ffff888091a8f750
---[ end trace bb833ac63d79ad7c ]---
----------------
Code disassembly (best guess), 1 bytes skipped:
0: df 48 89 fisttps -0x77(%rax)
3: fa cli
4: 48 c1 ea 03 shr $0x3,%rdx
8: 80 3c 02 00 cmpb $0x0,(%rdx,%rax,1)
c: 0f 85 69 02 00 00 jne 0x27b
12: 48 8b 83 c0 00 00 00 mov 0xc0(%rbx),%rax
19: 48 ba 00 00 00 00 00 movabs $0xdffffc0000000000,%rdx
20: fc ff df
23: 48 89 c1 mov %rax,%rcx
26: 48 c1 e9 03 shr $0x3,%rcx
* 2a: 80 3c 11 00 cmpb $0x0,(%rcx,%rdx,1) <-- trapping instruction
2e: 0f 85 32 02 00 00 jne 0x266
34: 4c 89 e6 mov %r12,%rsi
37: 48 89 e9 mov %rbp,%rcx
3a: 44 89 fa mov %r15d,%edx
3d: 48 rex.W
3e: 89 .byte 0x89
Reply all
Reply to author
Forward
0 new messages