Extracting prog: 1m38.618028864s Minimizing prog: 5m36.240856289s Simplifying prog options: 0s Extracting C: 1m7.252216307s Simplifying C: 4m18.013056414s 1 programs, 3 VMs, timeouts [15s 6m0s] extracting reproducer from 1 programs single: executing 1 programs separately with timeout 15s testing program (duration=15s, {Threaded:true Repeat:true RepeatTimes:0 Procs:5 Slowdown:1 Sandbox:none SandboxArg:0 Leak:false NetInjection:true NetDevices:true NetReset:true Cgroups:true BinfmtMisc:true CloseFDs:true KCSAN:false DevlinkPCI:false NicVF:false USB:true VhciInjection:true Wifi:true IEEE802154:true Sysctl:true Swap:true UseTmpDir:true HandleSegv:true Trace:false LegacyOptions:{Collide:false Fault:false FaultCall:0 FaultNth:0}}): socket$inet_mptcp-listen-socket$kcm-sendmsg$kcm detailed listing: executing program 0: r0 = socket$inet_mptcp(0x2, 0x1, 0x106) listen(r0, 0x0) r1 = socket$kcm(0x10, 0x2, 0x4) sendmsg$kcm(r1, &(0x7f0000000240)={0x0, 0x0, &(0x7f0000000140)=[{&(0x7f0000000280)="89000000120081ae08060cdc030000007f03e3f70000000000e2ffca1b1f0000000004c00e72f750375ed08a56331dbf9ed7815e381ad6e747033a0093b837dc6cc01e32efaec8c7a6ec00120800030006010000bdad446b9bbc7a46e3988285dcdf12f21308f868fece01955fed0009d78f0a947ee2b49e33538afa8af92347514f0b56a20ff27fff", 0x89}], 0x1}, 0x0) program crashed: possible deadlock in inet_sk_diag_fill single: successfully extracted reproducer found reproducer with 4 syscalls minimizing guilty program testing program (duration=22.5s, {Threaded:true Repeat:true RepeatTimes:0 Procs:5 Slowdown:1 Sandbox:none SandboxArg:0 Leak:false NetInjection:true NetDevices:true NetReset:true Cgroups:true BinfmtMisc:true CloseFDs:true KCSAN:false DevlinkPCI:false NicVF:false USB:true VhciInjection:true Wifi:true IEEE802154:true Sysctl:true Swap:true UseTmpDir:true HandleSegv:true Trace:false LegacyOptions:{Collide:false Fault:false FaultCall:0 FaultNth:0}}): socket$inet_mptcp-listen-socket$kcm detailed listing: executing program 0: r0 = socket$inet_mptcp(0x2, 0x1, 0x106) listen(r0, 0x0) socket$kcm(0x10, 0x2, 0x4) program did not crash testing program (duration=22.5s, {Threaded:true Repeat:true RepeatTimes:0 Procs:5 Slowdown:1 Sandbox:none SandboxArg:0 Leak:false NetInjection:true NetDevices:true NetReset:true Cgroups:true BinfmtMisc:true CloseFDs:true KCSAN:false DevlinkPCI:false NicVF:false USB:true VhciInjection:true Wifi:true IEEE802154:true Sysctl:true Swap:true UseTmpDir:true HandleSegv:true Trace:false LegacyOptions:{Collide:false Fault:false FaultCall:0 FaultNth:0}}): socket$inet_mptcp-listen-sendmsg$kcm detailed listing: executing program 0: r0 = socket$inet_mptcp(0x2, 0x1, 0x106) listen(r0, 0x0) sendmsg$kcm(0xffffffffffffffff, &(0x7f0000000240)={0x0, 0x0, &(0x7f0000000140)=[{&(0x7f0000000280)="89000000120081ae08060cdc030000007f03e3f70000000000e2ffca1b1f0000000004c00e72f750375ed08a56331dbf9ed7815e381ad6e747033a0093b837dc6cc01e32efaec8c7a6ec00120800030006010000bdad446b9bbc7a46e3988285dcdf12f21308f868fece01955fed0009d78f0a947ee2b49e33538afa8af92347514f0b56a20ff27fff", 0x89}], 0x1}, 0x0) program did not crash testing program (duration=22.5s, {Threaded:true Repeat:true RepeatTimes:0 Procs:5 Slowdown:1 Sandbox:none SandboxArg:0 Leak:false NetInjection:true NetDevices:true NetReset:true Cgroups:true BinfmtMisc:true CloseFDs:true KCSAN:false DevlinkPCI:false NicVF:false USB:true VhciInjection:true Wifi:true IEEE802154:true Sysctl:true Swap:true UseTmpDir:true HandleSegv:true Trace:false LegacyOptions:{Collide:false Fault:false FaultCall:0 FaultNth:0}}): socket$inet_mptcp-socket$kcm-sendmsg$kcm detailed listing: executing program 0: socket$inet_mptcp(0x2, 0x1, 0x106) r0 = socket$kcm(0x10, 0x2, 0x4) sendmsg$kcm(r0, &(0x7f0000000240)={0x0, 0x0, &(0x7f0000000140)=[{&(0x7f0000000280)="89000000120081ae08060cdc030000007f03e3f70000000000e2ffca1b1f0000000004c00e72f750375ed08a56331dbf9ed7815e381ad6e747033a0093b837dc6cc01e32efaec8c7a6ec00120800030006010000bdad446b9bbc7a46e3988285dcdf12f21308f868fece01955fed0009d78f0a947ee2b49e33538afa8af92347514f0b56a20ff27fff", 0x89}], 0x1}, 0x0) program did not crash testing program (duration=22.5s, {Threaded:true Repeat:true RepeatTimes:0 Procs:5 Slowdown:1 Sandbox:none SandboxArg:0 Leak:false NetInjection:true NetDevices:true NetReset:true Cgroups:true BinfmtMisc:true CloseFDs:true KCSAN:false DevlinkPCI:false NicVF:false USB:true VhciInjection:true Wifi:true IEEE802154:true Sysctl:true Swap:true UseTmpDir:true HandleSegv:true Trace:false LegacyOptions:{Collide:false Fault:false FaultCall:0 FaultNth:0}}): listen-socket$kcm-sendmsg$kcm detailed listing: executing program 0: listen(0xffffffffffffffff, 0x0) r0 = socket$kcm(0x10, 0x2, 0x4) sendmsg$kcm(r0, &(0x7f0000000240)={0x0, 0x0, &(0x7f0000000140)=[{&(0x7f0000000280)="89000000120081ae08060cdc030000007f03e3f70000000000e2ffca1b1f0000000004c00e72f750375ed08a56331dbf9ed7815e381ad6e747033a0093b837dc6cc01e32efaec8c7a6ec00120800030006010000bdad446b9bbc7a46e3988285dcdf12f21308f868fece01955fed0009d78f0a947ee2b49e33538afa8af92347514f0b56a20ff27fff", 0x89}], 0x1}, 0x0) program did not crash testing program (duration=22.5s, {Threaded:true Repeat:true RepeatTimes:0 Procs:5 Slowdown:1 Sandbox:none SandboxArg:0 Leak:false NetInjection:true NetDevices:true NetReset:true Cgroups:true BinfmtMisc:true CloseFDs:true KCSAN:false DevlinkPCI:false NicVF:false USB:true VhciInjection:true Wifi:true IEEE802154:true Sysctl:true Swap:true UseTmpDir:true HandleSegv:true Trace:false LegacyOptions:{Collide:false Fault:false FaultCall:0 FaultNth:0}}): socket$inet_mptcp-listen-socket$kcm-sendmsg$kcm detailed listing: executing program 0: r0 = socket$inet_mptcp(0x2, 0x1, 0x106) listen(r0, 0x0) r1 = socket$kcm(0x10, 0x2, 0x4) sendmsg$kcm(r1, 0x0, 0x0) program did not crash testing program (duration=22.5s, {Threaded:true Repeat:true RepeatTimes:0 Procs:5 Slowdown:1 Sandbox:none SandboxArg:0 Leak:false NetInjection:true NetDevices:true NetReset:true Cgroups:true BinfmtMisc:true CloseFDs:true KCSAN:false DevlinkPCI:false NicVF:false USB:true VhciInjection:true Wifi:true IEEE802154:true Sysctl:true Swap:true UseTmpDir:true HandleSegv:true Trace:false LegacyOptions:{Collide:false Fault:false FaultCall:0 FaultNth:0}}): socket$inet_mptcp-listen-socket$kcm-sendmsg$kcm detailed listing: executing program 0: r0 = socket$inet_mptcp(0x2, 0x1, 0x106) listen(r0, 0x0) r1 = socket$kcm(0x10, 0x2, 0x4) sendmsg$kcm(r1, &(0x7f0000000240)={0x0, 0x0, 0x0}, 0x0) program did not crash testing program (duration=22.5s, {Threaded:true Repeat:true RepeatTimes:0 Procs:5 Slowdown:1 Sandbox:none SandboxArg:0 Leak:false NetInjection:true NetDevices:true NetReset:true Cgroups:true BinfmtMisc:true CloseFDs:true KCSAN:false DevlinkPCI:false NicVF:false USB:true VhciInjection:true Wifi:true IEEE802154:true Sysctl:true Swap:true UseTmpDir:true HandleSegv:true Trace:false LegacyOptions:{Collide:false Fault:false FaultCall:0 FaultNth:0}}): socket$inet_mptcp-listen-socket$kcm-sendmsg$kcm detailed listing: executing program 0: r0 = socket$inet_mptcp(0x2, 0x1, 0x106) listen(r0, 0x0) r1 = socket$kcm(0x10, 0x2, 0x4) sendmsg$kcm(r1, &(0x7f0000000240)={0x0, 0x0, &(0x7f0000000140)=[{0x0}], 0x1}, 0x0) program did not crash testing program (duration=22.5s, {Threaded:true Repeat:true RepeatTimes:0 Procs:5 Slowdown:1 Sandbox:none SandboxArg:0 Leak:false NetInjection:true NetDevices:true NetReset:true Cgroups:true BinfmtMisc:true CloseFDs:true KCSAN:false DevlinkPCI:false NicVF:false USB:true VhciInjection:true Wifi:true IEEE802154:true Sysctl:true Swap:true UseTmpDir:true HandleSegv:true Trace:false LegacyOptions:{Collide:false Fault:false FaultCall:0 FaultNth:0}}): socket$inet_mptcp-listen-socket$kcm-sendmsg$kcm detailed listing: executing program 0: r0 = socket$inet_mptcp(0x2, 0x1, 0x106) listen(r0, 0x0) r1 = socket$kcm(0x10, 0x2, 0x4) sendmsg$kcm(r1, &(0x7f0000000240)={0x0, 0x0, &(0x7f0000000140)=[{&(0x7f0000000280)}], 0x1}, 0x0) program did not crash extracting C reproducer testing compiled C program (duration=22.5s, {Threaded:true Repeat:true RepeatTimes:0 Procs:5 Slowdown:1 Sandbox:none SandboxArg:0 Leak:false NetInjection:true NetDevices:true NetReset:true Cgroups:true BinfmtMisc:true CloseFDs:true KCSAN:false DevlinkPCI:false NicVF:false USB:true VhciInjection:true Wifi:true IEEE802154:true Sysctl:true Swap:true UseTmpDir:true HandleSegv:true Trace:false LegacyOptions:{Collide:false Fault:false FaultCall:0 FaultNth:0}}): socket$inet_mptcp-listen-socket$kcm-sendmsg$kcm program crashed: possible deadlock in inet_sk_diag_fill simplifying C reproducer testing compiled C program (duration=22.5s, {Threaded:false Repeat:true RepeatTimes:0 Procs:5 Slowdown:1 Sandbox:none SandboxArg:0 Leak:false NetInjection:true NetDevices:true NetReset:true Cgroups:true BinfmtMisc:true CloseFDs:true KCSAN:false DevlinkPCI:false NicVF:false USB:true VhciInjection:true Wifi:true IEEE802154:true Sysctl:true Swap:true UseTmpDir:true HandleSegv:true Trace:false LegacyOptions:{Collide:false Fault:false FaultCall:0 FaultNth:0}}): socket$inet_mptcp-listen-socket$kcm-sendmsg$kcm program crashed: possible deadlock in inet_sk_diag_fill testing compiled C program (duration=22.5s, {Threaded:false Repeat:false RepeatTimes:0 Procs:1 Slowdown:1 Sandbox:none SandboxArg:0 Leak:false NetInjection:true NetDevices:true NetReset:false Cgroups:false BinfmtMisc:true CloseFDs:true KCSAN:false DevlinkPCI:false NicVF:false USB:true VhciInjection:true Wifi:true IEEE802154:true Sysctl:true Swap:true UseTmpDir:true HandleSegv:true Trace:false LegacyOptions:{Collide:false Fault:false FaultCall:0 FaultNth:0}}): socket$inet_mptcp-listen-socket$kcm-sendmsg$kcm program crashed: possible deadlock in inet_sk_diag_fill testing compiled C program (duration=22.5s, {Threaded:false Repeat:false RepeatTimes:0 Procs:1 Slowdown:1 Sandbox: SandboxArg:0 Leak:false NetInjection:false NetDevices:false NetReset:false Cgroups:false BinfmtMisc:false CloseFDs:false KCSAN:false DevlinkPCI:false NicVF:false USB:false VhciInjection:false Wifi:false IEEE802154:true Sysctl:true Swap:false UseTmpDir:true HandleSegv:true Trace:false LegacyOptions:{Collide:false Fault:false FaultCall:0 FaultNth:0}}): socket$inet_mptcp-listen-socket$kcm-sendmsg$kcm program crashed: possible deadlock in inet_sk_diag_fill testing compiled C program (duration=22.5s, {Threaded:false Repeat:false RepeatTimes:0 Procs:1 Slowdown:1 Sandbox: SandboxArg:0 Leak:false NetInjection:false NetDevices:false NetReset:false Cgroups:false BinfmtMisc:false CloseFDs:false KCSAN:false DevlinkPCI:false NicVF:false USB:false VhciInjection:false Wifi:false IEEE802154:false Sysctl:true Swap:false UseTmpDir:true HandleSegv:true Trace:false LegacyOptions:{Collide:false Fault:false FaultCall:0 FaultNth:0}}): socket$inet_mptcp-listen-socket$kcm-sendmsg$kcm program crashed: possible deadlock in inet_sk_diag_fill testing compiled C program (duration=22.5s, {Threaded:false Repeat:false RepeatTimes:0 Procs:1 Slowdown:1 Sandbox: SandboxArg:0 Leak:false NetInjection:false NetDevices:false NetReset:false Cgroups:false BinfmtMisc:false CloseFDs:false KCSAN:false DevlinkPCI:false NicVF:false USB:false VhciInjection:false Wifi:false IEEE802154:false Sysctl:true Swap:false UseTmpDir:false HandleSegv:true Trace:false LegacyOptions:{Collide:false Fault:false FaultCall:0 FaultNth:0}}): socket$inet_mptcp-listen-socket$kcm-sendmsg$kcm program crashed: possible deadlock in inet_sk_diag_fill testing compiled C program (duration=22.5s, {Threaded:false Repeat:false RepeatTimes:0 Procs:1 Slowdown:1 Sandbox: SandboxArg:0 Leak:false NetInjection:false NetDevices:false NetReset:false Cgroups:false BinfmtMisc:false CloseFDs:false KCSAN:false DevlinkPCI:false NicVF:false USB:false VhciInjection:false Wifi:false IEEE802154:false Sysctl:true Swap:false UseTmpDir:false HandleSegv:false Trace:false LegacyOptions:{Collide:false Fault:false FaultCall:0 FaultNth:0}}): socket$inet_mptcp-listen-socket$kcm-sendmsg$kcm program crashed: possible deadlock in inet_sk_diag_fill testing compiled C program (duration=22.5s, {Threaded:false Repeat:false RepeatTimes:0 Procs:1 Slowdown:1 Sandbox: SandboxArg:0 Leak:false NetInjection:false NetDevices:false NetReset:false Cgroups:false BinfmtMisc:false CloseFDs:false KCSAN:false DevlinkPCI:false NicVF:false USB:false VhciInjection:false Wifi:false IEEE802154:false Sysctl:false Swap:false UseTmpDir:false HandleSegv:false Trace:false LegacyOptions:{Collide:false Fault:false FaultCall:0 FaultNth:0}}): socket$inet_mptcp-listen-socket$kcm-sendmsg$kcm program crashed: possible deadlock in inet_sk_diag_fill reproducing took 12m40.124174114s repro crashed as (corrupted=false): ====================================================== WARNING: possible circular locking dependency detected 5.15.160-syzkaller #0 Not tainted ------------------------------------------------------ syz-executor338/3966 is trying to acquire lock: ffff0000c93f0120 (sk_lock-AF_INET){+.+.}-{0:0}, at: inet_sk_diag_fill+0xcb8/0x17b4 net/ipv4/inet_diag.c:342 but task is already holding lock: ffff0000c54895b8 (&h->lhash2[i].lock){+.+.}-{2:2}, at: spin_lock include/linux/spinlock.h:363 [inline] ffff0000c54895b8 (&h->lhash2[i].lock){+.+.}-{2:2}, at: mptcp_diag_dump_listeners net/mptcp/mptcp_diag.c:95 [inline] ffff0000c54895b8 (&h->lhash2[i].lock){+.+.}-{2:2}, at: mptcp_diag_dump+0x7b0/0x10dc net/mptcp/mptcp_diag.c:194 which lock already depends on the new lock. the existing dependency chain (in reverse order) is: -> #1 (&h->lhash2[i].lock){+.+.}-{2:2}: __raw_spin_lock include/linux/spinlock_api_smp.h:142 [inline] _raw_spin_lock+0xb0/0x10c kernel/locking/spinlock.c:154 spin_lock include/linux/spinlock.h:363 [inline] __inet_hash+0xd8/0x754 net/ipv4/inet_hashtables.c:606 inet_hash+0x74/0x9c net/ipv4/inet_hashtables.c:631 inet_csk_listen_start+0x1e8/0x2cc net/ipv4/inet_connection_sock.c:1098 inet_listen+0x258/0x6d4 net/ipv4/af_inet.c:231 __sys_listen+0x1ac/0x21c net/socket.c:1749 __do_sys_listen net/socket.c:1758 [inline] __se_sys_listen net/socket.c:1756 [inline] __arm64_sys_listen+0x5c/0x74 net/socket.c:1756 __invoke_syscall arch/arm64/kernel/syscall.c:38 [inline] invoke_syscall+0x98/0x2b8 arch/arm64/kernel/syscall.c:52 el0_svc_common+0x138/0x258 arch/arm64/kernel/syscall.c:142 do_el0_svc+0x58/0x14c arch/arm64/kernel/syscall.c:181 el0_svc+0x7c/0x1f0 arch/arm64/kernel/entry-common.c:608 el0t_64_sync_handler+0x84/0xe4 arch/arm64/kernel/entry-common.c:626 el0t_64_sync+0x1a0/0x1a4 arch/arm64/kernel/entry.S:584 -> #0 (sk_lock-AF_INET){+.+.}-{0:0}: check_prev_add kernel/locking/lockdep.c:3053 [inline] check_prevs_add kernel/locking/lockdep.c:3172 [inline] validate_chain kernel/locking/lockdep.c:3788 [inline] __lock_acquire+0x32d4/0x7638 kernel/locking/lockdep.c:5012 lock_acquire+0x240/0x77c kernel/locking/lockdep.c:5623 lock_sock_fast include/net/sock.h:1700 [inline] mptcp_diag_get_info+0x208/0x8a0 net/mptcp/mptcp_diag.c:224 inet_sk_diag_fill+0xcb8/0x17b4 net/ipv4/inet_diag.c:342 sk_diag_dump net/mptcp/mptcp_diag.c:24 [inline] mptcp_diag_dump_listeners net/mptcp/mptcp_diag.c:122 [inline] mptcp_diag_dump+0xb4c/0x10dc net/mptcp/mptcp_diag.c:194 __inet_diag_dump+0x1e8/0x33c net/ipv4/inet_diag.c:1179 inet_diag_dump_compat+0x17c/0x288 net/ipv4/inet_diag.c:1287 netlink_dump+0x470/0xa88 net/netlink/af_netlink.c:2282 __netlink_dump_start+0x488/0x6ec net/netlink/af_netlink.c:2387 netlink_dump_start include/linux/netlink.h:258 [inline] inet_diag_rcv_msg_compat+0x1c8/0x41c net/ipv4/inet_diag.c:1321 sock_diag_rcv_msg+0x174/0x39c netlink_rcv_skb+0x20c/0x3b8 net/netlink/af_netlink.c:2508 sock_diag_rcv+0x3c/0x54 net/core/sock_diag.c:276 netlink_unicast_kernel net/netlink/af_netlink.c:1330 [inline] netlink_unicast+0x664/0x938 net/netlink/af_netlink.c:1356 netlink_sendmsg+0x844/0xb38 net/netlink/af_netlink.c:1924 sock_sendmsg_nosec net/socket.c:704 [inline] __sock_sendmsg net/socket.c:716 [inline] ____sys_sendmsg+0x584/0x870 net/socket.c:2431 ___sys_sendmsg+0x214/0x294 net/socket.c:2485 __sys_sendmsg net/socket.c:2514 [inline] __do_sys_sendmsg net/socket.c:2523 [inline] __se_sys_sendmsg net/socket.c:2521 [inline] __arm64_sys_sendmsg+0x1ac/0x25c net/socket.c:2521 __invoke_syscall arch/arm64/kernel/syscall.c:38 [inline] invoke_syscall+0x98/0x2b8 arch/arm64/kernel/syscall.c:52 el0_svc_common+0x138/0x258 arch/arm64/kernel/syscall.c:142 do_el0_svc+0x58/0x14c arch/arm64/kernel/syscall.c:181 el0_svc+0x7c/0x1f0 arch/arm64/kernel/entry-common.c:608 el0t_64_sync_handler+0x84/0xe4 arch/arm64/kernel/entry-common.c:626 el0t_64_sync+0x1a0/0x1a4 arch/arm64/kernel/entry.S:584 other info that might help us debug this: Possible unsafe locking scenario: CPU0 CPU1 ---- ---- lock(&h->lhash2[i].lock); lock(sk_lock-AF_INET); lock(&h->lhash2[i].lock); lock(sk_lock-AF_INET); *** DEADLOCK *** 6 locks held by syz-executor338/3966: #0: ffff800016a508c8 (sock_diag_mutex){+.+.}-{3:3}, at: sock_diag_rcv+0x2c/0x54 net/core/sock_diag.c:275 #1: ffff800016a50728 (sock_diag_table_mutex){+.+.}-{3:3}, at: sock_diag_rcv_msg+0x15c/0x39c net/core/sock_diag.c:255 #2: ffff0000c1cba690 (nlk_cb_mutex-SOCK_DIAG){+.+.}-{3:3}, at: netlink_dump+0xbc/0xa88 net/netlink/af_netlink.c:2229 #3: ffff800016b29e48 (inet_diag_table_mutex){+.+.}-{3:3}, at: inet_diag_lock_handler net/ipv4/inet_diag.c:63 [inline] #3: ffff800016b29e48 (inet_diag_table_mutex){+.+.}-{3:3}, at: __inet_diag_dump+0x17c/0x33c net/ipv4/inet_diag.c:1177 #4: ffff800014b214a0 (rcu_read_lock){....}-{1:2}, at: rcu_lock_acquire+0x10/0x4c include/linux/rcupdate.h:311 #5: ffff0000c54895b8 (&h->lhash2[i].lock){+.+.}-{2:2}, at: spin_lock include/linux/spinlock.h:363 [inline] #5: ffff0000c54895b8 (&h->lhash2[i].lock){+.+.}-{2:2}, at: mptcp_diag_dump_listeners net/mptcp/mptcp_diag.c:95 [inline] #5: ffff0000c54895b8 (&h->lhash2[i].lock){+.+.}-{2:2}, at: mptcp_diag_dump+0x7b0/0x10dc net/mptcp/mptcp_diag.c:194 stack backtrace: CPU: 0 PID: 3966 Comm: syz-executor338 Not tainted 5.15.160-syzkaller #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 04/02/2024 Call trace: dump_backtrace+0x0/0x530 arch/arm64/kernel/stacktrace.c:152 show_stack+0x2c/0x3c arch/arm64/kernel/stacktrace.c:216 __dump_stack lib/dump_stack.c:88 [inline] dump_stack_lvl+0x108/0x170 lib/dump_stack.c:106 dump_stack+0x1c/0x58 lib/dump_stack.c:113 print_circular_bug+0x150/0x1b8 kernel/locking/lockdep.c:2011 check_noncircular+0x2cc/0x378 kernel/locking/lockdep.c:2133 check_prev_add kernel/locking/lockdep.c:3053 [inline] check_prevs_add kernel/locking/lockdep.c:3172 [inline] validate_chain kernel/locking/lockdep.c:3788 [inline] __lock_acquire+0x32d4/0x7638 kernel/locking/lockdep.c:5012 lock_acquire+0x240/0x77c kernel/locking/lockdep.c:5623 lock_sock_fast include/net/sock.h:1700 [inline] mptcp_diag_get_info+0x208/0x8a0 net/mptcp/mptcp_diag.c:224 inet_sk_diag_fill+0xcb8/0x17b4 net/ipv4/inet_diag.c:342 sk_diag_dump net/mptcp/mptcp_diag.c:24 [inline] mptcp_diag_dump_listeners net/mptcp/mptcp_diag.c:122 [inline] mptcp_diag_dump+0xb4c/0x10dc net/mptcp/mptcp_diag.c:194 __inet_diag_dump+0x1e8/0x33c net/ipv4/inet_diag.c:1179 inet_diag_dump_compat+0x17c/0x288 net/ipv4/inet_diag.c:1287 netlink_dump+0x470/0xa88 net/netlink/af_netlink.c:2282 __netlink_dump_start+0x488/0x6ec net/netlink/af_netlink.c:2387 netlink_dump_start include/linux/netlink.h:258 [inline] inet_diag_rcv_msg_compat+0x1c8/0x41c net/ipv4/inet_diag.c:1321 sock_diag_rcv_msg+0x174/0x39c netlink_rcv_skb+0x20c/0x3b8 net/netlink/af_netlink.c:2508 sock_diag_rcv+0x3c/0x54 net/core/sock_diag.c:276 netlink_unicast_kernel net/netlink/af_netlink.c:1330 [inline] netlink_unicast+0x664/0x938 net/netlink/af_netlink.c:1356 netlink_sendmsg+0x844/0xb38 net/netlink/af_netlink.c:1924 sock_sendmsg_nosec net/socket.c:704 [inline] __sock_sendmsg net/socket.c:716 [inline] ____sys_sendmsg+0x584/0x870 net/socket.c:2431 ___sys_sendmsg+0x214/0x294 net/socket.c:2485 __sys_sendmsg net/socket.c:2514 [inline] __do_sys_sendmsg net/socket.c:2523 [inline] __se_sys_sendmsg net/socket.c:2521 [inline] __arm64_sys_sendmsg+0x1ac/0x25c net/socket.c:2521 __invoke_syscall arch/arm64/kernel/syscall.c:38 [inline] invoke_syscall+0x98/0x2b8 arch/arm64/kernel/syscall.c:52 el0_svc_common+0x138/0x258 arch/arm64/kernel/syscall.c:142 do_el0_svc+0x58/0x14c arch/arm64/kernel/syscall.c:181 el0_svc+0x7c/0x1f0 arch/arm64/kernel/entry-common.c:608 el0t_64_sync_handler+0x84/0xe4 arch/arm64/kernel/entry-common.c:626 el0t_64_sync+0x1a0/0x1a4 arch/arm64/kernel/entry.S:584 BUG: sleeping function called from invalid context at net/core/sock.c:3282 in_atomic(): 1, irqs_disabled(): 0, non_block: 0, pid: 3966, name: syz-executor338 INFO: lockdep is turned off. Preemption disabled at: [] spin_lock include/linux/spinlock.h:363 [inline] [] mptcp_diag_dump_listeners net/mptcp/mptcp_diag.c:95 [inline] [] mptcp_diag_dump+0x7b0/0x10dc net/mptcp/mptcp_diag.c:194 CPU: 0 PID: 3966 Comm: syz-executor338 Not tainted 5.15.160-syzkaller #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 04/02/2024 Call trace: dump_backtrace+0x0/0x530 arch/arm64/kernel/stacktrace.c:152 show_stack+0x2c/0x3c arch/arm64/kernel/stacktrace.c:216 __dump_stack lib/dump_stack.c:88 [inline] dump_stack_lvl+0x108/0x170 lib/dump_stack.c:106 dump_stack+0x1c/0x58 lib/dump_stack.c:113 ___might final repro crashed as (corrupted=false): ====================================================== WARNING: possible circular locking dependency detected 5.15.160-syzkaller #0 Not tainted ------------------------------------------------------ syz-executor338/3966 is trying to acquire lock: ffff0000c93f0120 (sk_lock-AF_INET){+.+.}-{0:0}, at: inet_sk_diag_fill+0xcb8/0x17b4 net/ipv4/inet_diag.c:342 but task is already holding lock: ffff0000c54895b8 (&h->lhash2[i].lock){+.+.}-{2:2}, at: spin_lock include/linux/spinlock.h:363 [inline] ffff0000c54895b8 (&h->lhash2[i].lock){+.+.}-{2:2}, at: mptcp_diag_dump_listeners net/mptcp/mptcp_diag.c:95 [inline] ffff0000c54895b8 (&h->lhash2[i].lock){+.+.}-{2:2}, at: mptcp_diag_dump+0x7b0/0x10dc net/mptcp/mptcp_diag.c:194 which lock already depends on the new lock. the existing dependency chain (in reverse order) is: -> #1 (&h->lhash2[i].lock){+.+.}-{2:2}: __raw_spin_lock include/linux/spinlock_api_smp.h:142 [inline] _raw_spin_lock+0xb0/0x10c kernel/locking/spinlock.c:154 spin_lock include/linux/spinlock.h:363 [inline] __inet_hash+0xd8/0x754 net/ipv4/inet_hashtables.c:606 inet_hash+0x74/0x9c net/ipv4/inet_hashtables.c:631 inet_csk_listen_start+0x1e8/0x2cc net/ipv4/inet_connection_sock.c:1098 inet_listen+0x258/0x6d4 net/ipv4/af_inet.c:231 __sys_listen+0x1ac/0x21c net/socket.c:1749 __do_sys_listen net/socket.c:1758 [inline] __se_sys_listen net/socket.c:1756 [inline] __arm64_sys_listen+0x5c/0x74 net/socket.c:1756 __invoke_syscall arch/arm64/kernel/syscall.c:38 [inline] invoke_syscall+0x98/0x2b8 arch/arm64/kernel/syscall.c:52 el0_svc_common+0x138/0x258 arch/arm64/kernel/syscall.c:142 do_el0_svc+0x58/0x14c arch/arm64/kernel/syscall.c:181 el0_svc+0x7c/0x1f0 arch/arm64/kernel/entry-common.c:608 el0t_64_sync_handler+0x84/0xe4 arch/arm64/kernel/entry-common.c:626 el0t_64_sync+0x1a0/0x1a4 arch/arm64/kernel/entry.S:584 -> #0 (sk_lock-AF_INET){+.+.}-{0:0}: check_prev_add kernel/locking/lockdep.c:3053 [inline] check_prevs_add kernel/locking/lockdep.c:3172 [inline] validate_chain kernel/locking/lockdep.c:3788 [inline] __lock_acquire+0x32d4/0x7638 kernel/locking/lockdep.c:5012 lock_acquire+0x240/0x77c kernel/locking/lockdep.c:5623 lock_sock_fast include/net/sock.h:1700 [inline] mptcp_diag_get_info+0x208/0x8a0 net/mptcp/mptcp_diag.c:224 inet_sk_diag_fill+0xcb8/0x17b4 net/ipv4/inet_diag.c:342 sk_diag_dump net/mptcp/mptcp_diag.c:24 [inline] mptcp_diag_dump_listeners net/mptcp/mptcp_diag.c:122 [inline] mptcp_diag_dump+0xb4c/0x10dc net/mptcp/mptcp_diag.c:194 __inet_diag_dump+0x1e8/0x33c net/ipv4/inet_diag.c:1179 inet_diag_dump_compat+0x17c/0x288 net/ipv4/inet_diag.c:1287 netlink_dump+0x470/0xa88 net/netlink/af_netlink.c:2282 __netlink_dump_start+0x488/0x6ec net/netlink/af_netlink.c:2387 netlink_dump_start include/linux/netlink.h:258 [inline] inet_diag_rcv_msg_compat+0x1c8/0x41c net/ipv4/inet_diag.c:1321 sock_diag_rcv_msg+0x174/0x39c netlink_rcv_skb+0x20c/0x3b8 net/netlink/af_netlink.c:2508 sock_diag_rcv+0x3c/0x54 net/core/sock_diag.c:276 netlink_unicast_kernel net/netlink/af_netlink.c:1330 [inline] netlink_unicast+0x664/0x938 net/netlink/af_netlink.c:1356 netlink_sendmsg+0x844/0xb38 net/netlink/af_netlink.c:1924 sock_sendmsg_nosec net/socket.c:704 [inline] __sock_sendmsg net/socket.c:716 [inline] ____sys_sendmsg+0x584/0x870 net/socket.c:2431 ___sys_sendmsg+0x214/0x294 net/socket.c:2485 __sys_sendmsg net/socket.c:2514 [inline] __do_sys_sendmsg net/socket.c:2523 [inline] __se_sys_sendmsg net/socket.c:2521 [inline] __arm64_sys_sendmsg+0x1ac/0x25c net/socket.c:2521 __invoke_syscall arch/arm64/kernel/syscall.c:38 [inline] invoke_syscall+0x98/0x2b8 arch/arm64/kernel/syscall.c:52 el0_svc_common+0x138/0x258 arch/arm64/kernel/syscall.c:142 do_el0_svc+0x58/0x14c arch/arm64/kernel/syscall.c:181 el0_svc+0x7c/0x1f0 arch/arm64/kernel/entry-common.c:608 el0t_64_sync_handler+0x84/0xe4 arch/arm64/kernel/entry-common.c:626 el0t_64_sync+0x1a0/0x1a4 arch/arm64/kernel/entry.S:584 other info that might help us debug this: Possible unsafe locking scenario: CPU0 CPU1 ---- ---- lock(&h->lhash2[i].lock); lock(sk_lock-AF_INET); lock(&h->lhash2[i].lock); lock(sk_lock-AF_INET); *** DEADLOCK *** 6 locks held by syz-executor338/3966: #0: ffff800016a508c8 (sock_diag_mutex){+.+.}-{3:3}, at: sock_diag_rcv+0x2c/0x54 net/core/sock_diag.c:275 #1: ffff800016a50728 (sock_diag_table_mutex){+.+.}-{3:3}, at: sock_diag_rcv_msg+0x15c/0x39c net/core/sock_diag.c:255 #2: ffff0000c1cba690 (nlk_cb_mutex-SOCK_DIAG){+.+.}-{3:3}, at: netlink_dump+0xbc/0xa88 net/netlink/af_netlink.c:2229 #3: ffff800016b29e48 (inet_diag_table_mutex){+.+.}-{3:3}, at: inet_diag_lock_handler net/ipv4/inet_diag.c:63 [inline] #3: ffff800016b29e48 (inet_diag_table_mutex){+.+.}-{3:3}, at: __inet_diag_dump+0x17c/0x33c net/ipv4/inet_diag.c:1177 #4: ffff800014b214a0 (rcu_read_lock){....}-{1:2}, at: rcu_lock_acquire+0x10/0x4c include/linux/rcupdate.h:311 #5: ffff0000c54895b8 (&h->lhash2[i].lock){+.+.}-{2:2}, at: spin_lock include/linux/spinlock.h:363 [inline] #5: ffff0000c54895b8 (&h->lhash2[i].lock){+.+.}-{2:2}, at: mptcp_diag_dump_listeners net/mptcp/mptcp_diag.c:95 [inline] #5: ffff0000c54895b8 (&h->lhash2[i].lock){+.+.}-{2:2}, at: mptcp_diag_dump+0x7b0/0x10dc net/mptcp/mptcp_diag.c:194 stack backtrace: CPU: 0 PID: 3966 Comm: syz-executor338 Not tainted 5.15.160-syzkaller #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 04/02/2024 Call trace: dump_backtrace+0x0/0x530 arch/arm64/kernel/stacktrace.c:152 show_stack+0x2c/0x3c arch/arm64/kernel/stacktrace.c:216 __dump_stack lib/dump_stack.c:88 [inline] dump_stack_lvl+0x108/0x170 lib/dump_stack.c:106 dump_stack+0x1c/0x58 lib/dump_stack.c:113 print_circular_bug+0x150/0x1b8 kernel/locking/lockdep.c:2011 check_noncircular+0x2cc/0x378 kernel/locking/lockdep.c:2133 check_prev_add kernel/locking/lockdep.c:3053 [inline] check_prevs_add kernel/locking/lockdep.c:3172 [inline] validate_chain kernel/locking/lockdep.c:3788 [inline] __lock_acquire+0x32d4/0x7638 kernel/locking/lockdep.c:5012 lock_acquire+0x240/0x77c kernel/locking/lockdep.c:5623 lock_sock_fast include/net/sock.h:1700 [inline] mptcp_diag_get_info+0x208/0x8a0 net/mptcp/mptcp_diag.c:224 inet_sk_diag_fill+0xcb8/0x17b4 net/ipv4/inet_diag.c:342 sk_diag_dump net/mptcp/mptcp_diag.c:24 [inline] mptcp_diag_dump_listeners net/mptcp/mptcp_diag.c:122 [inline] mptcp_diag_dump+0xb4c/0x10dc net/mptcp/mptcp_diag.c:194 __inet_diag_dump+0x1e8/0x33c net/ipv4/inet_diag.c:1179 inet_diag_dump_compat+0x17c/0x288 net/ipv4/inet_diag.c:1287 netlink_dump+0x470/0xa88 net/netlink/af_netlink.c:2282 __netlink_dump_start+0x488/0x6ec net/netlink/af_netlink.c:2387 netlink_dump_start include/linux/netlink.h:258 [inline] inet_diag_rcv_msg_compat+0x1c8/0x41c net/ipv4/inet_diag.c:1321 sock_diag_rcv_msg+0x174/0x39c netlink_rcv_skb+0x20c/0x3b8 net/netlink/af_netlink.c:2508 sock_diag_rcv+0x3c/0x54 net/core/sock_diag.c:276 netlink_unicast_kernel net/netlink/af_netlink.c:1330 [inline] netlink_unicast+0x664/0x938 net/netlink/af_netlink.c:1356 netlink_sendmsg+0x844/0xb38 net/netlink/af_netlink.c:1924 sock_sendmsg_nosec net/socket.c:704 [inline] __sock_sendmsg net/socket.c:716 [inline] ____sys_sendmsg+0x584/0x870 net/socket.c:2431 ___sys_sendmsg+0x214/0x294 net/socket.c:2485 __sys_sendmsg net/socket.c:2514 [inline] __do_sys_sendmsg net/socket.c:2523 [inline] __se_sys_sendmsg net/socket.c:2521 [inline] __arm64_sys_sendmsg+0x1ac/0x25c net/socket.c:2521 __invoke_syscall arch/arm64/kernel/syscall.c:38 [inline] invoke_syscall+0x98/0x2b8 arch/arm64/kernel/syscall.c:52 el0_svc_common+0x138/0x258 arch/arm64/kernel/syscall.c:142 do_el0_svc+0x58/0x14c arch/arm64/kernel/syscall.c:181 el0_svc+0x7c/0x1f0 arch/arm64/kernel/entry-common.c:608 el0t_64_sync_handler+0x84/0xe4 arch/arm64/kernel/entry-common.c:626 el0t_64_sync+0x1a0/0x1a4 arch/arm64/kernel/entry.S:584 BUG: sleeping function called from invalid context at net/core/sock.c:3282 in_atomic(): 1, irqs_disabled(): 0, non_block: 0, pid: 3966, name: syz-executor338 INFO: lockdep is turned off. Preemption disabled at: [] spin_lock include/linux/spinlock.h:363 [inline] [] mptcp_diag_dump_listeners net/mptcp/mptcp_diag.c:95 [inline] [] mptcp_diag_dump+0x7b0/0x10dc net/mptcp/mptcp_diag.c:194 CPU: 0 PID: 3966 Comm: syz-executor338 Not tainted 5.15.160-syzkaller #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 04/02/2024 Call trace: dump_backtrace+0x0/0x530 arch/arm64/kernel/stacktrace.c:152 show_stack+0x2c/0x3c arch/arm64/kernel/stacktrace.c:216 __dump_stack lib/dump_stack.c:88 [inline] dump_stack_lvl+0x108/0x170 lib/dump_stack.c:106 dump_stack+0x1c/0x58 lib/dump_stack.c:113 ___might