audit: type=1400 audit(1574629714.224:390): avc: denied { create } for pid=12579 comm="syz-executor.5" scontext=unconfined_u:system_r:insmod_t:s0-s0:c0.c1023 tcontext=unconfined_u:system_r:insmod_t:s0-s0:c0.c1023 tclass=netlink_generic_socket permissive=1 ====================================================== [ INFO: possible circular locking dependency detected ] 4.4.174+ #17 Not tainted ------------------------------------------------------- syz-executor.0/12585 is trying to acquire lock: (sel_mutex){+.+.+.}, at: [] sel_read_policy+0x59/0x110 security/selinux/selinuxfs.c:441 but task is already holding lock: (sb_writers#4[ 335.120869] audit: type=1400 audit(1574629714.494:391): avc: denied { create } for pid=12566 comm="syz-executor.0" scontext=unconfined_u:system_r:insmod_t:s0-s0:c0.c1023 tcontext=unconfined_u:system_r:insmod_t:s0-s0:c0.c1023 tclass=netlink_generic_socket permissive=1 audit: type=1400 audit(1574629714.494:392): avc: denied { write } for pid=12566 comm="syz-executor.0" scontext=unconfined_u:system_r:insmod_t:s0-s0:c0.c1023 tcontext=unconfined_u:system_r:insmod_t:s0-s0:c0.c1023 tclass=netlink_generic_socket permissive=1 ){.+.+.+}, at: [] file_start_write include/linux/fs.h:2543 [inline] ){.+.+.+}, at: [] do_sendfile+0x8a6/0xba0 fs/read_write.c:1228 which lock already depends on the new lock. the existing dependency chain (in reverse order) is: [] lock_acquire+0x15e/0x450 kernel/locking/lockdep.c:3592 [] percpu_down_read include/linux/percpu-rwsem.h:26 [inline] [] __sb_start_write+0x1af/0x310 fs/super.c:1239 [] sb_start_write include/linux/fs.h:1517 [inline] [] ext4_run_li_request fs/ext4/super.c:2685 [inline] [] ext4_lazyinit_thread fs/ext4/super.c:2784 [inline] [] ext4_lazyinit_thread+0x1e4/0x7b0 fs/ext4/super.c:2760 [] kthread+0x273/0x310 kernel/kthread.c:211 [] ret_from_fork+0x55/0x80 arch/x86/entry/entry_64.S:537 [] lock_acquire+0x15e/0x450 kernel/locking/lockdep.c:3592 [] __mutex_lock_common kernel/locking/mutex.c:521 [inline] [] mutex_lock_nested+0xc1/0xb80 kernel/locking/mutex.c:621 [] ext4_register_li_request+0x2fd/0x7d0 fs/ext4/super.c:2972 [] ext4_remount+0x1366/0x1b90 fs/ext4/super.c:4922 [] do_remount_sb2+0x41b/0x7a0 fs/super.c:781 [] do_remount fs/namespace.c:2347 [inline] [] do_mount+0xfdb/0x2a40 fs/namespace.c:2860 [] SYSC_mount fs/namespace.c:3063 [inline] [] SyS_mount+0x130/0x1d0 fs/namespace.c:3041 [] entry_SYSCALL_64_fastpath+0x1e/0x9a [] lock_acquire+0x15e/0x450 kernel/locking/lockdep.c:3592 [] __mutex_lock_common kernel/locking/mutex.c:521 [inline] [] mutex_lock_nested+0xc1/0xb80 kernel/locking/mutex.c:621 [] ext4_register_li_request+0x89/0x7d0 fs/ext4/super.c:2945 [] ext4_remount+0x1366/0x1b90 fs/ext4/super.c:4922 [] do_remount_sb2+0x41b/0x7a0 fs/super.c:781 [] do_remount fs/namespace.c:2347 [inline] [] do_mount+0xfdb/0x2a40 fs/namespace.c:2860 [] SYSC_mount fs/namespace.c:3063 [inline] [] SyS_mount+0x130/0x1d0 fs/namespace.c:3041 [] entry_SYSCALL_64_fastpath+0x1e/0x9a [] lock_acquire+0x15e/0x450 kernel/locking/lockdep.c:3592 [] down_read+0x42/0x60 kernel/locking/rwsem.c:22 [] iterate_supers+0xe1/0x250 fs/super.c:547 [] selinux_complete_init+0x2f/0x31 security/selinux/hooks.c:6154 [] security_load_policy+0x69d/0x9c0 security/selinux/ss/services.c:2060 [] sel_write_load+0x175/0xf90 security/selinux/selinuxfs.c:535 [] __vfs_write+0x116/0x3d0 fs/read_write.c:491 [] vfs_write+0x182/0x4e0 fs/read_write.c:540 [] SYSC_write fs/read_write.c:587 [inline] [] SyS_write+0xdc/0x1c0 fs/read_write.c:579 [] entry_SYSCALL_64_fastpath+0x1e/0x9a [] check_prev_add kernel/locking/lockdep.c:1853 [inline] [] check_prevs_add kernel/locking/lockdep.c:1958 [inline] [] validate_chain kernel/locking/lockdep.c:2144 [inline] [] __lock_acquire+0x37d6/0x4f50 kernel/locking/lockdep.c:3213 [] lock_acquire+0x15e/0x450 kernel/locking/lockdep.c:3592 [] __mutex_lock_common kernel/locking/mutex.c:521 [inline] [] mutex_lock_nested+0xc1/0xb80 kernel/locking/mutex.c:621 [] sel_read_policy+0x59/0x110 security/selinux/selinuxfs.c:441 [] do_loop_readv_writev+0x148/0x1e0 fs/read_write.c:682 [] do_readv_writev+0x573/0x6e0 fs/read_write.c:812 [] vfs_readv+0x7a/0xb0 fs/read_write.c:836 [] kernel_readv fs/splice.c:586 [inline] [] default_file_splice_read+0x3ac/0x8b0 fs/splice.c:662 [] do_splice_to+0xff/0x160 fs/splice.c:1154 audit: type=1400 audit(1574629714.844:393): avc: denied { create } for pid=12571 comm="syz-executor.5" scontext=unconfined_u:system_r:insmod_t:s0-s0:c0.c1023 tcontext=unconfined_u:system_r:insmod_t:s0-s0:c0.c1023 tclass=netlink_generic_socket permissive=1 audit: type=1400 audit(1574629714.844:394): avc: denied { write } for pid=12571 comm="syz-executor.5" scontext=unconfined_u:system_r:insmod_t:s0-s0:c0.c1023 tcontext=unconfined_u:system_r:insmod_t:s0-s0:c0.c1023 tclass=netlink_generic_socket permissive=1 audit: type=1400 audit(1574629714.894:395): avc: denied { ioctl } for pid=12571 comm="syz-executor.5" path="socket:[38737]" dev="sockfs" ino=38737 ioctlcmd=4c00 scontext=unconfined_u:system_r:insmod_t:s0-s0:c0.c1023 tcontext=unconfined_u:system_r:insmod_t:s0-s0:c0.c1023 tclass=netlink_generic_socket permissive=1 audit: type=1400 audit(1574629714.894:396): avc: denied { read write } for pid=12571 comm="syz-executor.5" path="socket:[38737]" dev="sockfs" ino=38737 scontext=unconfined_u:system_r:insmod_t:s0-s0:c0.c1023 tcontext=unconfined_u:system_r:insmod_t:s0-s0:c0.c1023 tclass=netlink_generic_socket permissive=1 [] splice_direct_to_actor+0x249/0x850 fs/splice.c:1226 [] do_splice_direct+0x1a5/0x260 fs/splice.c:1337 [] do_sendfile+0x4ed/0xba0 fs/read_write.c:1229 [] C_SYSC_sendfile fs/read_write.c:1305 [inline] [] compat_SyS_sendfile+0xd1/0x160 fs/read_write.c:1294 [] do_syscall_32_irqs_on arch/x86/entry/common.c:330 [inline] [] do_fast_syscall_32+0x32d/0xa90 arch/x86/entry/common.c:397 [] sysenter_flags_fixed+0xd/0x1a other info that might help us debug this: Chain exists of: Possible unsafe locking scenario: CPU0 CPU1 ---- ---- lock(sb_writers#4); lock(&eli->li_list_mtx); lock(sb_writers#4); lock(sel_mutex); *** DEADLOCK *** 1 lock held by syz-executor.0/12585: #0: (sb_writers#4){.+.+.+}, at: [] file_start_write include/linux/fs.h:2543 [inline] #0: (sb_writers#4){.+.+.+}, at: [] do_sendfile+0x8a6/0xba0 fs/read_write.c:1228 stack backtrace: CPU: 1 PID: 12585 Comm: syz-executor.0 Not tainted 4.4.174+ #17 0000000000000000 a035033d59655db3 ffff8800b4257020 ffffffff81aad1a1 ffffffff84057a80 ffff8800b48fdf00 ffffffff83ab8a20 ffffffff83abc380 ffffffff83ac8080 ffff8800b4257070 ffffffff813abcda ffffffff83e1ef80 Call Trace: [] __dump_stack lib/dump_stack.c:15 [inline] [] dump_stack+0xc1/0x120 lib/dump_stack.c:51 [] print_circular_bug.cold+0x2f7/0x44e kernel/locking/lockdep.c:1226 [] check_prev_add kernel/locking/lockdep.c:1853 [inline] [] check_prevs_add kernel/locking/lockdep.c:1958 [inline] [] validate_chain kernel/locking/lockdep.c:2144 [inline] [] __lock_acquire+0x37d6/0x4f50 kernel/locking/lockdep.c:3213 [] lock_acquire+0x15e/0x450 kernel/locking/lockdep.c:3592 [] __mutex_lock_common kernel/locking/mutex.c:521 [inline] [] mutex_lock_nested+0xc1/0xb80 kernel/locking/mutex.c:621 [] sel_read_policy+0x59/0x110 security/selinux/selinuxfs.c:441 [] do_loop_readv_writev+0x148/0x1e0 fs/read_write.c:682 [] do_readv_writev+0x573/0x6e0 fs/read_write.c:812 [] vfs_readv+0x7a/0xb0 fs/read_write.c:836 [] kernel_readv fs/splice.c:586 [inline] [] default_file_splice_read+0x3ac/0x8b0 fs/splice.c:662 [] do_splice_to+0xff/0x160 fs/splice.c:1154 [] splice_direct_to_actor+0x249/0x850 fs/splice.c:1226 [] do_splice_direct+0x1a5/0x260 fs/splice.c:1337 [] do_sendfile+0x4ed/0xba0 fs/read_write.c:1229 [] C_SYSC_sendfile fs/read_write.c:1305 [inline] [] compat_SyS_sendfile+0xd1/0x160 fs/read_write.c:1294 [] do_syscall_32_irqs_on arch/x86/entry/common.c:330 [inline] [] do_fast_syscall_32+0x32d/0xa90 arch/x86/entry/common.c:397 [] sysenter_flags_fixed+0xd/0x1a audit: type=1400 audit(1574629715.814:397): avc: denied { write } for pid=12579 comm="syz-executor.5" scontext=unconfined_u:system_r:insmod_t:s0-s0:c0.c1023 tcontext=unconfined_u:system_r:insmod_t:s0-s0:c0.c1023 tclass=netlink_generic_socket permissive=1 input: syz0 as /devices/virtual/input/input56 uinput: write device info first input: syz0 as /devices/virtual/input/input58 audit_printk_skb: 1659 callbacks suppressed audit: type=1400 audit(1574629719.234:951): avc: denied { create } for pid=12692 comm="syz-executor.3" scontext=unconfined_u:system_r:insmod_t:s0-s0:c0.c1023 tcontext=unconfined_u:system_r:insmod_t:s0-s0:c0.c1023 tclass=netlink_netfilter_socket permissive=1 input: syz0 as /devices/virtual/input/input60 input: syz0 as /devices/virtual/input/input61 input: syz0 as /devices/virtual/input/input59 audit: type=1400 audit(1574629720.484:952): avc: denied { create } for pid=12748 comm="syz-executor.1" scontext=unconfined_u:system_r:insmod_t:s0-s0:c0.c1023 tcontext=unconfined_u:system_r:insmod_t:s0-s0:c0.c1023 tclass=netlink_netfilter_socket permissive=1 audit: type=1400 audit(1574629720.634:953): avc: denied { create } for pid=12748 comm="syz-executor.1" scontext=unconfined_u:system_r:insmod_t:s0-s0:c0.c1023 tcontext=unconfined_u:system_r:insmod_t:s0-s0:c0.c1023 tclass=netlink_netfilter_socket permissive=1 audit: type=1400 audit(1574629721.064:954): avc: denied { create } for pid=12748 comm="syz-executor.1" scontext=unconfined_u:system_r:insmod_t:s0-s0:c0.c1023 tcontext=unconfined_u:system_r:insmod_t:s0-s0:c0.c1023 tclass=netlink_netfilter_socket permissive=1 audit: type=1400 audit(1574629721.144:955): avc: denied { create } for pid=12748 comm="syz-executor.1" scontext=unconfined_u:system_r:insmod_t:s0-s0:c0.c1023 tcontext=unconfined_u:system_r:insmod_t:s0-s0:c0.c1023 tclass=netlink_netfilter_socket permissive=1 input: syz0 as /devices/virtual/input/input62 input: syz0 as /devices/virtual/input/input63 input: syz0 as /devices/virtual/input/input64 input: syz0 as /devices/virtual/input/input65 input: syz0 as /devices/virtual/input/input66 uinput: write device info first audit: type=1400 audit(1574629722.994:956): avc: denied { create } for pid=12839 comm="syz-executor.0" scontext=unconfined_u:system_r:insmod_t:s0-s0:c0.c1023 tcontext=unconfined_u:system_r:insmod_t:s0-s0:c0.c1023 tclass=netlink_fib_lookup_socket permissive=1 input: syz1 as /devices/virtual/input/input68 audit: type=1400 audit(1574629723.284:957): avc: denied { create } for pid=12839 comm="syz-executor.0" scontext=unconfined_u:system_r:insmod_t:s0-s0:c0.c1023 tcontext=unconfined_u:system_r:insmod_t:s0-s0:c0.c1023 tclass=netlink_fib_lookup_socket permissive=1 uinput: write device info first input: syz1 as /devices/virtual/input/input72 audit: type=1400 audit(1574629723.994:958): avc: denied { create } for pid=12876 comm="syz-executor.0" scontext=unconfined_u:system_r:insmod_t:s0-s0:c0.c1023 tcontext=unconfined_u:system_r:insmod_t:s0-s0:c0.c1023 tclass=netlink_generic_socket permissive=1 audit: type=1400 audit(1574629724.244:959): avc: denied { write } for pid=12876 comm="syz-executor.0" scontext=unconfined_u:system_r:insmod_t:s0-s0:c0.c1023 tcontext=unconfined_u:system_r:insmod_t:s0-s0:c0.c1023 tclass=netlink_generic_socket permissive=1 uinput: write device info first