syzbot


possible deadlock in sys_quotactl_fd

Status: upstream: reported C repro on 2023/04/05 01:50
Bug presence: origin:lts-only
[Documentation on labels]
Reported-by: syzbot+7b346521e7c230ec24e5@syzkaller.appspotmail.com
First crash: 614d, last: 515d
Fix bisection: the issue occurs on the latest tested release (bisect log)
Crash: INFO: rcu detected stall in corrupted (log)
Repro: C syz .config
  
Bug presence (2)
Date Name Commit Repro Result
2023/06/20 linux-6.1.y (ToT) ca87e77a2ef8 C [report] INFO: rcu detected stall in corrupted
2023/06/20 upstream (ToT) 692b7dc87ca6 C Didn't crash
Similar bugs (2)
Kernel Title Repro Cause bisect Fix bisect Count Last Reported Patched Status
upstream possible deadlock in sys_quotactl_fd ext4 C 423 574d 608d 0/28 auto-obsoleted due to no activity on 2023/08/13 08:22
linux-5.15 possible deadlock in sys_quotactl_fd origin:upstream C done 167 565d 615d 3/3 fixed on 2023/06/26 14:47
Fix bisection attempts (2)
Created Duration User Patch Repo Result
2023/09/06 01:41 2h34m fix candidate upstream OK (0) job log
2023/06/16 09:41 54m bisect fix linux-6.1.y OK (0) job log log

Sample crash report:
======================================================
WARNING: possible circular locking dependency detected
6.1.28-syzkaller #0 Not tainted
------------------------------------------------------
syz-executor142/4243 is trying to acquire lock:
ffff0000d817c0e0 (&type->s_umount_key#30){++++}-{3:3}, at: __do_sys_quotactl_fd fs/quota/quota.c:999 [inline]
ffff0000d817c0e0 (&type->s_umount_key#30){++++}-{3:3}, at: __se_sys_quotactl_fd fs/quota/quota.c:972 [inline]
ffff0000d817c0e0 (&type->s_umount_key#30){++++}-{3:3}, at: __arm64_sys_quotactl_fd+0x30c/0x4a4 fs/quota/quota.c:972

but task is already holding lock:
ffff0000d817c460 (sb_writers#3){.+.+}-{0:0}, at: mnt_want_write+0x44/0x9c fs/namespace.c:393

which lock already depends on the new lock.


the existing dependency chain (in reverse order) is:

-> #1 (sb_writers#3){.+.+}-{0:0}:
       percpu_down_read include/linux/percpu-rwsem.h:51 [inline]
       __sb_start_write include/linux/fs.h:1832 [inline]
       sb_start_write include/linux/fs.h:1907 [inline]
       write_mmp_block+0x100/0xb8c fs/ext4/mmp.c:50
       ext4_multi_mount_protect+0x2e0/0x8a4 fs/ext4/mmp.c:349
       __ext4_remount fs/ext4/super.c:6530 [inline]
       ext4_reconfigure+0x218c/0x2934 fs/ext4/super.c:6629
       reconfigure_super+0x328/0x738 fs/super.c:957
       vfs_fsconfig_locked fs/fsopen.c:254 [inline]
       __do_sys_fsconfig fs/fsopen.c:439 [inline]
       __se_sys_fsconfig fs/fsopen.c:314 [inline]
       __arm64_sys_fsconfig+0xa1c/0xd18 fs/fsopen.c:314
       __invoke_syscall arch/arm64/kernel/syscall.c:38 [inline]
       invoke_syscall+0x98/0x2c0 arch/arm64/kernel/syscall.c:52
       el0_svc_common+0x138/0x258 arch/arm64/kernel/syscall.c:142
       do_el0_svc+0x64/0x218 arch/arm64/kernel/syscall.c:206
       el0_svc+0x58/0x168 arch/arm64/kernel/entry-common.c:637
       el0t_64_sync_handler+0x84/0xf0 arch/arm64/kernel/entry-common.c:655
       el0t_64_sync+0x18c/0x190 arch/arm64/kernel/entry.S:581

-> #0 (&type->s_umount_key#30){++++}-{3:3}:
       check_prev_add kernel/locking/lockdep.c:3098 [inline]
       check_prevs_add kernel/locking/lockdep.c:3217 [inline]
       validate_chain kernel/locking/lockdep.c:3832 [inline]
       __lock_acquire+0x3338/0x764c kernel/locking/lockdep.c:5056
       lock_acquire+0x26c/0x7cc kernel/locking/lockdep.c:5669
       down_read+0x5c/0x78 kernel/locking/rwsem.c:1520
       __do_sys_quotactl_fd fs/quota/quota.c:999 [inline]
       __se_sys_quotactl_fd fs/quota/quota.c:972 [inline]
       __arm64_sys_quotactl_fd+0x30c/0x4a4 fs/quota/quota.c:972
       __invoke_syscall arch/arm64/kernel/syscall.c:38 [inline]
       invoke_syscall+0x98/0x2c0 arch/arm64/kernel/syscall.c:52
       el0_svc_common+0x138/0x258 arch/arm64/kernel/syscall.c:142
       do_el0_svc+0x64/0x218 arch/arm64/kernel/syscall.c:206
       el0_svc+0x58/0x168 arch/arm64/kernel/entry-common.c:637
       el0t_64_sync_handler+0x84/0xf0 arch/arm64/kernel/entry-common.c:655
       el0t_64_sync+0x18c/0x190 arch/arm64/kernel/entry.S:581

other info that might help us debug this:

 Possible unsafe locking scenario:

       CPU0                    CPU1
       ----                    ----
  lock(sb_writers#3);
                               lock(&type->s_umount_key#30);
                               lock(sb_writers#3);
  lock(&type->s_umount_key#30);

 *** DEADLOCK ***

1 lock held by syz-executor142/4243:
 #0: ffff0000d817c460 (sb_writers#3){.+.+}-{0:0}, at: mnt_want_write+0x44/0x9c fs/namespace.c:393

stack backtrace:
CPU: 0 PID: 4243 Comm: syz-executor142 Not tainted 6.1.28-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 04/14/2023
Call trace:
 dump_backtrace+0x1c8/0x1f4 arch/arm64/kernel/stacktrace.c:158
 show_stack+0x2c/0x3c arch/arm64/kernel/stacktrace.c:165
 __dump_stack lib/dump_stack.c:88 [inline]
 dump_stack_lvl+0x108/0x170 lib/dump_stack.c:106
 dump_stack+0x1c/0x5c lib/dump_stack.c:113
 print_circular_bug+0x150/0x1b8 kernel/locking/lockdep.c:2056
 check_noncircular+0x2cc/0x378 kernel/locking/lockdep.c:2178
 check_prev_add kernel/locking/lockdep.c:3098 [inline]
 check_prevs_add kernel/locking/lockdep.c:3217 [inline]
 validate_chain kernel/locking/lockdep.c:3832 [inline]
 __lock_acquire+0x3338/0x764c kernel/locking/lockdep.c:5056
 lock_acquire+0x26c/0x7cc kernel/locking/lockdep.c:5669
 down_read+0x5c/0x78 kernel/locking/rwsem.c:1520
 __do_sys_quotactl_fd fs/quota/quota.c:999 [inline]
 __se_sys_quotactl_fd fs/quota/quota.c:972 [inline]
 __arm64_sys_quotactl_fd+0x30c/0x4a4 fs/quota/quota.c:972
 __invoke_syscall arch/arm64/kernel/syscall.c:38 [inline]
 invoke_syscall+0x98/0x2c0 arch/arm64/kernel/syscall.c:52
 el0_svc_common+0x138/0x258 arch/arm64/kernel/syscall.c:142
 do_el0_svc+0x64/0x218 arch/arm64/kernel/syscall.c:206
 el0_svc+0x58/0x168 arch/arm64/kernel/entry-common.c:637
 el0t_64_sync_handler+0x84/0xf0 arch/arm64/kernel/entry-common.c:655
 el0t_64_sync+0x18c/0x190 arch/arm64/kernel/entry.S:581

Crashes (177):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2023/05/13 02:08 linux-6.1.y bf4ad6fa4e53 ecca8a24 .config console log report syz C [disk image] [vmlinux] [kernel image] [mounted in repro] ci2-linux-6-1-kasan-arm64 possible deadlock in sys_quotactl_fd
2023/04/30 14:07 linux-6.1.y ca1c9012c941 62df2017 .config console log report syz C [disk image] [vmlinux] [kernel image] [mounted in repro] ci2-linux-6-1-kasan-arm64 possible deadlock in sys_quotactl_fd
2023/04/30 13:46 linux-6.1.y ca1c9012c941 62df2017 .config console log report syz C [disk image] [vmlinux] [kernel image] [mounted in repro] ci2-linux-6-1-kasan-arm64 possible deadlock in sys_quotactl_fd
2023/04/29 12:04 linux-6.1.y ca1c9012c941 62df2017 .config console log report syz C [disk image] [vmlinux] [kernel image] [mounted in repro] ci2-linux-6-1-kasan-arm64 possible deadlock in sys_quotactl_fd
2023/04/30 17:13 linux-6.1.y ca1c9012c941 62df2017 .config console log report syz C [disk image] [vmlinux] [kernel image] [mounted in repro] ci2-linux-6-1-kasan-arm64 possible deadlock in sys_quotactl_fd
2023/05/17 00:44 linux-6.1.y bf4ad6fa4e53 11c89444 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan possible deadlock in sys_quotactl_fd
2023/05/16 05:16 linux-6.1.y bf4ad6fa4e53 71b00cfb .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan possible deadlock in sys_quotactl_fd
2023/05/15 23:49 linux-6.1.y bf4ad6fa4e53 c4d362e7 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan possible deadlock in sys_quotactl_fd
2023/05/13 17:41 linux-6.1.y bf4ad6fa4e53 2b9ba477 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan possible deadlock in sys_quotactl_fd
2023/05/13 08:09 linux-6.1.y bf4ad6fa4e53 2b9ba477 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan possible deadlock in sys_quotactl_fd
2023/05/11 19:49 linux-6.1.y bf4ad6fa4e53 0fbd49f4 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan possible deadlock in sys_quotactl_fd
2023/05/11 08:26 linux-6.1.y ca48fc16c493 0fbd49f4 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan possible deadlock in sys_quotactl_fd
2023/05/10 20:02 linux-6.1.y ca48fc16c493 14b12a99 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan possible deadlock in sys_quotactl_fd
2023/05/10 00:59 linux-6.1.y ca48fc16c493 30aa2a7e .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan possible deadlock in sys_quotactl_fd
2023/05/09 18:52 linux-6.1.y ca48fc16c493 30aa2a7e .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan possible deadlock in sys_quotactl_fd
2023/05/08 22:30 linux-6.1.y ca48fc16c493 c7a5e2a0 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan possible deadlock in sys_quotactl_fd
2023/05/06 01:43 linux-6.1.y ca48fc16c493 de870ca5 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan possible deadlock in sys_quotactl_fd
2023/05/05 00:52 linux-6.1.y ca48fc16c493 518a39a6 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan possible deadlock in sys_quotactl_fd
2023/07/13 06:52 linux-6.1.y 61fd484b2cf6 86081196 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan-arm64 possible deadlock in sys_quotactl_fd
2023/05/17 09:39 linux-6.1.y bf4ad6fa4e53 eaac4681 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan-arm64 possible deadlock in sys_quotactl_fd
2023/05/16 20:21 linux-6.1.y bf4ad6fa4e53 11c89444 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan-arm64 possible deadlock in sys_quotactl_fd
2023/05/16 16:33 linux-6.1.y bf4ad6fa4e53 11c89444 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan-arm64 possible deadlock in sys_quotactl_fd
2023/05/16 07:16 linux-6.1.y bf4ad6fa4e53 71b00cfb .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan-arm64 possible deadlock in sys_quotactl_fd
2023/05/16 03:08 linux-6.1.y bf4ad6fa4e53 71b00cfb .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan-arm64 possible deadlock in sys_quotactl_fd
2023/05/16 02:22 linux-6.1.y bf4ad6fa4e53 71b00cfb .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan-arm64 possible deadlock in sys_quotactl_fd
2023/05/15 13:00 linux-6.1.y bf4ad6fa4e53 c4d362e7 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan-arm64 possible deadlock in sys_quotactl_fd
2023/05/15 02:17 linux-6.1.y bf4ad6fa4e53 2b9ba477 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan-arm64 possible deadlock in sys_quotactl_fd
2023/05/14 23:52 linux-6.1.y bf4ad6fa4e53 2b9ba477 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan-arm64 possible deadlock in sys_quotactl_fd
2023/05/13 15:09 linux-6.1.y bf4ad6fa4e53 2b9ba477 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan-arm64 possible deadlock in sys_quotactl_fd
2023/05/13 11:43 linux-6.1.y bf4ad6fa4e53 2b9ba477 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan-arm64 possible deadlock in sys_quotactl_fd
2023/05/13 09:52 linux-6.1.y bf4ad6fa4e53 2b9ba477 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan-arm64 possible deadlock in sys_quotactl_fd
2023/05/12 01:52 linux-6.1.y bf4ad6fa4e53 adb9a3cd .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan-arm64 possible deadlock in sys_quotactl_fd
2023/05/11 21:49 linux-6.1.y bf4ad6fa4e53 adb9a3cd .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan-arm64 possible deadlock in sys_quotactl_fd
2023/05/11 11:15 linux-6.1.y ca48fc16c493 0fbd49f4 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan-arm64 possible deadlock in sys_quotactl_fd
2023/05/10 17:00 linux-6.1.y ca48fc16c493 14b12a99 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan-arm64 possible deadlock in sys_quotactl_fd
2023/05/10 11:13 linux-6.1.y ca48fc16c493 14b12a99 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan-arm64 possible deadlock in sys_quotactl_fd
2023/05/10 06:52 linux-6.1.y ca48fc16c493 1964022b .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan-arm64 possible deadlock in sys_quotactl_fd
2023/05/10 05:33 linux-6.1.y ca48fc16c493 1964022b .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan-arm64 possible deadlock in sys_quotactl_fd
2023/05/10 03:39 linux-6.1.y ca48fc16c493 30aa2a7e .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan-arm64 possible deadlock in sys_quotactl_fd
2023/05/09 17:17 linux-6.1.y ca48fc16c493 30aa2a7e .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan-arm64 possible deadlock in sys_quotactl_fd
2023/05/09 12:13 linux-6.1.y ca48fc16c493 30aa2a7e .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan-arm64 possible deadlock in sys_quotactl_fd
2023/05/09 00:15 linux-6.1.y ca48fc16c493 c7a5e2a0 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan-arm64 possible deadlock in sys_quotactl_fd
2023/05/08 21:10 linux-6.1.y ca48fc16c493 c7a5e2a0 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan-arm64 possible deadlock in sys_quotactl_fd
2023/05/06 15:51 linux-6.1.y ca48fc16c493 90c93c40 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan-arm64 possible deadlock in sys_quotactl_fd
2023/05/05 20:17 linux-6.1.y ca48fc16c493 de870ca5 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan-arm64 possible deadlock in sys_quotactl_fd
2023/05/05 17:49 linux-6.1.y ca48fc16c493 de870ca5 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan-arm64 possible deadlock in sys_quotactl_fd
2023/05/04 21:44 linux-6.1.y ca48fc16c493 518a39a6 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan-arm64 possible deadlock in sys_quotactl_fd
2023/05/04 20:38 linux-6.1.y ca48fc16c493 518a39a6 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan-arm64 possible deadlock in sys_quotactl_fd
2023/05/04 15:15 linux-6.1.y ca48fc16c493 518a39a6 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan-arm64 possible deadlock in sys_quotactl_fd
2023/05/04 09:19 linux-6.1.y ca48fc16c493 5b7ff9dd .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan-arm64 possible deadlock in sys_quotactl_fd
2023/05/04 07:32 linux-6.1.y ca48fc16c493 5b7ff9dd .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan-arm64 possible deadlock in sys_quotactl_fd
2023/05/03 18:45 linux-6.1.y ca48fc16c493 b5918830 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan-arm64 possible deadlock in sys_quotactl_fd
2023/05/03 17:11 linux-6.1.y ca48fc16c493 b5918830 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan-arm64 possible deadlock in sys_quotactl_fd
2023/05/03 14:42 linux-6.1.y ca48fc16c493 b5918830 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan-arm64 possible deadlock in sys_quotactl_fd
2023/05/03 04:52 linux-6.1.y ca48fc16c493 48e0a81d .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan-arm64 possible deadlock in sys_quotactl_fd
2023/04/05 01:50 linux-6.1.y 3b29299e5f60 831373d3 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan-arm64 possible deadlock in sys_quotactl_fd
* Struck through repros no longer work on HEAD.