netlink: 'syz.0.967': attribute type 29 has an invalid length. ====================================================== WARNING: possible circular locking dependency detected 6.10.0-rc6-syzkaller-g7b769adc2612 #0 Not tainted ------------------------------------------------------ syz.0.967/7947 is trying to acquire lock: ffff8880b94387b8 (lock#10){+.+.}-{2:2}, at: local_lock_acquire include/linux/local_lock_internal.h:29 [inline] ffff8880b94387b8 (lock#10){+.+.}-{2:2}, at: __mmap_lock_do_trace_start_locking+0x83/0x620 mm/mmap_lock.c:230 but task is already holding lock: ffff8880b943e858 (&rq->__lock){-.-.}-{2:2}, at: raw_spin_rq_lock_nested+0x2a/0x140 kernel/sched/core.c:559 which lock already depends on the new lock. the existing dependency chain (in reverse order) is: -> #2 (&rq->__lock){-.-.}-{2:2}: lock_acquire+0x1ed/0x550 kernel/locking/lockdep.c:5754 _raw_spin_lock_nested+0x31/0x40 kernel/locking/spinlock.c:378 raw_spin_rq_lock_nested+0x2a/0x140 kernel/sched/core.c:559 raw_spin_rq_lock kernel/sched/sched.h:1406 [inline] rq_lock kernel/sched/sched.h:1702 [inline] task_fork_fair+0x61/0x1e0 kernel/sched/fair.c:12710 sched_cgroup_fork+0x37c/0x410 kernel/sched/core.c:4844 copy_process+0x2217/0x3dc0 kernel/fork.c:2499 kernel_clone+0x226/0x8f0 kernel/fork.c:2797 user_mode_thread+0x132/0x1a0 kernel/fork.c:2875 rest_init+0x23/0x300 init/main.c:712 start_kernel+0x47a/0x500 init/main.c:1103 x86_64_start_reservations+0x2a/0x30 arch/x86/kernel/head64.c:507 x86_64_start_kernel+0x99/0xa0 arch/x86/kernel/head64.c:488 common_startup_64+0x13e/0x147 -> #1 (&p->pi_lock){-.-.}-{2:2}: lock_acquire+0x1ed/0x550 kernel/locking/lockdep.c:5754 __raw_spin_lock_irqsave include/linux/spinlock_api_smp.h:110 [inline] _raw_spin_lock_irqsave+0xd5/0x120 kernel/locking/spinlock.c:162 class_raw_spinlock_irqsave_constructor include/linux/spinlock.h:553 [inline] try_to_wake_up+0xb0/0x1470 kernel/sched/core.c:4262 rcu_read_unlock_special+0x3db/0x550 kernel/rcu/tree_plugin.h:655 __rcu_read_unlock+0xa1/0x110 kernel/rcu/tree_plugin.h:426 rcu_read_unlock include/linux/rcupdate.h:814 [inline] get_mem_cgroup_from_mm+0x1b2/0x2a0 mm/memcontrol.c:1271 get_mm_memcg_path+0x1b/0x600 mm/mmap_lock.c:202 __mmap_lock_do_trace_released+0x134/0x620 mm/mmap_lock.c:243 __mmap_lock_trace_released include/linux/mmap_lock.h:42 [inline] mmap_read_unlock include/linux/mmap_lock.h:170 [inline] exit_mmap+0xaf7/0xc80 mm/mmap.c:3342 __mmput+0x115/0x3c0 kernel/fork.c:1346 exit_mm+0x220/0x310 kernel/exit.c:567 do_exit+0x9aa/0x27e0 kernel/exit.c:863 do_group_exit+0x207/0x2c0 kernel/exit.c:1025 __do_sys_exit_group kernel/exit.c:1036 [inline] __se_sys_exit_group kernel/exit.c:1034 [inline] __x64_sys_exit_group+0x3f/0x40 kernel/exit.c:1034 do_syscall_x64 arch/x86/entry/common.c:52 [inline] do_syscall_64+0xf3/0x230 arch/x86/entry/common.c:83 entry_SYSCALL_64_after_hwframe+0x77/0x7f -> #0 (lock#10){+.+.}-{2:2}: check_prev_add kernel/locking/lockdep.c:3134 [inline] check_prevs_add kernel/locking/lockdep.c:3253 [inline] validate_chain+0x18e0/0x5900 kernel/locking/lockdep.c:3869 __lock_acquire+0x1346/0x1fd0 kernel/locking/lockdep.c:5137 lock_acquire+0x1ed/0x550 kernel/locking/lockdep.c:5754 local_lock_acquire include/linux/local_lock_internal.h:29 [inline] __mmap_lock_do_trace_start_locking+0x9c/0x620 mm/mmap_lock.c:230 __mmap_lock_trace_start_locking include/linux/mmap_lock.h:29 [inline] mmap_read_trylock include/linux/mmap_lock.h:162 [inline] stack_map_get_build_id_offset+0x98a/0x9d0 kernel/bpf/stackmap.c:141 __bpf_get_stack+0x4ad/0x5a0 kernel/bpf/stackmap.c:449 ____bpf_get_stack_raw_tp kernel/trace/bpf_trace.c:1997 [inline] bpf_get_stack_raw_tp+0x1a3/0x240 kernel/trace/bpf_trace.c:1987 bpf_prog_ec3b2eefa702d8d3+0x42/0x46 bpf_dispatcher_nop_func include/linux/bpf.h:1243 [inline] __bpf_prog_run include/linux/filter.h:691 [inline] bpf_prog_run include/linux/filter.h:698 [inline] __bpf_trace_run kernel/trace/bpf_trace.c:2406 [inline] bpf_trace_run2+0x2ec/0x540 kernel/trace/bpf_trace.c:2447 trace_tlb_flush+0x118/0x140 include/trace/events/tlb.h:38 switch_mm_irqs_off+0x7cb/0xae0 context_switch kernel/sched/core.c:5392 [inline] __schedule+0x1066/0x4a20 kernel/sched/core.c:6745 preempt_schedule_irq+0xfb/0x1c0 kernel/sched/core.c:7067 irqentry_exit+0x5e/0x90 kernel/entry/common.c:354 asm_sysvec_apic_timer_interrupt+0x1a/0x20 arch/x86/include/asm/idtentry.h:702 if_nlmsg_size+0x645/0x7a0 net/core/rtnetlink.c:1103 rtnl_calcit net/core/rtnetlink.c:3998 [inline] rtnetlink_rcv_msg+0xf43/0x1180 net/core/rtnetlink.c:6580 netlink_rcv_skb+0x1e3/0x430 net/netlink/af_netlink.c:2550 netlink_unicast_kernel net/netlink/af_netlink.c:1331 [inline] netlink_unicast+0x7f0/0x990 net/netlink/af_netlink.c:1357 netlink_sendmsg+0x8e4/0xcb0 net/netlink/af_netlink.c:1901 sock_sendmsg_nosec net/socket.c:730 [inline] __sock_sendmsg+0x221/0x270 net/socket.c:745 ____sys_sendmsg+0x525/0x7d0 net/socket.c:2585 ___sys_sendmsg net/socket.c:2639 [inline] __sys_sendmsg+0x2b0/0x3a0 net/socket.c:2668 do_syscall_x64 arch/x86/entry/common.c:52 [inline] do_syscall_64+0xf3/0x230 arch/x86/entry/common.c:83 entry_SYSCALL_64_after_hwframe+0x77/0x7f other info that might help us debug this: Chain exists of: lock#10 --> &p->pi_lock --> &rq->__lock Possible unsafe locking scenario: CPU0 CPU1 ---- ---- lock(&rq->__lock); lock(&p->pi_lock); lock(&rq->__lock); lock(lock#10); *** DEADLOCK *** 5 locks held by syz.0.967/7947: #0: ffffffff8e333f20 (rcu_read_lock){....}-{1:2}, at: rcu_lock_acquire include/linux/rcupdate.h:329 [inline] #0: ffffffff8e333f20 (rcu_read_lock){....}-{1:2}, at: rcu_read_lock include/linux/rcupdate.h:781 [inline] #0: ffffffff8e333f20 (rcu_read_lock){....}-{1:2}, at: rtnetlink_rcv_msg+0x208/0x1180 net/core/rtnetlink.c:6562 #1: ffffffff8e333f20 (rcu_read_lock){....}-{1:2}, at: rcu_lock_acquire include/linux/rcupdate.h:329 [inline] #1: ffffffff8e333f20 (rcu_read_lock){....}-{1:2}, at: rcu_read_lock include/linux/rcupdate.h:781 [inline] #1: ffffffff8e333f20 (rcu_read_lock){....}-{1:2}, at: rtnetlink_rcv_msg+0x208/0x1180 net/core/rtnetlink.c:6562 #2: ffffffff8e333f20 (rcu_read_lock){....}-{1:2}, at: rcu_lock_acquire include/linux/rcupdate.h:329 [inline] #2: ffffffff8e333f20 (rcu_read_lock){....}-{1:2}, at: rcu_read_lock include/linux/rcupdate.h:781 [inline] #2: ffffffff8e333f20 (rcu_read_lock){....}-{1:2}, at: rtnl_link_get_af_size net/core/rtnetlink.c:620 [inline] #2: ffffffff8e333f20 (rcu_read_lock){....}-{1:2}, at: if_nlmsg_size+0x53a/0x7a0 net/core/rtnetlink.c:1103 #3: ffff8880b943e858 (&rq->__lock){-.-.}-{2:2}, at: raw_spin_rq_lock_nested+0x2a/0x140 kernel/sched/core.c:559 #4: ffffffff8e333f20 (rcu_read_lock){....}-{1:2}, at: rcu_lock_acquire include/linux/rcupdate.h:329 [inline] #4: ffffffff8e333f20 (rcu_read_lock){....}-{1:2}, at: rcu_read_lock include/linux/rcupdate.h:781 [inline] #4: ffffffff8e333f20 (rcu_read_lock){....}-{1:2}, at: __bpf_trace_run kernel/trace/bpf_trace.c:2405 [inline] #4: ffffffff8e333f20 (rcu_read_lock){....}-{1:2}, at: bpf_trace_run2+0x1fc/0x540 kernel/trace/bpf_trace.c:2447 stack backtrace: CPU: 0 PID: 7947 Comm: syz.0.967 Not tainted 6.10.0-rc6-syzkaller-g7b769adc2612 #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 06/07/2024 Call Trace: __dump_stack lib/dump_stack.c:88 [inline] dump_stack_lvl+0x241/0x360 lib/dump_stack.c:114 check_noncircular+0x36a/0x4a0 kernel/locking/lockdep.c:2187 check_prev_add kernel/locking/lockdep.c:3134 [inline] check_prevs_add kernel/locking/lockdep.c:3253 [inline] validate_chain+0x18e0/0x5900 kernel/locking/lockdep.c:3869 __lock_acquire+0x1346/0x1fd0 kernel/locking/lockdep.c:5137 lock_acquire+0x1ed/0x550 kernel/locking/lockdep.c:5754 local_lock_acquire include/linux/local_lock_internal.h:29 [inline] __mmap_lock_do_trace_start_locking+0x9c/0x620 mm/mmap_lock.c:230 __mmap_lock_trace_start_locking include/linux/mmap_lock.h:29 [inline] mmap_read_trylock include/linux/mmap_lock.h:162 [inline] stack_map_get_build_id_offset+0x98a/0x9d0 kernel/bpf/stackmap.c:141 __bpf_get_stack+0x4ad/0x5a0 kernel/bpf/stackmap.c:449 ____bpf_get_stack_raw_tp kernel/trace/bpf_trace.c:1997 [inline] bpf_get_stack_raw_tp+0x1a3/0x240 kernel/trace/bpf_trace.c:1987 bpf_prog_ec3b2eefa702d8d3+0x42/0x46 bpf_dispatcher_nop_func include/linux/bpf.h:1243 [inline] __bpf_prog_run include/linux/filter.h:691 [inline] bpf_prog_run include/linux/filter.h:698 [inline] __bpf_trace_run kernel/trace/bpf_trace.c:2406 [inline] bpf_trace_run2+0x2ec/0x540 kernel/trace/bpf_trace.c:2447 trace_tlb_flush+0x118/0x140 include/trace/events/tlb.h:38 switch_mm_irqs_off+0x7cb/0xae0 context_switch kernel/sched/core.c:5392 [inline] __schedule+0x1066/0x4a20 kernel/sched/core.c:6745 preempt_schedule_irq+0xfb/0x1c0 kernel/sched/core.c:7067 irqentry_exit+0x5e/0x90 kernel/entry/common.c:354 asm_sysvec_apic_timer_interrupt+0x1a/0x20 arch/x86/include/asm/idtentry.h:702 RIP: 0010:if_nlmsg_size+0x645/0x7a0 net/core/rtnetlink.c:1103 Code: 2c 37 f8 4c 89 ef 8b 74 24 0c 49 89 db 41 ff d3 66 90 4d 8d 74 06 08 eb 05 e8 c7 2c 37 f8 48 89 e8 48 c1 e8 03 42 80 3c 38 00 <74> 08 48 89 ef e8 41 4b 9d f8 48 8b 6d 00 4c 39 e5 74 07 e8 a3 2c RSP: 0018:ffffc900133ff2c0 EFLAGS: 00000246 RAX: 1ffffffff1f5f1d8 RBX: ffffffff8a2d1940 RCX: 0000000000040000 RDX: ffffc90004469000 RSI: 00000000000029d0 RDI: 00000000000029d1 RBP: ffffffff8faf8ec0 R08: ffffffff8a2d19b3 R09: 1ffffffff25f7ab0 R10: dffffc0000000000 R11: ffffffff8a2d1940 R12: ffffffff8f5e9180 R13: ffff888067fc8000 R14: 00000000000000a0 R15: dffffc0000000000 rtnl_calcit net/core/rtnetlink.c:3998 [inline] rtnetlink_rcv_msg+0xf43/0x1180 net/core/rtnetlink.c:6580 netlink_rcv_skb+0x1e3/0x430 net/netlink/af_netlink.c:2550 netlink_unicast_kernel net/netlink/af_netlink.c:1331 [inline] netlink_unicast+0x7f0/0x990 net/netlink/af_netlink.c:1357 netlink_sendmsg+0x8e4/0xcb0 net/netlink/af_netlink.c:1901 sock_sendmsg_nosec net/socket.c:730 [inline] __sock_sendmsg+0x221/0x270 net/socket.c:745 ____sys_sendmsg+0x525/0x7d0 net/socket.c:2585 ___sys_sendmsg net/socket.c:2639 [inline] __sys_sendmsg+0x2b0/0x3a0 net/socket.c:2668 do_syscall_x64 arch/x86/entry/common.c:52 [inline] do_syscall_64+0xf3/0x230 arch/x86/entry/common.c:83 entry_SYSCALL_64_after_hwframe+0x77/0x7f RIP: 0033:0x7fca69d75bd9 Code: Unable to access opcode bytes at 0x7fca69d75baf. RSP: 002b:00007fca6ab19048 EFLAGS: 00000246 ORIG_RAX: 000000000000002e RAX: ffffffffffffffda RBX: 00007fca69f03f60 RCX: 00007fca69d75bd9 RDX: 0000000000000000 RSI: 0000000020000080 RDI: 0000000000000009 RBP: 00007fca69de4e60 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000 R13: 000000000000000b R14: 00007fca69f03f60 R15: 00007ffdc21a9128 netlink: 'syz.0.967': attribute type 29 has an invalid length. netlink: 'syz.0.967': attribute type 29 has an invalid length. ---------------- Code disassembly (best guess): 0: 2c 37 sub $0x37,%al 2: f8 clc 3: 4c 89 ef mov %r13,%rdi 6: 8b 74 24 0c mov 0xc(%rsp),%esi a: 49 89 db mov %rbx,%r11 d: 41 ff d3 call *%r11 10: 66 90 xchg %ax,%ax 12: 4d 8d 74 06 08 lea 0x8(%r14,%rax,1),%r14 17: eb 05 jmp 0x1e 19: e8 c7 2c 37 f8 call 0xf8372ce5 1e: 48 89 e8 mov %rbp,%rax 21: 48 c1 e8 03 shr $0x3,%rax 25: 42 80 3c 38 00 cmpb $0x0,(%rax,%r15,1) * 2a: 74 08 je 0x34 <-- trapping instruction 2c: 48 89 ef mov %rbp,%rdi 2f: e8 41 4b 9d f8 call 0xf89d4b75 34: 48 8b 6d 00 mov 0x0(%rbp),%rbp 38: 4c 39 e5 cmp %r12,%rbp 3b: 74 07 je 0x44 3d: e8 .byte 0xe8 3e: a3 .byte 0xa3 3f: 2c .byte 0x2c