audit: type=1804 audit(1597605185.581:154): pid=16333 uid=0 auid=0 ses=4 subj=system_u:system_r:kernel_t:s0 op=invalid_pcr cause=open_writers comm="syz-executor.1" name="/root/syzkaller-testdir099535524/syzkaller.Gy6fUE/189/bus/file0" dev="overlay" ino=16608 res=1 ********************************************************** ====================================================== WARNING: possible circular locking dependency detected 4.19.139-syzkaller #0 Not tainted ------------------------------------------------------ syz-executor.1/16339 is trying to acquire lock: 00000000fb7cdf55 (&ovl_i_mutex_key[depth]){+.+.}, at: inode_lock include/linux/fs.h:748 [inline] 00000000fb7cdf55 (&ovl_i_mutex_key[depth]){+.+.}, at: ovl_write_iter+0x148/0xb40 fs/overlayfs/file.c:270 but task is already holding lock: ** NOTICE NOTICE NOTICE NOTICE NOTICE NOTICE NOTICE ** 00000000fc8b2c1c (&pipe->mutex/1){+.+.}, at: pipe_lock_nested fs/pipe.c:62 [inline] 00000000fc8b2c1c (&pipe->mutex/1){+.+.}, at: pipe_lock+0x63/0x80 fs/pipe.c:70 which lock already depends on the new lock. the existing dependency chain (in reverse order) is: -> #2 (&pipe->mutex/1){+.+.}: pipe_lock_nested fs/pipe.c:62 [inline] pipe_lock+0x63/0x80 fs/pipe.c:70 iter_file_splice_write+0x183/0xbb0 fs/splice.c:700 do_splice_from fs/splice.c:852 [inline] do_splice fs/splice.c:1154 [inline] __do_sys_splice fs/splice.c:1428 [inline] __se_sys_splice+0xfe7/0x16d0 fs/splice.c:1408 do_syscall_64+0xf9/0x620 arch/x86/entry/common.c:293 ** ** entry_SYSCALL_64_after_hwframe+0x49/0xbe -> #1 (sb_writers#3){.+.+}: sb_start_write include/linux/fs.h:1579 [inline] mnt_want_write+0x3a/0xb0 fs/namespace.c:360 ovl_setattr+0xdd/0x920 fs/overlayfs/inode.c:30 notify_change+0x70b/0xfc0 fs/attr.c:334 do_truncate+0x134/0x1f0 fs/open.c:63 handle_truncate fs/namei.c:3009 [inline] do_last fs/namei.c:3427 [inline] path_openat+0x2308/0x2df0 fs/namei.c:3537 ** trace_printk() being used. Allocating extra memory. ** 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 (&ovl_i_mutex_key[depth]){+.+.}: down_write+0x34/0x90 kernel/locking/rwsem.c:70 inode_lock include/linux/fs.h:748 [inline] ovl_write_iter+0x148/0xb40 fs/overlayfs/file.c:270 ** ** call_write_iter include/linux/fs.h:1821 [inline] new_sync_write fs/read_write.c:474 [inline] __vfs_write+0x51b/0x770 fs/read_write.c:487 __kernel_write+0x109/0x370 fs/read_write.c:506 write_pipe_buf+0x153/0x1f0 fs/splice.c:798 splice_from_pipe_feed fs/splice.c:503 [inline] __splice_from_pipe+0x389/0x800 fs/splice.c:627 ** This means that this is a DEBUG kernel and it is ** splice_from_pipe fs/splice.c:662 [inline] default_file_splice_write+0xd8/0x180 fs/splice.c:810 do_splice_from fs/splice.c:852 [inline] do_splice fs/splice.c:1154 [inline] __do_sys_splice fs/splice.c:1428 [inline] __se_sys_splice+0xfe7/0x16d0 fs/splice.c:1408 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: Chain exists of: &ovl_i_mutex_key[depth] --> sb_writers#3 --> &pipe->mutex/1 Possible unsafe locking scenario: ** unsafe for production use. ** CPU0 CPU1 ---- ---- lock(&pipe->mutex/1); lock(sb_writers#3); lock(&pipe->mutex/1); lock(&ovl_i_mutex_key[depth]); *** DEADLOCK *** 2 locks held by syz-executor.1/16339: #0: 0000000023eae176 (sb_writers#16){.+.+}, at: file_start_write include/linux/fs.h:2776 [inline] #0: 0000000023eae176 (sb_writers#16){.+.+}, at: do_splice fs/splice.c:1153 [inline] #0: 0000000023eae176 (sb_writers#16){.+.+}, at: __do_sys_splice fs/splice.c:1428 [inline] #0: 0000000023eae176 (sb_writers#16){.+.+}, at: __se_sys_splice+0x11de/0x16d0 fs/splice.c:1408 #1: 00000000fc8b2c1c (&pipe->mutex/1){+.+.}, at: pipe_lock_nested fs/pipe.c:62 [inline] #1: 00000000fc8b2c1c (&pipe->mutex/1){+.+.}, at: pipe_lock+0x63/0x80 fs/pipe.c:70 stack backtrace: CPU: 1 PID: 16339 Comm: syz-executor.1 Not tainted 4.19.139-syzkaller #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 Call Trace: __dump_stack lib/dump_stack.c:77 [inline] dump_stack+0x1fc/0x2fe lib/dump_stack.c:118 print_circular_bug.constprop.0.cold+0x2d7/0x41e kernel/locking/lockdep.c:1221 check_prev_add kernel/locking/lockdep.c:1865 [inline] check_prevs_add kernel/locking/lockdep.c:1978 [inline] validate_chain kernel/locking/lockdep.c:2419 [inline] __lock_acquire+0x30c9/0x3ff0 kernel/locking/lockdep.c:3415 lock_acquire+0x170/0x3c0 kernel/locking/lockdep.c:3907 down_write+0x34/0x90 kernel/locking/rwsem.c:70 inode_lock include/linux/fs.h:748 [inline] ovl_write_iter+0x148/0xb40 fs/overlayfs/file.c:270 call_write_iter include/linux/fs.h:1821 [inline] new_sync_write fs/read_write.c:474 [inline] __vfs_write+0x51b/0x770 fs/read_write.c:487 __kernel_write+0x109/0x370 fs/read_write.c:506 write_pipe_buf+0x153/0x1f0 fs/splice.c:798 splice_from_pipe_feed fs/splice.c:503 [inline] __splice_from_pipe+0x389/0x800 fs/splice.c:627 splice_from_pipe fs/splice.c:662 [inline] default_file_splice_write+0xd8/0x180 fs/splice.c:810 do_splice_from fs/splice.c:852 [inline] do_splice fs/splice.c:1154 [inline] __do_sys_splice fs/splice.c:1428 [inline] __se_sys_splice+0xfe7/0x16d0 fs/splice.c:1408 do_syscall_64+0xf9/0x620 arch/x86/entry/common.c:293 entry_SYSCALL_64_after_hwframe+0x49/0xbe RIP: 0033:0x45d239 Code: 5d b4 fb ff c3 66 2e 0f 1f 84 00 00 00 00 00 66 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 0f 83 2b b4 fb ff c3 66 2e 0f 1f 84 00 00 00 00 RSP: 002b:00007f913e8adc78 EFLAGS: 00000246 ORIG_RAX: 0000000000000113 RAX: ffffffffffffffda RBX: 0000000000032bc0 RCX: 000000000045d239 RDX: 0000000000000005 RSI: 0000000000000000 RDI: 0000000000000003 RBP: 000000000118d038 R08: 0000000000019404 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 000000000118cfec R13: 00007fff30390d9f R14: 00007f913e8ae9c0 R15: 000000000118cfec netlink: 8 bytes leftover after parsing attributes in process `syz-executor.0'. (syz-executor.5,16329,1):ocfs2_parse_options:1499 ERROR: Unrecognized mount option "GPL" or missing value (syz-executor.5,16329,1):ocfs2_fill_super:1225 ERROR: status = -22 ** ** netlink: 24 bytes leftover after parsing attributes in process `syz-executor.0'. ** If you see this message and you are not debugging ** ** the kernel, report this immediately to your vendor! ** ** ** overlayfs: './file0' not a directory ** NOTICE NOTICE NOTICE NOTICE NOTICE NOTICE NOTICE ** ********************************************************** ldm_parse_privhead(): Cannot find PRIVHEAD structure. LDM database is corrupt. Aborting. ldm_validate_privheads(): Cannot find PRIVHEAD 1. loop3: p2 < > netlink: 'syz-executor.4': attribute type 1 has an invalid length. ntfs: (device loop5): parse_options(): Unrecognized mount option . SELinux: unrecognized netlink message: protocol=0 nlmsg_type=43 sclass=netlink_route_socket pid=16392 comm=syz-executor.4 SELinux: Context system_u:object_r:systemd_logind_sessions_t:s0 is not valid (left unmapped). audit: type=1400 audit(1597605186.801:155): avc: denied { associate } for pid=16388 comm="syz-executor.4" name="vhost-net" dev="devtmpfs" ino=1713 scontext=system_u:object_r:unlabeled_t:s0 tcontext=system_u:object_r:device_t:s0 tclass=filesystem permissive=1 netlink: 'syz-executor.4': attribute type 1 has an invalid length. SELinux: unrecognized netlink message: protocol=0 nlmsg_type=43 sclass=netlink_route_socket pid=16392 comm=syz-executor.4 ldm_parse_privhead(): Cannot find PRIVHEAD structure. LDM database is corrupt. Aborting. ntfs: (device loop5): parse_options(): Unrecognized mount option . ldm_validate_privheads(): Cannot find PRIVHEAD 1. loop3: p2 < > ntfs: (device loop5): parse_options(): Unrecognized mount option . ldm_parse_privhead(): Cannot find PRIVHEAD structure. LDM database is corrupt. Aborting. ldm_validate_privheads(): Cannot find PRIVHEAD 1. loop3: p2 < > ntfs: (device loop5): parse_options(): Unrecognized mount option . ldm_parse_privhead(): Cannot find PRIVHEAD structure. LDM database is corrupt. Aborting. ldm_validate_privheads(): Cannot find PRIVHEAD 1. loop3: p2 < > ntfs: (device loop5): parse_options(): Unrecognized mount option . ldm_parse_privhead(): Cannot find PRIVHEAD structure. LDM database is corrupt. Aborting. ldm_validate_privheads(): Cannot find PRIVHEAD 1. loop3: p2 < > ntfs: (device loop5): parse_options(): Unrecognized mount option . ldm_parse_privhead(): Cannot find PRIVHEAD structure. LDM database is corrupt. Aborting. ldm_validate_privheads(): Cannot find PRIVHEAD 1. loop3: p2 < > ldm_parse_privhead(): Cannot find PRIVHEAD structure. LDM database is corrupt. Aborting. ldm_validate_privheads(): Cannot find PRIVHEAD 1. loop3: p2 < > gfs2: invalid mount option: hostdata= gfs2: can't parse mount arguments ntfs: (device loop5): parse_options(): Unrecognized mount option ÿÿ0xffffffffffffffff. gfs2: invalid mount option: hostdata= gfs2: can't parse mount arguments gfs2: invalid mount option: hostdata= gfs2: can't parse mount arguments gfs2: invalid mount option: hostdata= gfs2: can't parse mount arguments gfs2: invalid mount option: hostdata= gfs2: can't parse mount arguments gfs2: invalid mount option: hostdata= gfs2: can't parse mount arguments ldm_parse_privhead(): Cannot find PRIVHEAD structure. LDM database is corrupt. Aborting. ldm_validate_privheads(): Cannot find PRIVHEAD 1. loop3: p2 < > gfs2: invalid mount option: hostdata= gfs2: can't parse mount arguments ldm_parse_privhead(): Cannot find PRIVHEAD structure. LDM database is corrupt. Aborting. gfs2: invalid mount option: hostdata= gfs2: can't parse mount arguments ldm_validate_privheads(): Cannot find PRIVHEAD 1. loop3: p2 < > gfs2: invalid mount option: hostdata= gfs2: can't parse mount arguments ldm_parse_privhead(): Cannot find PRIVHEAD structure. LDM database is corrupt. Aborting. ldm_validate_privheads(): Cannot find PRIVHEAD 1. loop3: p2 < > ldm_parse_privhead(): Cannot find PRIVHEAD structure. LDM database is corrupt. Aborting. ldm_validate_privheads(): Cannot find PRIVHEAD 1. loop3: p2 < > ldm_parse_privhead(): Cannot find PRIVHEAD structure. LDM database is corrupt. Aborting. ldm_validate_privheads(): Cannot find PRIVHEAD 1. loop3: p2 < > gfs2: invalid mount option: hostdata= gfs2: can't parse mount arguments ldm_parse_privhead(): Cannot find PRIVHEAD structure. LDM database is corrupt. Aborting. ldm_validate_privheads(): Cannot find PRIVHEAD 1. loop3: p2 < > gfs2: invalid mount option: hostdata= gfs2: can't parse mount arguments ldm_parse_privhead(): Cannot find PRIVHEAD structure. LDM database is corrupt. Aborting. ldm_validate_privheads(): Cannot find PRIVHEAD 1. loop3: p2 < > gfs2: invalid mount option: hostdata= gfs2: can't parse mount arguments ldm_parse_privhead(): Cannot find PRIVHEAD structure. LDM database is corrupt. Aborting. ldm_validate_privheads(): Cannot find PRIVHEAD 1. loop3: p2 < > gfs2: invalid mount option: hostdata= gfs2: can't parse mount arguments ldm_parse_privhead(): Cannot find PRIVHEAD structure. LDM database is corrupt. Aborting. ldm_validate_privheads(): Cannot find PRIVHEAD 1. gfs2: invalid mount option: hostdata= gfs2: can't parse mount arguments loop3: p2 < > ldm_parse_privhead(): Cannot find PRIVHEAD structure. LDM database is corrupt. Aborting. gfs2: invalid mount option: hostdata= ldm_validate_privheads(): Cannot find PRIVHEAD 1. gfs2: can't parse mount arguments loop3: p2 < > ldm_parse_privhead(): Cannot find PRIVHEAD structure. LDM database is corrupt. Aborting. ldm_validate_privheads(): Cannot find PRIVHEAD 1. loop3: p2 < > ldm_parse_privhead(): Cannot find PRIVHEAD structure. LDM database is corrupt. Aborting. ldm_validate_privheads(): Cannot find PRIVHEAD 1. loop3: p2 < > ldm_parse_privhead(): Cannot find PRIVHEAD structure. LDM database is corrupt. Aborting. ldm_validate_privheads(): Cannot find PRIVHEAD 1. loop3: p2 < > netlink: 24 bytes leftover after parsing attributes in process `syz-executor.4'. netlink: 24 bytes leftover after parsing attributes in process `syz-executor.4'. ldm_parse_privhead(): Cannot find PRIVHEAD structure. LDM database is corrupt. Aborting. ldm_validate_privheads(): Cannot find PRIVHEAD 1. loop3: p2 < > ldm_parse_privhead(): Cannot find PRIVHEAD structure. LDM database is corrupt. Aborting. ldm_validate_privheads(): Cannot find PRIVHEAD 1. loop3: p2 < > ldm_parse_privhead(): Cannot find PRIVHEAD structure. LDM database is corrupt. Aborting. ldm_validate_privheads(): Cannot find PRIVHEAD 1. loop3: p2 < > ldm_parse_privhead(): Cannot find PRIVHEAD structure. LDM database is corrupt. Aborting. ldm_validate_privheads(): Cannot find PRIVHEAD 1. loop3: p2 < > ldm_parse_privhead(): Cannot find PRIVHEAD structure. LDM database is corrupt. Aborting. ldm_validate_privheads(): Cannot find PRIVHEAD 1. loop3: p2 < > netlink: 'syz-executor.4': attribute type 1 has an invalid length. ldm_parse_privhead(): Cannot find PRIVHEAD structure. LDM database is corrupt. Aborting. ldm_validate_privheads(): Cannot find PRIVHEAD 1. loop3: p2 < >