Vulnerability · Published Apr 16, 2025 · Assigned by Linux

CVE-2025-22077Revert "smb: client: fix TCP timers deadlock after rmmod"

Critical 9.8

In plain English

A critical-severity security flaw in Linux from Linux. There are no confirmed reports of exploitation so far. The chance it is exploited in the next 30 days is estimated at 0.4% (higher than 32% of all known vulnerabilities). Fixed versions are available - upgrade the affected package.

Severity (CVSS 3.1)9.8Critical
Exploit odds (30 days)0.4%top 67.9% of all CVEs
Exploited in the wildNo reportsCISA SSVC: none
Attack toolingNoneno public tooling known

Official description

In the Linux kernel, the following vulnerability has been resolved: Revert "smb: client: fix TCP timers deadlock after rmmod" This reverts commit e9f2517a3e18a54a3943c098d2226b245d488801. Commit e9f2517a3e18 ("smb: client: fix TCP timers deadlock after rmmod") is intended to fix a null-ptr-deref in LOCKDEP, which is mentioned as CVE-2024-54680, but is actually did not fix anything; The issue can be reproduced on top of it. [0] Also, it reverted the change by commit ef7134c7fc48 ("smb: client: Fix use-after-free of network namespace.") and introduced a real issue by reviving the kernel TCP socket. When a reconnect happens for a CIFS connection, the socket state transitions to FIN_WAIT_1. Then, inet_csk_clear_xmit_timers_sync() in tcp_close() stops all timers for the socket. If an incoming FIN packet is lost, the socket will stay at FIN_WAIT_1 forever, and such sockets could be leaked up to net.ipv4.tcp_max_orphans. Usually, FIN can be retransmitted by the peer, but if the peer aborts the connection, the issue comes into reality. I warned about this privately by pointing out the exact report [1], but the bogus fix was finally merged. So, we should not stop the timers to finally kill the connection on our side in that case, meaning we must not use a kernel socket for TCP whose sk->sk_net_refcnt is 0. The kernel socket does not have a reference to its netns to make it possible to tear down netns without cleaning up every resource in it. For example, tunnel devices use a UDP socket internally, but we can destroy netns without removing such devices and let it complete during exit. Otherwise, netns would be leaked when the last application died. However, this is problematic for TCP sockets because TCP has timers to close the connection gracefully even after the socket is close()d. The lifetime of the socket and its netns is different from the lifetime of the underlying connection. If the socket user does not maintain the netns lifetime, the timer could be fired after the socket is close()d and its netns is freed up, resulting in use-after-free. Actually, we have seen so many similar issues and converted such sockets to have a reference to netns. That's why I converted the CIFS client socket to have a reference to netns (sk->sk_net_refcnt == 1), which is somehow mentioned as out-of-scope of CIFS and technically wrong in e9f2517a3e18, but **is in-scope and right fix**. Regarding the LOCKDEP issue, we can prevent the module unload by bumping the module refcount when switching the LOCKDDEP key in sock_lock_init_class_and_name(). [2] For a while, let's revert the bogus fix. Note that now we can use sk_net_refcnt_upgrade() for the socket conversion, but I'll do so later separately to make backport easy.

Affected packages & fixed versions

EcosystemPackageFixed inAdvisory
Debian:13linux6.12.25-1DEBIAN-CVE-2025-22077
Debian:14linux6.12.25-1DEBIAN-CVE-2025-22077
Ubuntu:24.04:LTSlinux6.8.0-100.100UBUNTU-CVE-2025-22077
Ubuntu:25.10linuxno fix listedUBUNTU-CVE-2025-22077
Ubuntu:22.04:LTSlinux-allwinner-5.19no fix listedUBUNTU-CVE-2025-22077
Ubuntu:24.04:LTSlinux-aws6.8.0-1046.49UBUNTU-CVE-2025-22077
Ubuntu:25.10linux-awsno fix listedUBUNTU-CVE-2025-22077
Ubuntu:22.04:LTSlinux-aws-5.19no fix listedUBUNTU-CVE-2025-22077
Ubuntu:24.04:LTSlinux-aws-6.14no fix listedUBUNTU-CVE-2025-22077
Ubuntu:24.04:LTSlinux-aws-6.17no fix listedUBUNTU-CVE-2025-22077
Ubuntu:22.04:LTSlinux-aws-6.2no fix listedUBUNTU-CVE-2025-22077
Ubuntu:22.04:LTSlinux-aws-6.5no fix listedUBUNTU-CVE-2025-22077
Ubuntu:22.04:LTSlinux-aws-6.86.8.0-1046.49~22.04.1UBUNTU-CVE-2025-22077
Ubuntu:24.04:LTSlinux-azure6.8.0-1046.52UBUNTU-CVE-2025-22077
Ubuntu:25.10linux-azureno fix listedUBUNTU-CVE-2025-22077
Ubuntu:22.04:LTSlinux-azure-5.19no fix listedUBUNTU-CVE-2025-22077
Ubuntu:24.04:LTSlinux-azure-6.11no fix listedUBUNTU-CVE-2025-22077
Ubuntu:24.04:LTSlinux-azure-6.14no fix listedUBUNTU-CVE-2025-22077
Ubuntu:24.04:LTSlinux-azure-6.17no fix listedUBUNTU-CVE-2025-22077
Ubuntu:22.04:LTSlinux-azure-6.2no fix listedUBUNTU-CVE-2025-22077
Ubuntu:22.04:LTSlinux-azure-6.5no fix listedUBUNTU-CVE-2025-22077
Ubuntu:22.04:LTSlinux-azure-6.86.8.0-1051.57~22.04.1UBUNTU-CVE-2025-22077
Ubuntu:24.04:LTSlinux-azure-fde6.8.0-1046.53UBUNTU-CVE-2025-22077
Ubuntu:25.10linux-azure-fdeno fix listedUBUNTU-CVE-2025-22077
Ubuntu:22.04:LTSlinux-azure-fde-5.19no fix listedUBUNTU-CVE-2025-22077
Ubuntu:24.04:LTSlinux-azure-fde-6.14no fix listedUBUNTU-CVE-2025-22077
Ubuntu:24.04:LTSlinux-azure-fde-6.17no fix listedUBUNTU-CVE-2025-22077
Ubuntu:22.04:LTSlinux-azure-fde-6.2no fix listedUBUNTU-CVE-2025-22077
Ubuntu:22.04:LTSlinux-azure-fde-6.86.8.0-1046.53~22.04.1UBUNTU-CVE-2025-22077
Ubuntu:24.04:LTSlinux-azure-nvidiano fix listedUBUNTU-CVE-2025-22077
Ubuntu:24.04:LTSlinux-azure-nvidia-6.14no fix listedUBUNTU-CVE-2025-22077
Ubuntu:24.04:LTSlinux-gcp6.8.0-1047.50UBUNTU-CVE-2025-22077
Ubuntu:25.10linux-gcpno fix listedUBUNTU-CVE-2025-22077
Ubuntu:22.04:LTSlinux-gcp-5.19no fix listedUBUNTU-CVE-2025-22077
Ubuntu:24.04:LTSlinux-gcp-6.11no fix listedUBUNTU-CVE-2025-22077
Ubuntu:24.04:LTSlinux-gcp-6.14no fix listedUBUNTU-CVE-2025-22077
Ubuntu:24.04:LTSlinux-gcp-6.17no fix listedUBUNTU-CVE-2025-22077
Ubuntu:22.04:LTSlinux-gcp-6.2no fix listedUBUNTU-CVE-2025-22077
Ubuntu:22.04:LTSlinux-gcp-6.5no fix listedUBUNTU-CVE-2025-22077
Ubuntu:22.04:LTSlinux-gcp-6.86.8.0-1047.50~22.04.2UBUNTU-CVE-2025-22077
Ubuntu:24.04:LTSlinux-gke6.8.0-1043.48UBUNTU-CVE-2025-22077
Ubuntu:24.04:LTSlinux-gkeop6.8.0-1030.33UBUNTU-CVE-2025-22077
Ubuntu:22.04:LTSlinux-hwe-5.19no fix listedUBUNTU-CVE-2025-22077
Ubuntu:24.04:LTSlinux-hwe-6.11no fix listedUBUNTU-CVE-2025-22077
Ubuntu:24.04:LTSlinux-hwe-6.14no fix listedUBUNTU-CVE-2025-22077
Ubuntu:22.04:LTSlinux-hwe-6.2no fix listedUBUNTU-CVE-2025-22077
Ubuntu:22.04:LTSlinux-hwe-6.5no fix listedUBUNTU-CVE-2025-22077
Ubuntu:22.04:LTSlinux-hwe-6.86.8.0-100.100~22.04.1UBUNTU-CVE-2025-22077
Ubuntu:24.04:LTSlinux-ibm6.8.0-1044.44UBUNTU-CVE-2025-22077
Ubuntu:22.04:LTSlinux-ibm-6.86.8.0-1044.44~22.04.1UBUNTU-CVE-2025-22077
Ubuntu:24.04:LTSlinux-intelno fix listedUBUNTU-CVE-2025-22077
Ubuntu:22.04:LTSlinux-intel-iot-realtimeno fix listedUBUNTU-CVE-2025-22077
Ubuntu:24.04:LTSlinux-lowlatency6.8.0-100.100.1UBUNTU-CVE-2025-22077
Ubuntu:22.04:LTSlinux-lowlatency-hwe-5.19no fix listedUBUNTU-CVE-2025-22077
Ubuntu:24.04:LTSlinux-lowlatency-hwe-6.11no fix listedUBUNTU-CVE-2025-22077
Ubuntu:22.04:LTSlinux-lowlatency-hwe-6.2no fix listedUBUNTU-CVE-2025-22077
Ubuntu:22.04:LTSlinux-lowlatency-hwe-6.5no fix listedUBUNTU-CVE-2025-22077
Ubuntu:22.04:LTSlinux-lowlatency-hwe-6.86.8.0-100.100.1~22.04.1UBUNTU-CVE-2025-22077
Ubuntu:24.04:LTSlinux-nvidia6.8.0-1046.49UBUNTU-CVE-2025-22077
Ubuntu:24.04:LTSlinux-nvidia-6.11no fix listedUBUNTU-CVE-2025-22077
Ubuntu:24.04:LTSlinux-nvidia-6.17no fix listedUBUNTU-CVE-2025-22077
Ubuntu:22.04:LTSlinux-nvidia-6.2no fix listedUBUNTU-CVE-2025-22077
Ubuntu:22.04:LTSlinux-nvidia-6.5no fix listedUBUNTU-CVE-2025-22077
Ubuntu:22.04:LTSlinux-nvidia-6.86.8.0-1046.49~22.04.1UBUNTU-CVE-2025-22077
Ubuntu:24.04:LTSlinux-nvidia-lowlatency6.8.0-1046.49.1UBUNTU-CVE-2025-22077
Ubuntu:24.04:LTSlinux-nvidia-tegra6.8.0-1020.20UBUNTU-CVE-2025-22077
Ubuntu:22.04:LTSlinux-oem-5.17no fix listedUBUNTU-CVE-2025-22077
Ubuntu:22.04:LTSlinux-oem-6.0no fix listedUBUNTU-CVE-2025-22077
Ubuntu:22.04:LTSlinux-oem-6.1no fix listedUBUNTU-CVE-2025-22077
Ubuntu:24.04:LTSlinux-oem-6.11no fix listedUBUNTU-CVE-2025-22077
Ubuntu:24.04:LTSlinux-oem-6.14no fix listedUBUNTU-CVE-2025-22077
Ubuntu:22.04:LTSlinux-oem-6.5no fix listedUBUNTU-CVE-2025-22077
Ubuntu:24.04:LTSlinux-oem-6.8no fix listedUBUNTU-CVE-2025-22077
Ubuntu:24.04:LTSlinux-oracle6.8.0-1043.44UBUNTU-CVE-2025-22077
Ubuntu:25.10linux-oracleno fix listedUBUNTU-CVE-2025-22077
Ubuntu:24.04:LTSlinux-oracle-6.14no fix listedUBUNTU-CVE-2025-22077
Ubuntu:24.04:LTSlinux-oracle-6.17no fix listedUBUNTU-CVE-2025-22077
Ubuntu:22.04:LTSlinux-oracle-6.5no fix listedUBUNTU-CVE-2025-22077
Ubuntu:22.04:LTSlinux-oracle-6.86.8.0-1043.44~22.04.1UBUNTU-CVE-2025-22077
Ubuntu:24.04:LTSlinux-raspi6.8.0-1047.51UBUNTU-CVE-2025-22077
Ubuntu:25.10linux-raspino fix listedUBUNTU-CVE-2025-22077
Ubuntu:24.04:LTSlinux-raspi-realtimeno fix listedUBUNTU-CVE-2025-22077
Ubuntu:22.04:LTSlinux-realtimeno fix listedUBUNTU-CVE-2025-22077
Ubuntu:24.04:LTSlinux-realtimeno fix listedUBUNTU-CVE-2025-22077
Ubuntu:25.10linux-realtimeno fix listedUBUNTU-CVE-2025-22077
Ubuntu:22.04:LTSlinux-riscvno fix listedUBUNTU-CVE-2025-22077
Ubuntu:24.04:LTSlinux-riscvno fix listedUBUNTU-CVE-2025-22077
Ubuntu:25.10linux-riscvno fix listedUBUNTU-CVE-2025-22077
Ubuntu:22.04:LTSlinux-riscv-5.19no fix listedUBUNTU-CVE-2025-22077
Ubuntu:24.04:LTSlinux-riscv-6.14no fix listedUBUNTU-CVE-2025-22077
Ubuntu:24.04:LTSlinux-riscv-6.17no fix listedUBUNTU-CVE-2025-22077
Ubuntu:22.04:LTSlinux-riscv-6.5no fix listedUBUNTU-CVE-2025-22077
Ubuntu:22.04:LTSlinux-riscv-6.86.8.0-100.100~22.04.1UBUNTU-CVE-2025-22077
Ubuntu:22.04:LTSlinux-starfive-5.19no fix listedUBUNTU-CVE-2025-22077
Ubuntu:22.04:LTSlinux-starfive-6.2no fix listedUBUNTU-CVE-2025-22077
Ubuntu:22.04:LTSlinux-starfive-6.5no fix listedUBUNTU-CVE-2025-22077
Ubuntu:24.04:LTSlinux-xilinx6.8.0-1023.24UBUNTU-CVE-2025-22077

Affected products (as reported)

VendorProductVersions
Linux Linux 906807c734ed219dcb2e7bbfde5c4168ed72a3d0 – before 8dbf060480236877703bff0106fc984576184d11127e907e11ccd54b59bb78fc22c43ccb76c71079 – before f761eeefd531e6550cd3a5c047835b4892acb00de9f2517a3e18a54a3943c098d2226b245d488801 – before 4b6f6bf1bde8d6045c389fda8d21c304dfe49384e9f2517a3e18a54a3943c098d2226b245d488801 – before 95d2b9f693ff2a1180a23d7d59acc0c4e72f4c416.6.68 – before 6.6.886.12.7 – before 6.12.25
Linux Linux 6.13

References