XFS (loop3): Mounting V4 Filesystem XFS (loop3): Ending clean mount ====================================================== WARNING: possible circular locking dependency detected 4.19.211-syzkaller #0 Not tainted ------------------------------------------------------ syz-executor.3/22901 is trying to acquire lock: 00000000ef54a1f8 (sb_writers#15){.+.+}, at: sb_start_write include/linux/fs.h:1579 [inline] 00000000ef54a1f8 (sb_writers#15){.+.+}, at: mnt_want_write+0x3a/0xb0 fs/namespace.c:360 but task is already holding lock: 000000005f2b376b (&iint->mutex){+.+.}, at: process_measurement+0x316/0x1440 security/integrity/ima/ima_main.c:224 which lock already depends on the new lock. the existing dependency chain (in reverse order) is: -> #1 (&iint->mutex){+.+.}: process_measurement+0x316/0x1440 security/integrity/ima/ima_main.c:224 ima_file_check+0xb9/0x100 security/integrity/ima/ima_main.c:391 do_last fs/namei.c:3425 [inline] path_openat+0x7e4/0x2df0 fs/namei.c:3537 do_filp_open+0x18c/0x3f0 fs/namei.c:3567 do_sys_open+0x3b3/0x520 fs/open.c:1085 do_syscall_64+0xf9/0x620 arch/x86/entry/common.c:293 entry_SYSCALL_64_after_hwframe+0x49/0xbe -> #0 (sb_writers#15){.+.+}: percpu_down_read_preempt_disable include/linux/percpu-rwsem.h:36 [inline] percpu_down_read include/linux/percpu-rwsem.h:59 [inline] __sb_start_write+0x6e/0x2a0 fs/super.c:1366 sb_start_write include/linux/fs.h:1579 [inline] mnt_want_write+0x3a/0xb0 fs/namespace.c:360 ovl_maybe_copy_up+0x11f/0x190 fs/overlayfs/copy_up.c:888 ovl_open+0xb4/0x260 fs/overlayfs/file.c:126 do_dentry_open+0x4aa/0x1160 fs/open.c:796 vfs_open fs/open.c:902 [inline] dentry_open+0x132/0x1d0 fs/open.c:918 ima_calc_file_hash+0x628/0x8a0 security/integrity/ima/ima_crypto.c:435 ima_collect_measurement+0x4c4/0x570 security/integrity/ima/ima_api.c:231 process_measurement+0xddd/0x1440 security/integrity/ima/ima_main.c:284 ima_file_check+0xb9/0x100 security/integrity/ima/ima_main.c:391 do_last fs/namei.c:3425 [inline] path_openat+0x7e4/0x2df0 fs/namei.c:3537 do_filp_open+0x18c/0x3f0 fs/namei.c:3567 do_sys_open+0x3b3/0x520 fs/open.c:1085 do_syscall_64+0xf9/0x620 arch/x86/entry/common.c:293 entry_SYSCALL_64_after_hwframe+0x49/0xbe other info that might help us debug this: Possible unsafe locking scenario: CPU0 CPU1 ---- ---- lock(&iint->mutex); lock(sb_writers#15); lock(&iint->mutex); lock(sb_writers#15); *** DEADLOCK *** 1 lock held by syz-executor.3/22901: #0: 000000005f2b376b (&iint->mutex){+.+.}, at: process_measurement+0x316/0x1440 security/integrity/ima/ima_main.c:224 stack backtrace: CPU: 0 PID: 22901 Comm: syz-executor.3 Not tainted 4.19.211-syzkaller #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/12/2023 Call Trace: __dump_stack lib/dump_stack.c:77 [inline] dump_stack+0x1fc/0x2ef lib/dump_stack.c:118 print_circular_bug.constprop.0.cold+0x2d7/0x41e kernel/locking/lockdep.c:1222 check_prev_add kernel/locking/lockdep.c:1866 [inline] check_prevs_add kernel/locking/lockdep.c:1979 [inline] validate_chain kernel/locking/lockdep.c:2420 [inline] __lock_acquire+0x30c9/0x3ff0 kernel/locking/lockdep.c:3416 lock_acquire+0x170/0x3c0 kernel/locking/lockdep.c:3908 percpu_down_read_preempt_disable include/linux/percpu-rwsem.h:36 [inline] percpu_down_read include/linux/percpu-rwsem.h:59 [inline] __sb_start_write+0x6e/0x2a0 fs/super.c:1366 sb_start_write include/linux/fs.h:1579 [inline] mnt_want_write+0x3a/0xb0 fs/namespace.c:360 ovl_maybe_copy_up+0x11f/0x190 fs/overlayfs/copy_up.c:888 ovl_open+0xb4/0x260 fs/overlayfs/file.c:126 do_dentry_open+0x4aa/0x1160 fs/open.c:796 vfs_open fs/open.c:902 [inline] dentry_open+0x132/0x1d0 fs/open.c:918 ima_calc_file_hash+0x628/0x8a0 security/integrity/ima/ima_crypto.c:435 ima_collect_measurement+0x4c4/0x570 security/integrity/ima/ima_api.c:231 process_measurement+0xddd/0x1440 security/integrity/ima/ima_main.c:284 ima_file_check+0xb9/0x100 security/integrity/ima/ima_main.c:391 do_last fs/namei.c:3425 [inline] path_openat+0x7e4/0x2df0 fs/namei.c:3537 do_filp_open+0x18c/0x3f0 fs/namei.c:3567 do_sys_open+0x3b3/0x520 fs/open.c:1085 do_syscall_64+0xf9/0x620 arch/x86/entry/common.c:293 entry_SYSCALL_64_after_hwframe+0x49/0xbe RIP: 0033:0x7f239de530f9 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:00007f239c3c5168 EFLAGS: 00000246 ORIG_RAX: 0000000000000002 RAX: ffffffffffffffda RBX: 00007f239df72f80 RCX: 00007f239de530f9 RDX: 0000000000000000 RSI: 0000000000000003 RDI: 0000000020000200 RBP: 00007f239deaeae9 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000 R13: 00007ffc538c9c8f R14: 00007f239c3c5300 R15: 0000000000022000 XFS (loop3): Unmounting Filesystem IPVS: ftp: loaded support on port[0] = 21 Started in network mode Own node identity 9, cluster identity 4711 32-bit node address hash set to 9 Left network mode IPVS: ftp: loaded support on port[0] = 21 XFS (loop3): Mounting V4 Filesystem XFS (loop3): Ending clean mount XFS (loop3): Unmounting Filesystem Started in network mode Own node identity 9, cluster identity 4711 32-bit node address hash set to 9 IPVS: ftp: loaded support on port[0] = 21 XFS (loop3): Mounting V4 Filesystem XFS (loop3): Ending clean mount XFS (loop3): Unmounting Filesystem IPVS: ftp: loaded support on port[0] = 21 Started in network mode Own node identity 9, cluster identity 4711 32-bit node address hash set to 9 XFS (loop3): Mounting V4 Filesystem XFS (loop3): Ending clean mount XFS (loop3): Unmounting Filesystem Left network mode IPVS: ftp: loaded support on port[0] = 21 Started in network mode Own node identity 9, cluster identity 4711 32-bit node address hash set to 9 XFS (loop3): Mounting V4 Filesystem XFS (loop3): Ending clean mount XFS (loop3): Unmounting Filesystem IPVS: ftp: loaded support on port[0] = 21 FAULT_INJECTION: forcing a failure. name failslab, interval 1, probability 0, space 0, times 0 CPU: 0 PID: 23365 Comm: syz-executor.2 Not tainted 4.19.211-syzkaller #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/12/2023 Call Trace: __dump_stack lib/dump_stack.c:77 [inline] dump_stack+0x1fc/0x2ef lib/dump_stack.c:118 fail_dump lib/fault-inject.c:51 [inline] should_fail.cold+0xa/0xf lib/fault-inject.c:149 __should_failslab+0x115/0x180 mm/failslab.c:32 should_failslab+0x5/0x10 mm/slab_common.c:1590 slab_pre_alloc_hook mm/slab.h:424 [inline] slab_alloc mm/slab.c:3383 [inline] __do_kmalloc mm/slab.c:3725 [inline] __kmalloc+0x2ab/0x3c0 mm/slab.c:3736 kmalloc_array include/linux/slab.h:637 [inline] rw_copy_check_uvector+0x2ca/0x340 fs/read_write.c:782 import_iovec+0xa6/0x3a0 lib/iov_iter.c:1541 vfs_readv+0xbb/0x150 fs/read_write.c:985 do_preadv fs/read_write.c:1071 [inline] __do_sys_preadv fs/read_write.c:1121 [inline] __se_sys_preadv fs/read_write.c:1116 [inline] __x64_sys_preadv+0x22b/0x310 fs/read_write.c:1116 do_syscall_64+0xf9/0x620 arch/x86/entry/common.c:293 entry_SYSCALL_64_after_hwframe+0x49/0xbe RIP: 0033:0x7fb76fa2a0f9 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:00007fb76df9c168 EFLAGS: 00000246 ORIG_RAX: 0000000000000127 RAX: ffffffffffffffda RBX: 00007fb76fb49f80 RCX: 00007fb76fa2a0f9 RDX: 0000000000000199 RSI: 00000000200017c0 RDI: 0000000000000004 RBP: 00007fb76df9c1d0 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000001 R13: 00007ffe1d48749f R14: 00007fb76df9c300 R15: 0000000000022000 Left network mode FAULT_INJECTION: forcing a failure. name failslab, interval 1, probability 0, space 0, times 0 CPU: 0 PID: 23422 Comm: syz-executor.2 Not tainted 4.19.211-syzkaller #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/12/2023 Call Trace: __dump_stack lib/dump_stack.c:77 [inline] dump_stack+0x1fc/0x2ef lib/dump_stack.c:118 fail_dump lib/fault-inject.c:51 [inline] should_fail.cold+0xa/0xf lib/fault-inject.c:149 __should_failslab+0x115/0x180 mm/failslab.c:32 should_failslab+0x5/0x10 mm/slab_common.c:1590 slab_pre_alloc_hook mm/slab.h:424 [inline] slab_alloc_node mm/slab.c:3304 [inline] kmem_cache_alloc_node_trace+0x244/0x3b0 mm/slab.c:3666 __do_kmalloc_node mm/slab.c:3688 [inline] __kmalloc_node+0x38/0x70 mm/slab.c:3696 Started in network mode kmalloc_node include/linux/slab.h:557 [inline] kvmalloc_node+0x61/0xf0 mm/util.c:423 kvmalloc include/linux/mm.h:577 [inline] seq_buf_alloc fs/seq_file.c:35 [inline] seq_read+0x85c/0x11c0 fs/seq_file.c:207 Own node identity 9, cluster identity 4711 32-bit node address hash set to 9 do_loop_readv_writev fs/read_write.c:701 [inline] do_loop_readv_writev fs/read_write.c:688 [inline] do_iter_read+0x471/0x630 fs/read_write.c:925 vfs_readv+0xe5/0x150 fs/read_write.c:987 do_preadv fs/read_write.c:1071 [inline] __do_sys_preadv fs/read_write.c:1121 [inline] __se_sys_preadv fs/read_write.c:1116 [inline] __x64_sys_preadv+0x22b/0x310 fs/read_write.c:1116 do_syscall_64+0xf9/0x620 arch/x86/entry/common.c:293 entry_SYSCALL_64_after_hwframe+0x49/0xbe RIP: 0033:0x7fb76fa2a0f9 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:00007fb76df9c168 EFLAGS: 00000246 ORIG_RAX: 0000000000000127 RAX: ffffffffffffffda RBX: 00007fb76fb49f80 RCX: 00007fb76fa2a0f9 RDX: 0000000000000199 RSI: 00000000200017c0 RDI: 0000000000000004 RBP: 00007fb76df9c1d0 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000001 R13: 00007ffe1d48749f R14: 00007fb76df9c300 R15: 0000000000022000 XFS (loop3): Mounting V4 Filesystem XFS (loop3): Ending clean mount IPVS: ftp: loaded support on port[0] = 21 XFS (loop3): Unmounting Filesystem Started in network mode Own node identity 9, cluster identity 4711 32-bit node address hash set to 9 XFS (loop3): Mounting V4 Filesystem XFS (loop3): Ending clean mount XFS (loop3): Unmounting Filesystem Left network mode Left network mode IPVS: ftp: loaded support on port[0] = 21 Started in network mode Own node identity 9, cluster identity 4711 32-bit node address hash set to 9 XFS (loop3): Mounting V4 Filesystem XFS (loop3): Ending clean mount XFS (loop3): Unmounting Filesystem Left network mode IPVS: ftp: loaded support on port[0] = 21 Started in network mode Own node identity 9, cluster identity 4711 32-bit node address hash set to 9 XFS (loop3): Mounting V4 Filesystem XFS (loop3): Ending clean mount XFS (loop3): Unmounting Filesystem Left network mode IPVS: ftp: loaded support on port[0] = 21 Started in network mode Own node identity 9, cluster identity 4711 32-bit node address hash set to 9 XFS (loop3): Mounting V4 Filesystem XFS (loop3): Ending clean mount XFS (loop3): Unmounting Filesystem Left network mode ieee802154 phy0 wpan0: encryption failed: -22 ieee802154 phy1 wpan1: encryption failed: -22 IPVS: ftp: loaded support on port[0] = 21 Started in network mode Own node identity 9, cluster identity 4711 32-bit node address hash set to 9 XFS (loop3): Mounting V4 Filesystem XFS (loop3): Ending clean mount audit: type=1800 audit(1675790362.764:431): pid=23781 uid=0 auid=4294967295 ses=4294967295 subj==unconfined op=collect_data cause=failed(directio) comm="syz-executor.3" name="file0" dev="overlay" ino=43 res=0 XFS (loop3): Unmounting Filesystem Left network mode