[v6.1] WARNING: bad unlock balance in ext4_rename2

0 Aufrufe
Direkt zur ersten ungelesenen Nachricht

syzbot

ungelesen,
17.03.2023, 19:23:3817.03.23
an syzkaller...@googlegroups.com
Hello,

syzbot found the following issue on:

HEAD commit: 7eaef76fbc46 Linux 6.1.20
git tree: linux-6.1.y
console output: https://syzkaller.appspot.com/x/log.txt?x=17c9bebec80000
kernel config: https://syzkaller.appspot.com/x/.config?x=28c36fe4d02f8c88
dashboard link: https://syzkaller.appspot.com/bug?extid=fb80287c88adff6883d6
compiler: Debian clang version 15.0.7, GNU ld (GNU Binutils for Debian) 2.35.2

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

Downloadable assets:
disk image: https://storage.googleapis.com/syzbot-assets/610a00ba4375/disk-7eaef76f.raw.xz
vmlinux: https://storage.googleapis.com/syzbot-assets/57c1310f9a30/vmlinux-7eaef76f.xz
kernel image: https://storage.googleapis.com/syzbot-assets/81999f717d3b/bzImage-7eaef76f.xz

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

EXT4-fs (loop0): mounted filesystem without journal. Quota mode: writeback.
ext4 filesystem being mounted at /root/syzkaller-testdir1404054866/syzkaller.iQEHId/424/bus supports timestamps until 2038 (0x7fffffff)
EXT4-fs error (device loop0): ext4_get_first_dir_block:3524: inode #12: comm syz-executor.0: directory missing '.'
=====================================
WARNING: bad unlock balance detected!
6.1.20-syzkaller #0 Not tainted
-------------------------------------
syz-executor.0/11817 is trying to release lock (&type->i_mutex_dir_key) at:
[<ffffffff8240908c>] inode_unlock include/linux/fs.h:761 [inline]
[<ffffffff8240908c>] ext4_rename fs/ext4/namei.c:4029 [inline]
[<ffffffff8240908c>] ext4_rename2+0x3dfc/0x4450 fs/ext4/namei.c:4202
but there are no more locks to release!

other info that might help us debug this:
2 locks held by syz-executor.0/11817:
#0: ffff888066fbc460 (sb_writers#4){.+.+}-{0:0}, at: mnt_want_write+0x3b/0x80 fs/namespace.c:393
#1: ffff888038189810 (&type->i_mutex_dir_key#3/1){+.+.}-{3:3}, at: lock_rename+0x182/0x1a0

stack backtrace:
CPU: 0 PID: 11817 Comm: syz-executor.0 Not tainted 6.1.20-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 03/02/2023
Call Trace:
<TASK>
__dump_stack lib/dump_stack.c:88 [inline]
dump_stack_lvl+0x1e3/0x2cb lib/dump_stack.c:106
print_unlock_imbalance_bug+0x24e/0x2c0 kernel/locking/lockdep.c:5109
__lock_release kernel/locking/lockdep.c:5346 [inline]
lock_release+0x638/0xab0 kernel/locking/lockdep.c:5689
up_write+0x75/0x580 kernel/locking/rwsem.c:1625
inode_unlock include/linux/fs.h:761 [inline]
ext4_rename fs/ext4/namei.c:4029 [inline]
ext4_rename2+0x3dfc/0x4450 fs/ext4/namei.c:4202
vfs_rename+0xd8f/0x1190 fs/namei.c:4779
do_renameat2+0xb97/0x13b0 fs/namei.c:4930
__do_sys_rename fs/namei.c:4976 [inline]
__se_sys_rename fs/namei.c:4974 [inline]
__x64_sys_rename+0x82/0x90 fs/namei.c:4974
do_syscall_x64 arch/x86/entry/common.c:50 [inline]
do_syscall_64+0x3d/0xb0 arch/x86/entry/common.c:80
entry_SYSCALL_64_after_hwframe+0x63/0xcd
RIP: 0033:0x7fa38608c0f9
Code: 28 00 00 00 75 05 48 83 c4 28 c3 e8 f1 19 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:00007fa386d79168 EFLAGS: 00000246 ORIG_RAX: 0000000000000052
RAX: ffffffffffffffda RBX: 00007fa3861abf80 RCX: 00007fa38608c0f9
RDX: 0000000000000000 RSI: 00000000200002c0 RDI: 0000000020000000
RBP: 00007fa3860e7b39 R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000
R13: 00007ffc8f32f63f R14: 00007fa386d79300 R15: 0000000000022000
</TASK>
------------[ cut here ]------------
DEBUG_RWSEMS_WARN_ON((rwsem_owner(sem) != current) && !rwsem_test_oflags(sem, RWSEM_NONSPINNABLE)): count = 0x0, magic = 0xffff888081e3b5b8, owner = 0x0, curr 0xffff888021c19d40, list empty
WARNING: CPU: 1 PID: 11817 at kernel/locking/rwsem.c:1372 __up_write kernel/locking/rwsem.c:1371 [inline]
WARNING: CPU: 1 PID: 11817 at kernel/locking/rwsem.c:1372 up_write+0x4f5/0x580 kernel/locking/rwsem.c:1626
Modules linked in:
CPU: 1 PID: 11817 Comm: syz-executor.0 Not tainted 6.1.20-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 03/02/2023
RIP: 0010:__up_write kernel/locking/rwsem.c:1371 [inline]
RIP: 0010:up_write+0x4f5/0x580 kernel/locking/rwsem.c:1626
Code: 48 c7 c7 00 c6 eb 8a 48 c7 c6 a0 c8 eb 8a 48 8b 54 24 28 48 8b 4c 24 18 4d 89 e0 4c 8b 4c 24 30 53 e8 ef f9 e8 ff 48 83 c4 08 <0f> 0b e9 71 fd ff ff 48 c7 c1 28 22 53 8e 80 e1 07 80 c1 03 38 c1
RSP: 0018:ffffc9000663f660 EFLAGS: 00010296
RAX: f138414b6529d400 RBX: ffffffff8aebc6e0 RCX: 0000000000040000
RDX: ffffc90003cb1000 RSI: 000000000003ffff RDI: 0000000000040000
RBP: ffffc9000663f730 R08: ffffffff8152ac2e R09: fffff52000cc7e45
R10: 0000000000000000 R11: dffffc0000000001 R12: 0000000000000000
R13: ffff888081e3b5b8 R14: 1ffff92000cc7ed4 R15: dffffc0000000000
FS: 00007fa386d79700(0000) GS:ffff8880b9900000(0000) knlGS:0000000000000000
CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 0000555555c72848 CR3: 000000007b92e000 CR4: 00000000003506e0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
Call Trace:
<TASK>
inode_unlock include/linux/fs.h:761 [inline]
ext4_rename fs/ext4/namei.c:4029 [inline]
ext4_rename2+0x3dfc/0x4450 fs/ext4/namei.c:4202
vfs_rename+0xd8f/0x1190 fs/namei.c:4779
do_renameat2+0xb97/0x13b0 fs/namei.c:4930
__do_sys_rename fs/namei.c:4976 [inline]
__se_sys_rename fs/namei.c:4974 [inline]
__x64_sys_rename+0x82/0x90 fs/namei.c:4974
do_syscall_x64 arch/x86/entry/common.c:50 [inline]
do_syscall_64+0x3d/0xb0 arch/x86/entry/common.c:80
entry_SYSCALL_64_after_hwframe+0x63/0xcd
RIP: 0033:0x7fa38608c0f9
Code: 28 00 00 00 75 05 48 83 c4 28 c3 e8 f1 19 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:00007fa386d79168 EFLAGS: 00000246 ORIG_RAX: 0000000000000052
RAX: ffffffffffffffda RBX: 00007fa3861abf80 RCX: 00007fa38608c0f9
RDX: 0000000000000000 RSI: 00000000200002c0 RDI: 0000000020000000
RBP: 00007fa3860e7b39 R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000
R13: 00007ffc8f32f63f R14: 00007fa386d79300 R15: 0000000000022000
</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 syzk...@googlegroups.com.

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

syzbot

ungelesen,
18.03.2023, 23:45:4518.03.23
an syzkaller...@googlegroups.com
Hello,

syzbot found the following issue on:

HEAD commit: 8020ae3c051d Linux 5.15.103
git tree: linux-5.15.y
console output: https://syzkaller.appspot.com/x/log.txt?x=10f3781cc80000
kernel config: https://syzkaller.appspot.com/x/.config?x=f95b212e0ccdd4d1
dashboard link: https://syzkaller.appspot.com/bug?extid=9e83328b70294112a149
compiler: Debian clang version 15.0.7, GNU ld (GNU Binutils for Debian) 2.35.2
userspace arch: arm64

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

Downloadable assets:
disk image: https://storage.googleapis.com/syzbot-assets/6153dfa8dcc0/disk-8020ae3c.raw.xz
vmlinux: https://storage.googleapis.com/syzbot-assets/2093d52db59f/vmlinux-8020ae3c.xz
kernel image: https://storage.googleapis.com/syzbot-assets/85041d0bd356/Image-8020ae3c.gz.xz

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

=====================================
WARNING: bad unlock balance detected!
5.15.103-syzkaller #0 Not tainted
-------------------------------------
syz-executor.1/9497 is trying to release lock (&type->i_mutex_dir_key) at:
[<ffff800008dff3f8>] inode_unlock include/linux/fs.h:792 [inline]
[<ffff800008dff3f8>] ext4_rename fs/ext4/namei.c:4036 [inline]
[<ffff800008dff3f8>] ext4_rename2+0x2e18/0x3440 fs/ext4/namei.c:4209
but there are no more locks to release!

other info that might help us debug this:
2 locks held by syz-executor.1/9497:
#0: ffff0000d9bfc460 (sb_writers#3){.+.+}-{0:0}, at: mnt_want_write+0x44/0x9c fs/namespace.c:377
#1: ffff00011d62c9b8 (&type->i_mutex_dir_key#3/1){+.+.}-{3:3}, at: inode_lock_nested include/linux/fs.h:822 [inline]
#1: ffff00011d62c9b8 (&type->i_mutex_dir_key#3/1){+.+.}-{3:3}, at: lock_rename+0xf0/0x18c fs/namei.c:2967

stack backtrace:
CPU: 0 PID: 9497 Comm: syz-executor.1 Not tainted 5.15.103-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 03/02/2023
Call trace:
dump_backtrace+0x0/0x530 arch/arm64/kernel/stacktrace.c:152
show_stack+0x2c/0x3c arch/arm64/kernel/stacktrace.c:216
__dump_stack lib/dump_stack.c:88 [inline]
dump_stack_lvl+0x108/0x170 lib/dump_stack.c:106
dump_stack+0x1c/0x58 lib/dump_stack.c:113
print_unlock_imbalance_bug+0x250/0x2a4 kernel/locking/lockdep.c:5064
lock_release+0x56c/0xb30 kernel/locking/lockdep.c:5642
up_write+0x98/0x438 kernel/locking/rwsem.c:1593
inode_unlock include/linux/fs.h:792 [inline]
ext4_rename fs/ext4/namei.c:4036 [inline]
ext4_rename2+0x2e18/0x3440 fs/ext4/namei.c:4209
vfs_rename+0x9e0/0xe80 fs/namei.c:4736
do_renameat2+0x980/0x1040 fs/namei.c:4887
__do_sys_renameat2 fs/namei.c:4920 [inline]
__se_sys_renameat2 fs/namei.c:4917 [inline]
__arm64_sys_renameat2+0xe0/0xfc fs/namei.c:4917
__invoke_syscall arch/arm64/kernel/syscall.c:38 [inline]
invoke_syscall+0x98/0x2b8 arch/arm64/kernel/syscall.c:52
el0_svc_common+0x138/0x258 arch/arm64/kernel/syscall.c:142
do_el0_svc+0x58/0x14c arch/arm64/kernel/syscall.c:181
el0_svc+0x7c/0x1f0 arch/arm64/kernel/entry-common.c:596
el0t_64_sync_handler+0x84/0xe4 arch/arm64/kernel/entry-common.c:614
el0t_64_sync+0x1a0/0x1a4 arch/arm64/kernel/entry.S:584
------------[ cut here ]------------
DEBUG_RWSEMS_WARN_ON((rwsem_owner(sem) != current) && !rwsem_test_oflags(sem, RWSEM_NONSPINNABLE)): count = 0x0, magic = 0xffff00011d763558, owner = 0x0, curr 0xffff0001158a9ac0, list empty
WARNING: CPU: 0 PID: 9497 at kernel/locking/rwsem.c:1342 __up_write kernel/locking/rwsem.c:1341 [inline]
WARNING: CPU: 0 PID: 9497 at kernel/locking/rwsem.c:1342 up_write+0x384/0x438 kernel/locking/rwsem.c:1594
Modules linked in:
CPU: 0 PID: 9497 Comm: syz-executor.1 Not tainted 5.15.103-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 03/02/2023
pstate: 60400005 (nZCv daif +PAN -UAO -TCO -DIT -SSBS BTYPE=--)
pc : __up_write kernel/locking/rwsem.c:1341 [inline]
pc : up_write+0x384/0x438 kernel/locking/rwsem.c:1594
lr : __up_write kernel/locking/rwsem.c:1341 [inline]
lr : up_write+0x384/0x438 kernel/locking/rwsem.c:1594
sp : ffff800020a674e0
x29: ffff800020a674f0 x28: ffff800020a67650 x27: dfff800000000000
x26: dfff800000000000 x25: 1fffe00023aec6b8 x24: ffff00011d7635b0
x23: 0000000000000000 x22: 0000000000000000 x21: ffff0001158a9ac0
x20: ffff00011d763558 x19: ffff00011d763558 x18: 1fffe000368fc58e
x17: 1fffe000368fc58e x16: ffff800011a05534 x15: ffff800014a5f960
x14: ffff0001b47e2c80 x13: ffffffffffffffff x12: 0000000000040000
x11: 000000000003ffff x10: ffff80001f899000 x9 : 79e0b15b27dbae00
x8 : 79e0b15b27dbae00 x7 : 0000000000000000 x6 : ffff80000826caac
x5 : 0000000000000000 x4 : 0000000000000000 x3 : ffff80000a9b9e00
x2 : ffff0001b47e2d10 x1 : 0000000100000000 x0 : 00000000000000bd
Call trace:
__up_write kernel/locking/rwsem.c:1341 [inline]
up_write+0x384/0x438 kernel/locking/rwsem.c:1594
inode_unlock include/linux/fs.h:792 [inline]
ext4_rename fs/ext4/namei.c:4036 [inline]
ext4_rename2+0x2e18/0x3440 fs/ext4/namei.c:4209
vfs_rename+0x9e0/0xe80 fs/namei.c:4736
do_renameat2+0x980/0x1040 fs/namei.c:4887
__do_sys_renameat2 fs/namei.c:4920 [inline]
__se_sys_renameat2 fs/namei.c:4917 [inline]
__arm64_sys_renameat2+0xe0/0xfc fs/namei.c:4917
__invoke_syscall arch/arm64/kernel/syscall.c:38 [inline]
invoke_syscall+0x98/0x2b8 arch/arm64/kernel/syscall.c:52
el0_svc_common+0x138/0x258 arch/arm64/kernel/syscall.c:142
do_el0_svc+0x58/0x14c arch/arm64/kernel/syscall.c:181
el0_svc+0x7c/0x1f0 arch/arm64/kernel/entry-common.c:596
el0t_64_sync_handler+0x84/0xe4 arch/arm64/kernel/entry-common.c:614
el0t_64_sync+0x1a0/0x1a4 arch/arm64/kernel/entry.S:584
irq event stamp: 4631
hardirqs last enabled at (4631): [<ffff80000837bfe8>] __call_rcu kernel/rcu/tree.c:3027 [inline]
hardirqs last enabled at (4631): [<ffff80000837bfe8>] call_rcu+0x644/0xb40 kernel/rcu/tree.c:3073
hardirqs last disabled at (4630): [<ffff80000837befc>] __call_rcu kernel/rcu/tree.c:2992 [inline]
hardirqs last disabled at (4630): [<ffff80000837befc>] call_rcu+0x558/0xb40 kernel/rcu/tree.c:3073
softirqs last enabled at (4542): [<ffff800008020e34>] softirq_handle_end kernel/softirq.c:401 [inline]
softirqs last enabled at (4542): [<ffff800008020e34>] __do_softirq+0xcc4/0xf60 kernel/softirq.c:587
softirqs last disabled at (4275): [<ffff8000081b7b48>] do_softirq_own_stack include/asm-generic/softirq_stack.h:10 [inline]
softirqs last disabled at (4275): [<ffff8000081b7b48>] invoke_softirq kernel/softirq.c:439 [inline]
softirqs last disabled at (4275): [<ffff8000081b7b48>] __irq_exit_rcu+0x28c/0x534 kernel/softirq.c:636
---[ end trace f1a6dff738ef4b5c ]---

syzbot

ungelesen,
20.06.2023, 04:44:5220.06.23
an syzkaller...@googlegroups.com
Auto-closing this bug as obsolete.
Crashes did not happen for a while, no reproducer and no activity.

syzbot

ungelesen,
20.06.2023, 05:41:4720.06.23
an syzkaller...@googlegroups.com
Allen antworten
Antwort an Autor
Weiterleiten
0 neue Nachrichten