rock: corrupted directory entry. extent=32, offset=2044, size=237 overlayfs: fs on './file0' does not support file handles, falling back to index=off. ====================================================== WARNING: possible circular locking dependency detected 4.14.307-syzkaller #0 Not tainted ------------------------------------------------------ syz-executor.2/11330 is trying to acquire lock: (sb_writers#3){.+.+}, at: [] sb_start_write include/linux/fs.h:1551 [inline] (sb_writers#3){.+.+}, at: [] mnt_want_write+0x3a/0xb0 fs/namespace.c:386 but task is already holding lock: (&iint->mutex){+.+.}, at: [] process_measurement+0x270/0xb20 security/integrity/ima/ima_main.c:225 which lock already depends on the new lock. the existing dependency chain (in reverse order) is: -> #1 (&iint->mutex){+.+.}: __mutex_lock_common kernel/locking/mutex.c:756 [inline] __mutex_lock+0xc4/0x1310 kernel/locking/mutex.c:893 process_measurement+0x270/0xb20 security/integrity/ima/ima_main.c:225 do_last fs/namei.c:3435 [inline] path_openat+0x10ad/0x2970 fs/namei.c:3571 do_filp_open+0x179/0x3c0 fs/namei.c:3605 do_sys_open+0x296/0x410 fs/open.c:1081 do_syscall_64+0x1d5/0x640 arch/x86/entry/common.c:292 entry_SYSCALL_64_after_hwframe+0x5e/0xd3 ISO 9660 Extensions: Microsoft Joliet Level 0 -> #0 (sb_writers#3){.+.+}: lock_acquire+0x170/0x3f0 kernel/locking/lockdep.c:3998 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+0x64/0x260 fs/super.c:1342 sb_start_write include/linux/fs.h:1551 [inline] mnt_want_write+0x3a/0xb0 fs/namespace.c:386 ovl_open_maybe_copy_up+0xcf/0x130 fs/overlayfs/inode.c:344 ovl_d_real+0xbc/0x350 fs/overlayfs/super.c:88 d_real include/linux/dcache.h:587 [inline] vfs_open+0x19e/0x220 fs/open.c:882 dentry_open+0xa7/0x210 fs/open.c:905 ima_calc_file_hash+0x51c/0x780 security/integrity/ima/ima_crypto.c:452 ima_collect_measurement+0x39d/0x430 security/integrity/ima/ima_api.c:227 process_measurement+0x78b/0xb20 security/integrity/ima/ima_main.c:264 do_last fs/namei.c:3435 [inline] path_openat+0x10ad/0x2970 fs/namei.c:3571 do_filp_open+0x179/0x3c0 fs/namei.c:3605 do_sys_open+0x296/0x410 fs/open.c:1081 do_syscall_64+0x1d5/0x640 arch/x86/entry/common.c:292 entry_SYSCALL_64_after_hwframe+0x5e/0xd3 other info that might help us debug this: Possible unsafe locking scenario: CPU0 CPU1 ---- ---- lock(&iint->mutex); lock(sb_writers#3); lock(&iint->mutex); lock(sb_writers#3); *** DEADLOCK *** 1 lock held by syz-executor.2/11330: #0: (&iint->mutex){+.+.}, at: [] process_measurement+0x270/0xb20 security/integrity/ima/ima_main.c:225 stack backtrace: CPU: 0 PID: 11330 Comm: syz-executor.2 Not tainted 4.14.307-syzkaller #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 03/02/2023 Call Trace: __dump_stack lib/dump_stack.c:17 [inline] dump_stack+0x1b2/0x281 lib/dump_stack.c:58 print_circular_bug.constprop.0.cold+0x2d7/0x41e kernel/locking/lockdep.c:1258 check_prev_add kernel/locking/lockdep.c:1905 [inline] check_prevs_add kernel/locking/lockdep.c:2022 [inline] validate_chain kernel/locking/lockdep.c:2464 [inline] __lock_acquire+0x2e0e/0x3f20 kernel/locking/lockdep.c:3491 lock_acquire+0x170/0x3f0 kernel/locking/lockdep.c:3998 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+0x64/0x260 fs/super.c:1342 sb_start_write include/linux/fs.h:1551 [inline] mnt_want_write+0x3a/0xb0 fs/namespace.c:386 ovl_open_maybe_copy_up+0xcf/0x130 fs/overlayfs/inode.c:344 ovl_d_real+0xbc/0x350 fs/overlayfs/super.c:88 d_real include/linux/dcache.h:587 [inline] vfs_open+0x19e/0x220 fs/open.c:882 dentry_open+0xa7/0x210 fs/open.c:905 ima_calc_file_hash+0x51c/0x780 security/integrity/ima/ima_crypto.c:452 ima_collect_measurement+0x39d/0x430 security/integrity/ima/ima_api.c:227 process_measurement+0x78b/0xb20 security/integrity/ima/ima_main.c:264 do_last fs/namei.c:3435 [inline] path_openat+0x10ad/0x2970 fs/namei.c:3571 do_filp_open+0x179/0x3c0 fs/namei.c:3605 do_sys_open+0x296/0x410 fs/open.c:1081 do_syscall_64+0x1d5/0x640 arch/x86/entry/common.c:292 entry_SYSCALL_64_after_hwframe+0x5e/0xd3 RIP: 0033:0x7fb0d84f00f9 RSP: 002b:00007fb0d6a62168 EFLAGS: 00000246 ORIG_RAX: 0000000000000002 RAX: ffffffffffffffda RBX: 00007fb0d860ff80 RCX: 00007fb0d84f00f9 RDX: 0000000000000000 RSI: 0000000000000007 RDI: 0000000020000100 RBP: 00007fb0d854bae9 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000 R13: 00007fff61900a5f R14: 00007fb0d6a62300 R15: 0000000000022000 rock: corrupted directory entry. extent=32, offset=2044, size=237 syz-executor.2 (11330) used greatest stack depth: 24264 bytes left overlayfs: fs on './file0' does not support file handles, falling back to index=off. ISOFS: Interleaved files not (yet) supported. ISOFS: File unit size != 0 for ISO file (1856). ISO 9660 Extensions: Microsoft Joliet Level 0 EXT4-fs (loop0): mounted filesystem without journal. Opts: ,errors=continue rock: corrupted directory entry. extent=32, offset=2044, size=237 overlayfs: fs on './file0' does not support file handles, falling back to index=off. ISOFS: Interleaved files not (yet) supported. ISOFS: File unit size != 0 for ISO file (1856). EXT4-fs (loop0): mounted filesystem without journal. Opts: ,errors=continue EXT4-fs (loop0): mounted filesystem without journal. Opts: ,errors=continue EXT4-fs (loop0): mounted filesystem without journal. Opts: ,errors=continue capability: warning: `syz-executor.5' uses 32-bit capabilities (legacy support in use) EXT4-fs (loop3): mounted filesystem without journal. Opts: ,errors=continue UDF-fs: error (device loop5): udf_process_sequence: Block 100 of volume descriptor sequence is corrupted or we could not read it UDF-fs: error (device loop5): udf_process_sequence: Block 1987 of volume descriptor sequence is corrupted or we could not read it UDF-fs: Scanning with blocksize 512 failed UDF-fs: warning (device loop5): udf_load_vrs: No anchor found UDF-fs: Scanning with blocksize 1024 failed UDF-fs: error (device loop5): udf_read_tagged: read failed, block=512, location=512 UDF-fs: warning (device loop5): udf_load_vrs: No anchor found UDF-fs: Scanning with blocksize 2048 failed UDF-fs: warning (device loop5): udf_load_vrs: No VRS found UDF-fs: Scanning with blocksize 4096 failed bridge_slave_0: FDB only supports static addresses bridge_slave_0: FDB only supports static addresses bridge_slave_0: FDB only supports static addresses bridge_slave_0: FDB only supports static addresses bridge_slave_0: FDB only supports static addresses bridge_slave_0: FDB only supports static addresses unregister_netdevice: waiting for ip6gre0 to become free. Usage count = -1 bridge_slave_0: FDB only supports static addresses netlink: 4 bytes leftover after parsing attributes in process `syz-executor.1'. Zero length message leads to an empty skb