Goal Reached Thanks to every supporter — we hit 100%!

Goal: 1000 CNY · Raised: 1000 CNY

100.0%

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

EPSS 0.06% · P17
Get alerts for future matching vulnerabilitiesLog in to subscribe

I. Basic Information for CVE-2025-22077

Vulnerability Information

Have questions about the vulnerability? See if Shenlong's analysis helps!
View Shenlong Deep Dive ↗

Although we use advanced large model technology, its output may still contain inaccurate or outdated information.Shenlong tries to ensure data accuracy, but please verify and judge based on the actual situation.

Vulnerability Title
Revert "smb: client: fix TCP timers deadlock after rmmod"
Source: NVD (National Vulnerability Database)
Vulnerability 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.
Source: NVD (National Vulnerability Database)
CVSS Information
N/A
Source: NVD (National Vulnerability Database)
Vulnerability Type
N/A
Source: NVD (National Vulnerability Database)
Vulnerability Title
Linux kernel 安全漏洞
Source: CNNVD (China National Vulnerability Database)
Vulnerability Description
Linux kernel是美国Linux基金会的开源操作系统Linux所使用的内核。 Linux kernel存在安全漏洞,该漏洞源于smb客户端netns引用计数不平衡,可能导致内存泄漏和释放后重用。
Source: CNNVD (China National Vulnerability Database)
CVSS Information
N/A
Source: CNNVD (China National Vulnerability Database)
Vulnerability Type
N/A
Source: CNNVD (China National Vulnerability Database)

Affected Products

VendorProductAffected VersionsCPESubscribe
LinuxLinux 906807c734ed219dcb2e7bbfde5c4168ed72a3d0 ~ 8dbf060480236877703bff0106fc984576184d11 -
LinuxLinux 6.13 -

II. Public POCs for CVE-2025-22077

#POC DescriptionSource LinkShenlong Link
AI-Generated POCPremium

No public POC found.

Login to generate AI POC

III. Intelligence Information for CVE-2025-22077

登录查看更多情报信息。

Same Patch Batch · Linux · 2025-04-16 · 127 CVEs total

CVE-2025-220408.8 HIGHksmbd: fix session use-after-free in multichannel connection
CVE-2025-220418.8 HIGHksmbd: fix use-after-free in ksmbd_sessions_deregister()
CVE-2025-22093drm/amd/display: avoid NPD when ASIC does not support DMUB
CVE-2025-22107net: dsa: sja1105: fix kasan out-of-bounds warning in sja1105_table_delete_entry()
CVE-2025-22106vmxnet3: unregister xdp rxq info in the reset path
CVE-2025-22105bonding: check xdp prog when set bond mode
CVE-2025-22104ibmvnic: Use kernel helpers for hex dumps
CVE-2025-22103net: fix NULL pointer dereference in l3mdev_l3_rcv
CVE-2025-22102Bluetooth: btnxpuart: Fix kernel panic during FW release
CVE-2025-22100drm/panthor: Fix race condition when gathering fdinfo group samples
CVE-2025-22101net: libwx: fix Tx L4 checksum
CVE-2025-22099drm: xlnx: zynqmp_dpsub: Add NULL check in zynqmp_audio_init
CVE-2025-22097drm/vkms: Fix use after free and double free on init error
CVE-2025-22098drm: zynqmp_dp: Fix a deadlock in zynqmp_dp_ignore_hpd_set()
CVE-2025-22096drm/msm/gem: Fix error code msm_parse_deps()
CVE-2025-22095PCI: brcmstb: Fix error path after a call to regulator_bulk_get()
CVE-2025-22094powerpc/perf: Fix ref-counting on the PMU 'vpa_pmu'
CVE-2025-22083vhost-scsi: Fix handling of multiple calls to vhost_scsi_set_endpoint
CVE-2025-22082iio: backend: make sure to NULL terminate stack buffer
CVE-2025-22081fs/ntfs3: Fix a couple integer overflows on 32bit systems

Showing top 20 of 127 CVEs. View all on vendor page → →

IV. Related Vulnerabilities

V. Comments for CVE-2025-22077

No comments yet


Leave a comment