====================================================== WARNING: possible circular locking dependency detected 4.14.140+ #38 Not tainted ------------------------------------------------------ kauditd_printk_skb: 74 callbacks suppressed audit: type=1400 audit(901703140.905:15494): avc: denied { map } for pid=19847 comm="modprobe" path="/bin/kmod" dev="sda1" ino=1440 scontext=system_u:system_r:kernel_t:s0 tcontext=system_u:object_r:file_t:s0 tclass=file permissive=1 syz-executor.2/19842 is trying to acquire lock: (&cpuctx_mutex/1){+.+.}, at: [<000000002bababc6>] mutex_lock_double kernel/events/core.c:9909 [inline] (&cpuctx_mutex/1){+.+.}, at: [<000000002bababc6>] __perf_event_ctx_lock_double kernel/events/core.c:9968 [inline] (&cpuctx_mutex/1){+.+.}, at: [<000000002bababc6>] SYSC_perf_event_open kernel/events/core.c:10233 [inline] (&cpuctx_mutex/1){+.+.}, at: [<000000002bababc6>] SyS_perf_event_open+0x12cf/0x2560 kernel/events/core.c:9988 but task is already holding lock: audit: type=1400 audit(901703140.905:15495): avc: denied { map } for pid=19847 comm="modprobe" path="/bin/kmod" dev="sda1" ino=1440 scontext=system_u:system_r:kernel_t:s0 tcontext=system_u:object_r:file_t:s0 tclass=file permissive=1 (&cpuctx_mutex){+.+.}, at: [<000000007d278667>] mutex_lock_double kernel/events/core.c:9908 [inline] (&cpuctx_mutex){+.+.}, at: [<000000007d278667>] __perf_event_ctx_lock_double kernel/events/core.c:9968 [inline] (&cpuctx_mutex){+.+.}, at: [<000000007d278667>] SYSC_perf_event_open kernel/events/core.c:10233 [inline] (&cpuctx_mutex){+.+.}, at: [<000000007d278667>] SyS_perf_event_open+0x12c2/0x2560 kernel/events/core.c:9988 which lock already depends on the new lock. the existing dependency chain (in reverse order) is: -> #2 (&cpuctx_mutex){+.+.}: __mutex_lock_common kernel/locking/mutex.c:756 [inline] __mutex_lock+0xf7/0x13e0 kernel/locking/mutex.c:893 perf_event_init_cpu+0xa8/0x150 kernel/events/core.c:11231 perf_event_init+0x289/0x2c5 kernel/events/core.c:11278 audit: type=1400 audit(901703140.905:15496): avc: denied { map } for pid=19848 comm="modprobe" path="/bin/kmod" dev="sda1" ino=1440 scontext=system_u:system_r:kernel_t:s0 tcontext=system_u:object_r:file_t:s0 tclass=file permissive=1 start_kernel+0x43d/0x74a init/main.c:621 secondary_startup_64+0xa5/0xb0 arch/x86/kernel/head_64.S:240 -> #1 (pmus_lock){+.+.}: __mutex_lock_common kernel/locking/mutex.c:756 [inline] __mutex_lock+0xf7/0x13e0 kernel/locking/mutex.c:893 audit: type=1400 audit(901703140.905:15497): avc: denied { map } for pid=19848 comm="modprobe" path="/bin/kmod" dev="sda1" ino=1440 scontext=system_u:system_r:kernel_t:s0 tcontext=system_u:object_r:file_t:s0 tclass=file permissive=1 swevent_hlist_get kernel/events/core.c:7896 [inline] perf_swevent_init+0x123/0x4f0 kernel/events/core.c:7956 perf_try_init_event+0xe5/0x200 kernel/events/core.c:9347 perf_init_event kernel/events/core.c:9385 [inline] perf_event_alloc.part.0+0xd13/0x1ff0 kernel/events/core.c:9645 perf_event_alloc kernel/events/core.c:9998 [inline] SYSC_perf_event_open kernel/events/core.c:10105 [inline] SyS_perf_event_open+0x6eb/0x2560 kernel/events/core.c:9988 do_syscall_64+0x19b/0x520 arch/x86/entry/common.c:292 entry_SYSCALL_64_after_hwframe+0x42/0xb7 -> #0 (&cpuctx_mutex/1){+.+.}: lock_acquire+0x12b/0x360 kernel/locking/lockdep.c:3991 __mutex_lock_common kernel/locking/mutex.c:756 [inline] __mutex_lock+0xf7/0x13e0 kernel/locking/mutex.c:893 audit: type=1400 audit(901703140.905:15498): avc: denied { map } for pid=19852 comm="blkid" path="/sbin/blkid" dev="sda1" ino=16128 scontext=system_u:system_r:kernel_t:s0 tcontext=system_u:object_r:file_t:s0 tclass=file permissive=1 mutex_lock_double kernel/events/core.c:9909 [inline] __perf_event_ctx_lock_double kernel/events/core.c:9968 [inline] SYSC_perf_event_open kernel/events/core.c:10233 [inline] SyS_perf_event_open+0x12cf/0x2560 kernel/events/core.c:9988 do_syscall_64+0x19b/0x520 arch/x86/entry/common.c:292 entry_SYSCALL_64_after_hwframe+0x42/0xb7 other info that might help us debug this: Chain exists of: audit: type=1400 audit(901703140.905:15499): avc: denied { map } for pid=19852 comm="blkid" path="/sbin/blkid" dev="sda1" ino=16128 scontext=system_u:system_r:kernel_t:s0 tcontext=system_u:object_r:file_t:s0 tclass=file permissive=1 &cpuctx_mutex/1 --> pmus_lock --> &cpuctx_mutex Possible unsafe locking scenario: CPU0 CPU1 ---- ---- lock(&cpuctx_mutex); lock(pmus_lock); lock(&cpuctx_mutex); lock(&cpuctx_mutex/1); *** DEADLOCK *** 1 lock held by syz-executor.2/19842: #0: (&cpuctx_mutex){+.+.}, at: [<000000007d278667>] mutex_lock_double kernel/events/core.c:9908 [inline] #0: (&cpuctx_mutex){+.+.}, at: [<000000007d278667>] __perf_event_ctx_lock_double kernel/events/core.c:9968 [inline] #0: (&cpuctx_mutex){+.+.}, at: [<000000007d278667>] SYSC_perf_event_open kernel/events/core.c:10233 [inline] #0: (&cpuctx_mutex){+.+.}, at: [<000000007d278667>] SyS_perf_event_open+0x12c2/0x2560 kernel/events/core.c:9988 stack backtrace: audit: type=1400 audit(901703140.905:15500): avc: denied { create } for pid=19846 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 CPU: 1 PID: 19842 Comm: syz-executor.2 Not tainted 4.14.140+ #38 Call Trace: __dump_stack lib/dump_stack.c:17 [inline] dump_stack+0xca/0x134 lib/dump_stack.c:53 print_circular_bug.isra.0.cold+0x2dc/0x425 kernel/locking/lockdep.c:1258 check_prev_add kernel/locking/lockdep.c:1901 [inline] check_prevs_add kernel/locking/lockdep.c:2018 [inline] validate_chain kernel/locking/lockdep.c:2460 [inline] __lock_acquire+0x2f5f/0x4320 kernel/locking/lockdep.c:3487 audit: type=1400 audit(901703140.905:15501): avc: denied { write } for pid=19846 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 lock_acquire+0x12b/0x360 kernel/locking/lockdep.c:3991 __mutex_lock_common kernel/locking/mutex.c:756 [inline] __mutex_lock+0xf7/0x13e0 kernel/locking/mutex.c:893 audit: type=1400 audit(901703140.905:15502): avc: denied { map } for pid=19854 comm="modprobe" path="/bin/kmod" dev="sda1" ino=1440 scontext=system_u:system_r:kernel_t:s0 tcontext=system_u:object_r:file_t:s0 tclass=file permissive=1 mutex_lock_double kernel/events/core.c:9909 [inline] __perf_event_ctx_lock_double kernel/events/core.c:9968 [inline] SYSC_perf_event_open kernel/events/core.c:10233 [inline] SyS_perf_event_open+0x12cf/0x2560 kernel/events/core.c:9988 audit: type=1400 audit(901703140.905:15503): avc: denied { read } for pid=19846 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 do_syscall_64+0x19b/0x520 arch/x86/entry/common.c:292 entry_SYSCALL_64_after_hwframe+0x42/0xb7 RIP: 0033:0x459879 RSP: 002b:00007f29ec878c78 EFLAGS: 00000246 ORIG_RAX: 000000000000012a RAX: ffffffffffffffda RBX: 0000000000000005 RCX: 0000000000459879 RDX: 0000000000000000 RSI: ffffffffffffffff RDI: 0000000020000200 RBP: 000000000075bf20 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000004 R11: 0000000000000246 R12: 00007f29ec8796d4 R13: 00000000004c66e4 R14: 00000000004db758 R15: 00000000ffffffff netlink: 8 bytes leftover after parsing attributes in process `syz-executor.5'. rtc_cmos 00:00: Alarms can be up to one day in the future rtc_cmos 00:00: Alarms can be up to one day in the future rtc_cmos 00:00: Alarms can be up to one day in the future rtc_cmos 00:00: Alarms can be up to one day in the future rtc_cmos 00:00: Alarms can be up to one day in the future rtc_cmos 00:00: Alarms can be up to one day in the future rtc rtc0: __rtc_set_alarm: err=-22 kauditd_printk_skb: 101 callbacks suppressed audit: type=1400 audit(901703145.975:15605): avc: denied { map } for pid=20012 comm="blkid" path="/sbin/blkid" dev="sda1" ino=16128 scontext=system_u:system_r:kernel_t:s0 tcontext=system_u:object_r:file_t:s0 tclass=file permissive=1 audit: type=1400 audit(901703146.085:15607): avc: denied { create } for pid=20013 comm="syz-executor.4" 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(901703146.085:15608): avc: denied { write } for pid=20013 comm="syz-executor.4" 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(901703146.085:15609): avc: denied { create } for pid=20017 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(901703146.095:15610): avc: denied { read } for pid=20017 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(901703146.105:15611): avc: denied { map } for pid=20023 comm="modprobe" path="/bin/kmod" dev="sda1" ino=1440 scontext=system_u:system_r:kernel_t:s0 tcontext=system_u:object_r:file_t:s0 tclass=file permissive=1 audit: type=1400 audit(901703146.075:15606): avc: denied { create } for pid=20016 comm="syz-executor.2" 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(901703146.115:15612): avc: denied { read } for pid=20013 comm="syz-executor.4" 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(901703146.145:15613): avc: denied { create } for pid=20016 comm="syz-executor.2" 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(901703146.245:15614): avc: denied { sys_admin } for pid=20017 comm="syz-executor.0" capability=21 scontext=unconfined_u:system_r:insmod_t:s0-s0:c0.c1023 tcontext=unconfined_u:system_r:insmod_t:s0-s0:c0.c1023 tclass=cap_userns permissive=1 FAT-fs (loop5): Unrecognized mount option "subj_user=/}" or missing value SELinux: Context system_u:object_r:wtmp_t: is not valid (left unmapped). SELinux: unrecognized netlink message: protocol=4 nlmsg_type=28005 sclass=netlink_tcpdiag_socket pig=20184 comm=syz-executor.5 SELinux: unrecognized netlink message: protocol=4 nlmsg_type=28005 sclass=netlink_tcpdiag_socket pig=20189 comm=syz-executor.5 ip6_tunnel: ­ xmit: Local address not yet configured!