hrtimer: interrupt took 42569 ns L1TF CPU bug present and SMT on, data leak possible. See CVE-2018-3646 and https://www.kernel.org/doc/html/latest/admin-guide/hw-vuln/l1tf.html for details. ====================================================== WARNING: possible circular locking dependency detected 4.14.305-syzkaller #0 Not tainted ------------------------------------------------------ syz-executor.2/9740 is trying to acquire lock: (event_mutex){+.+.}, at: [] perf_trace_destroy+0x23/0xf0 kernel/trace/trace_event_perf.c:234 but task is already holding lock: (&event->child_mutex){+.+.}, at: [] perf_event_release_kernel+0x208/0x8a0 kernel/events/core.c:4405 which lock already depends on the new lock. the existing dependency chain (in reverse order) is: -> #5 (&event->child_mutex){+.+.}: __mutex_lock_common kernel/locking/mutex.c:756 [inline] __mutex_lock+0xc4/0x1310 kernel/locking/mutex.c:893 perf_event_for_each_child+0x82/0x140 kernel/events/core.c:4690 perf_event_for_each kernel/events/core.c:4707 [inline] _perf_ioctl+0x3db/0x1a60 kernel/events/core.c:4875 perf_ioctl+0x55/0x80 kernel/events/core.c:4889 vfs_ioctl fs/ioctl.c:46 [inline] file_ioctl fs/ioctl.c:500 [inline] do_vfs_ioctl+0x75a/0xff0 fs/ioctl.c:684 SYSC_ioctl fs/ioctl.c:701 [inline] SyS_ioctl+0x7f/0xb0 fs/ioctl.c:692 do_syscall_64+0x1d5/0x640 arch/x86/entry/common.c:292 entry_SYSCALL_64_after_hwframe+0x5e/0xd3 -> #4 (&cpuctx_mutex){+.+.}: __mutex_lock_common kernel/locking/mutex.c:756 [inline] __mutex_lock+0xc4/0x1310 kernel/locking/mutex.c:893 perf_event_init_cpu+0xb7/0x170 kernel/events/core.c:11293 perf_event_init+0x2cc/0x308 kernel/events/core.c:11340 start_kernel+0x45d/0x763 init/main.c:624 secondary_startup_64+0xa5/0xb0 arch/x86/kernel/head_64.S:240 -> #3 (pmus_lock){+.+.}: __mutex_lock_common kernel/locking/mutex.c:756 [inline] __mutex_lock+0xc4/0x1310 kernel/locking/mutex.c:893 perf_event_init_cpu+0x2c/0x170 kernel/events/core.c:11287 cpuhp_invoke_callback+0x1e6/0x1a80 kernel/cpu.c:186 cpuhp_up_callbacks kernel/cpu.c:574 [inline] _cpu_up+0x21e/0x520 kernel/cpu.c:1193 do_cpu_up+0x9a/0x160 kernel/cpu.c:1229 smp_init+0x197/0x1ac kernel/smp.c:578 kernel_init_freeable+0x406/0x626 init/main.c:1074 kernel_init+0xd/0x165 init/main.c:1006 ret_from_fork+0x24/0x30 arch/x86/entry/entry_64.S:406 -> #2 (cpu_hotplug_lock.rw_sem){++++}: percpu_down_read_preempt_disable include/linux/percpu-rwsem.h:36 [inline] percpu_down_read include/linux/percpu-rwsem.h:59 [inline] cpus_read_lock+0x39/0xc0 kernel/cpu.c:297 static_key_slow_inc+0xe/0x20 kernel/jump_label.c:123 tracepoint_add_func+0x747/0xa40 kernel/tracepoint.c:269 tracepoint_probe_register_prio kernel/tracepoint.c:331 [inline] tracepoint_probe_register+0x8c/0xc0 kernel/tracepoint.c:352 trace_event_reg+0x272/0x330 kernel/trace/trace_events.c:305 perf_trace_event_reg kernel/trace/trace_event_perf.c:122 [inline] perf_trace_event_init kernel/trace/trace_event_perf.c:197 [inline] perf_trace_init+0x424/0xa30 kernel/trace/trace_event_perf.c:221 perf_tp_event_init+0x79/0xf0 kernel/events/core.c:8145 perf_try_init_event+0x15b/0x1f0 kernel/events/core.c:9381 perf_init_event kernel/events/core.c:9419 [inline] perf_event_alloc.part.0+0xe2d/0x2640 kernel/events/core.c:9679 perf_event_alloc kernel/events/core.c:10049 [inline] SYSC_perf_event_open kernel/events/core.c:10153 [inline] SyS_perf_event_open+0x683/0x2530 kernel/events/core.c:10039 do_syscall_64+0x1d5/0x640 arch/x86/entry/common.c:292 entry_SYSCALL_64_after_hwframe+0x5e/0xd3 -> #1 (tracepoints_mutex){+.+.}: __mutex_lock_common kernel/locking/mutex.c:756 [inline] __mutex_lock+0xc4/0x1310 kernel/locking/mutex.c:893 tracepoint_probe_register_prio kernel/tracepoint.c:327 [inline] tracepoint_probe_register+0x68/0xc0 kernel/tracepoint.c:352 trace_event_reg+0x272/0x330 kernel/trace/trace_events.c:305 perf_trace_event_reg kernel/trace/trace_event_perf.c:122 [inline] perf_trace_event_init kernel/trace/trace_event_perf.c:197 [inline] perf_trace_init+0x424/0xa30 kernel/trace/trace_event_perf.c:221 perf_tp_event_init+0x79/0xf0 kernel/events/core.c:8145 perf_try_init_event+0x15b/0x1f0 kernel/events/core.c:9381 perf_init_event kernel/events/core.c:9419 [inline] perf_event_alloc.part.0+0xe2d/0x2640 kernel/events/core.c:9679 perf_event_alloc kernel/events/core.c:10049 [inline] SYSC_perf_event_open kernel/events/core.c:10153 [inline] SyS_perf_event_open+0x683/0x2530 kernel/events/core.c:10039 do_syscall_64+0x1d5/0x640 arch/x86/entry/common.c:292 entry_SYSCALL_64_after_hwframe+0x5e/0xd3 -> #0 (event_mutex){+.+.}: lock_acquire+0x170/0x3f0 kernel/locking/lockdep.c:3998 __mutex_lock_common kernel/locking/mutex.c:756 [inline] __mutex_lock+0xc4/0x1310 kernel/locking/mutex.c:893 perf_trace_destroy+0x23/0xf0 kernel/trace/trace_event_perf.c:234 _free_event+0x321/0xe20 kernel/events/core.c:4246 free_event+0x32/0x40 kernel/events/core.c:4273 perf_event_release_kernel+0x368/0x8a0 kernel/events/core.c:4417 perf_release+0x33/0x40 kernel/events/core.c:4443 __fput+0x25f/0x7a0 fs/file_table.c:210 task_work_run+0x11f/0x190 kernel/task_work.c:113 exit_task_work include/linux/task_work.h:22 [inline] do_exit+0xa44/0x2850 kernel/exit.c:915 SYSC_exit kernel/exit.c:1006 [inline] SyS_exit+0x1e/0x20 kernel/exit.c:1004 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: Chain exists of: event_mutex --> &cpuctx_mutex --> &event->child_mutex Possible unsafe locking scenario: CPU0 CPU1 ---- ---- lock(&event->child_mutex); lock(&cpuctx_mutex); lock(&event->child_mutex); lock(event_mutex); *** DEADLOCK *** 2 locks held by syz-executor.2/9740: #0: (&ctx->mutex){+.+.}, at: [] perf_event_release_kernel+0x1fe/0x8a0 kernel/events/core.c:4404 #1: (&event->child_mutex){+.+.}, at: [] perf_event_release_kernel+0x208/0x8a0 kernel/events/core.c:4405 stack backtrace: CPU: 1 PID: 9740 Comm: syz-executor.2 Not tainted 4.14.305-syzkaller #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/21/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 __mutex_lock_common kernel/locking/mutex.c:756 [inline] __mutex_lock+0xc4/0x1310 kernel/locking/mutex.c:893 perf_trace_destroy+0x23/0xf0 kernel/trace/trace_event_perf.c:234 _free_event+0x321/0xe20 kernel/events/core.c:4246 free_event+0x32/0x40 kernel/events/core.c:4273 perf_event_release_kernel+0x368/0x8a0 kernel/events/core.c:4417 perf_release+0x33/0x40 kernel/events/core.c:4443 __fput+0x25f/0x7a0 fs/file_table.c:210 task_work_run+0x11f/0x190 kernel/task_work.c:113 exit_task_work include/linux/task_work.h:22 [inline] do_exit+0xa44/0x2850 kernel/exit.c:915 SYSC_exit kernel/exit.c:1006 [inline] SyS_exit+0x1e/0x20 kernel/exit.c:1004 do_syscall_64+0x1d5/0x640 arch/x86/entry/common.c:292 entry_SYSCALL_64_after_hwframe+0x5e/0xd3 RIP: 0033:0x7f9edd59d0f9 RSP: 002b:00007f9edbb0f118 EFLAGS: 00000246 ORIG_RAX: 000000000000003c RAX: ffffffffffffffda RBX: 00007f9edd6bcf80 RCX: 00007f9edd59d0f9 RDX: 0000000000000000 RSI: 0000000000000000 RDI: 0000000000000000 RBP: 00007f9edd5f8ae9 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000 R13: 00007ffdea8b2d8f R14: 00007f9edbb0f300 R15: 0000000000022000 ntfs: (device loop0): ntfs_read_inode_mount(): First extent of $DATA attribute has non zero lowest_vcn. $MFT is corrupt. You should run chkdsk. ntfs: (device loop0): ntfs_read_inode_mount(): Failed. Marking inode as bad. ntfs: (device loop0): ntfs_read_inode_mount(): First extent of $DATA attribute has non zero lowest_vcn. $MFT is corrupt. You should run chkdsk. ntfs: (device loop0): ntfs_read_inode_mount(): Failed. Marking inode as bad. ntfs: (device loop0): ntfs_read_inode_mount(): First extent of $DATA attribute has non zero lowest_vcn. $MFT is corrupt. You should run chkdsk. ntfs: (device loop0): ntfs_read_inode_mount(): Failed. Marking inode as bad. ================================================================== BUG: KASAN: slab-out-of-bounds in tipc_nametbl_lookup_dst_nodes+0x44c/0x4c0 net/tipc/name_table.c:670 Read of size 4 at addr ffff8880b0078290 by task syz-executor.0/10309 CPU: 0 PID: 10309 Comm: syz-executor.0 Not tainted 4.14.305-syzkaller #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/21/2023 Call Trace: __dump_stack lib/dump_stack.c:17 [inline] dump_stack+0x1b2/0x281 lib/dump_stack.c:58 print_address_description.cold+0x54/0x1d3 mm/kasan/report.c:251 kasan_report_error.cold+0x8a/0x191 mm/kasan/report.c:350 kasan_report mm/kasan/report.c:408 [inline] __asan_report_load4_noabort+0x68/0x70 mm/kasan/report.c:428 tipc_nametbl_lookup_dst_nodes+0x44c/0x4c0 net/tipc/name_table.c:670 tipc_sendmcast+0x51a/0xac0 net/tipc/socket.c:768 __tipc_sendmsg+0xbab/0xf90 net/tipc/socket.c:975 tipc_sendmsg+0x4c/0x70 net/tipc/socket.c:923 sock_sendmsg_nosec net/socket.c:646 [inline] sock_sendmsg+0xb5/0x100 net/socket.c:656 ___sys_sendmsg+0x6c8/0x800 net/socket.c:2062 __sys_sendmsg+0xa3/0x120 net/socket.c:2096 SYSC_sendmsg net/socket.c:2107 [inline] SyS_sendmsg+0x27/0x40 net/socket.c:2103 do_syscall_64+0x1d5/0x640 arch/x86/entry/common.c:292 entry_SYSCALL_64_after_hwframe+0x5e/0xd3 RIP: 0033:0x7f29695030f9 RSP: 002b:00007f2967a75168 EFLAGS: 00000246 ORIG_RAX: 000000000000002e RAX: ffffffffffffffda RBX: 00007f2969622f80 RCX: 00007f29695030f9 RDX: 0000000000000000 RSI: 00000000200002c0 RDI: 0000000000000004 RBP: 00007f296955eae9 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000 R13: 00007fffb09d313f R14: 00007f2967a75300 R15: 0000000000022000 Allocated by task 8010: save_stack mm/kasan/kasan.c:447 [inline] set_track mm/kasan/kasan.c:459 [inline] kasan_kmalloc+0xeb/0x160 mm/kasan/kasan.c:551 __do_kmalloc mm/slab.c:3720 [inline] __kmalloc+0x15a/0x400 mm/slab.c:3729 tipc_nameseq_create+0x53/0x290 net/tipc/name_table.c:152 tipc_nametbl_insert_publ+0xb37/0x14e0 net/tipc/name_table.c:476 tipc_nametbl_publish+0x211/0x3f0 net/tipc/name_table.c:701 tipc_sk_publish net/tipc/socket.c:2206 [inline] tipc_bind+0x2c4/0x600 net/tipc/socket.c:630 tipc_create_listen_sock net/tipc/server.c:338 [inline] tipc_open_listening_sock net/tipc/server.c:396 [inline] tipc_server_start+0x31f/0x880 net/tipc/server.c:611 tipc_topsrv_start net/tipc/subscr.c:382 [inline] tipc_topsrv_init_net+0x53b/0x730 net/tipc/subscr.c:397 ops_init+0xaa/0x3e0 net/core/net_namespace.c:118 setup_net+0x22f/0x530 net/core/net_namespace.c:298 copy_net_ns+0x19b/0x440 net/core/net_namespace.c:422 create_new_namespaces+0x375/0x720 kernel/nsproxy.c:107 unshare_nsproxy_namespaces+0xa1/0x1d0 kernel/nsproxy.c:206 SYSC_unshare kernel/fork.c:2413 [inline] SyS_unshare+0x308/0x7f0 kernel/fork.c:2363 do_syscall_64+0x1d5/0x640 arch/x86/entry/common.c:292 entry_SYSCALL_64_after_hwframe+0x5e/0xd3 Freed by task 1: save_stack mm/kasan/kasan.c:447 [inline] set_track mm/kasan/kasan.c:459 [inline] kasan_slab_free+0xc3/0x1a0 mm/kasan/kasan.c:524 __cache_free mm/slab.c:3496 [inline] kfree+0xc9/0x250 mm/slab.c:3815 aa_free_task_context+0xda/0x130 security/apparmor/context.c:54 apparmor_cred_free+0x34/0x70 security/apparmor/lsm.c:58 security_cred_free+0x71/0xb0 security/security.c:1003 put_cred_rcu+0xe3/0x300 kernel/cred.c:117 __rcu_reclaim kernel/rcu/rcu.h:195 [inline] rcu_do_batch kernel/rcu/tree.c:2699 [inline] invoke_rcu_callbacks kernel/rcu/tree.c:2962 [inline] __rcu_process_callbacks kernel/rcu/tree.c:2929 [inline] rcu_process_callbacks+0x780/0x1180 kernel/rcu/tree.c:2946 __do_softirq+0x24d/0x9ff kernel/softirq.c:288 The buggy address belongs to the object at ffff8880b0078280 which belongs to the cache kmalloc-32 of size 32 The buggy address is located 16 bytes inside of 32-byte region [ffff8880b0078280, ffff8880b00782a0) The buggy address belongs to the page: page:ffffea0002c01e00 count:1 mapcount:0 mapping:ffff8880b0078000 index:0xffff8880b0078fc1 flags: 0xfff00000000100(slab) raw: 00fff00000000100 ffff8880b0078000 ffff8880b0078fc1 000000010000003e raw: ffffea00029544e0 ffffea0002b19960 ffff88813fe741c0 0000000000000000 page dumped because: kasan: bad access detected Memory state around the buggy address: ffff8880b0078180: fb fb fb fb fc fc fc fc fb fb fb fb fc fc fc fc ffff8880b0078200: 00 01 fc fc fc fc fc fc 05 fc fc fc fc fc fc fc >ffff8880b0078280: 00 00 fc fc fc fc fc fc 00 06 fc fc fc fc fc fc ^ ffff8880b0078300: 00 06 fc fc fc fc fc fc fb fb fb fb fc fc fc fc ffff8880b0078380: 05 fc fc fc fc fc fc fc fb fb fb fb fc fc fc fc ==================================================================