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

Goal: 1000 CNY · Raised: 1336 CNY

100%

CVE-2025-23143— net: Fix null-ptr-deref by sock_lock_init_class_and_name() and rmmod.

Quick assessment

Affected
Linux Linux
Exploitation
No confirmed in-the-wild exploitation; assess based on exposure
Recommended action
Check the vendor advisory and references for a fixed version. If immediate upgrade is impossible, restrict exposure and increase monitoring.

Linux kernel是美国Linux基金会的开源操作系统Linux所使用的内核。 Linux kernel存在安全漏洞,该漏洞源于sock_lock_init_class_and_name和rmmod导致的空指针取消引用。

AI Predicted 6.5 Difficulty: Moderate EPSS 0.21% · P11

Possible ATT&CK Techniques 1 AI

T1055 · Process Injection

Affected Version Matrix 20

VendorProduct Version RangeStatus
Linux Linux ed07536ed6731775219c1df7fa26a7588753e693< 83083c5fc7cf9b0f136a42f26aba60da380f3601 affected
ed07536ed6731775219c1df7fa26a7588753e693< b7489b753667bc9245958a4896c9419743083c27 affected
ed07536ed6731775219c1df7fa26a7588753e693< d51e47e2ab6ef10a317d576075cf625cdbf96426 affected
ed07536ed6731775219c1df7fa26a7588753e693< feda73ad44a5cc80f6bf796bb1099a3fe71576d4 affected
ed07536ed6731775219c1df7fa26a7588753e693< 905d43b8ad2436c240f844acb3ebcc7a99b8ebf1 affected
ed07536ed6731775219c1df7fa26a7588753e693< 5f7f6abd92b6c8dc8f19625ef93c3a18549ede04 affected
ed07536ed6731775219c1df7fa26a7588753e693< c11247a21aab4b50a23c8b696727d7483de2f1e1 affected
ed07536ed6731775219c1df7fa26a7588753e693< 2155802d3313d7b8365935c6b8d6edc0ddd7eb94 affected
… +12 more rows
Get alerts for future matching vulnerabilities Log in to subscribe

I. Basic Information for CVE-2025-23143

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
net: Fix null-ptr-deref by sock_lock_init_class_and_name() and rmmod.
Source: CVE Program / CVE List V5
Vulnerability Description
In the Linux kernel, the following vulnerability has been resolved: net: Fix null-ptr-deref by sock_lock_init_class_and_name() and rmmod. When I ran the repro [0] and waited a few seconds, I observed two LOCKDEP splats: a warning immediately followed by a null-ptr-deref. [1] Reproduction Steps: 1) Mount CIFS 2) Add an iptables rule to drop incoming FIN packets for CIFS 3) Unmount CIFS 4) Unload the CIFS module 5) Remove the iptables rule At step 3), the CIFS module calls sock_release() for the underlying TCP socket, and it returns quickly. However, the socket remains in FIN_WAIT_1 because incoming FIN packets are dropped. At this point, the module's refcnt is 0 while the socket is still alive, so the following rmmod command succeeds. # ss -tan State Recv-Q Send-Q Local Address:Port Peer Address:Port FIN-WAIT-1 0 477 10.0.2.15:51062 10.0.0.137:445 # lsmod | grep cifs cifs 1159168 0 This highlights a discrepancy between the lifetime of the CIFS module and the underlying TCP socket. Even after CIFS calls sock_release() and it returns, the TCP socket does not die immediately in order to close the connection gracefully. While this is generally fine, it causes an issue with LOCKDEP because CIFS assigns a different lock class to the TCP socket's sk->sk_lock using sock_lock_init_class_and_name(). Once an incoming packet is processed for the socket or a timer fires, sk->sk_lock is acquired. Then, LOCKDEP checks the lock context in check_wait_context(), where hlock_class() is called to retrieve the lock class. However, since the module has already been unloaded, hlock_class() logs a warning and returns NULL, triggering the null-ptr-deref. If LOCKDEP is enabled, we must ensure that a module calling sock_lock_init_class_and_name() (CIFS, NFS, etc) cannot be unloaded while such a socket is still alive to prevent this issue. Let's hold the module reference in sock_lock_init_class_and_name() and release it when the socket is freed in sk_prot_free(). Note that sock_lock_init() clears sk->sk_owner for svc_create_socket() that calls sock_lock_init_class_and_name() for a listening socket, which clones a socket by sk_clone_lock() without GFP_ZERO. [0]: CIFS_SERVER="10.0.0.137" CIFS_PATH="//${CIFS_SERVER}/Users/Administrator/Desktop/CIFS_TEST" DEV="enp0s3" CRED="/root/WindowsCredential.txt" MNT=$(mktemp -d /tmp/XXXXXX) mount -t cifs ${CIFS_PATH} ${MNT} -o vers=3.0,credentials=${CRED},cache=none,echo_interval=1 iptables -A INPUT -s ${CIFS_SERVER} -j DROP for i in $(seq 10); do umount ${MNT} rmmod cifs sleep 1 done rm -r ${MNT} iptables -D INPUT -s ${CIFS_SERVER} -j DROP [1]: DEBUG_LOCKS_WARN_ON(1) WARNING: CPU: 10 PID: 0 at kernel/locking/lockdep.c:234 hlock_class (kernel/locking/lockdep.c:234 kernel/locking/lockdep.c:223) Modules linked in: cifs_arc4 nls_ucs2_utils cifs_md4 [last unloaded: cifs] CPU: 10 UID: 0 PID: 0 Comm: swapper/10 Not tainted 6.14.0 #36 Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS rel-1.16.0-0-gd239552ce722-prebuilt.qemu.org 04/01/2014 RIP: 0010:hlock_class (kernel/locking/lockdep.c:234 kernel/locking/lockdep.c:223) ... Call Trace: <IRQ> __lock_acquire (kernel/locking/lockdep.c:4853 kernel/locking/lockdep.c:5178) lock_acquire (kernel/locking/lockdep.c:469 kernel/locking/lockdep.c:5853 kernel/locking/lockdep.c:5816) _raw_spin_lock_nested (kernel/locking/spinlock.c:379) tcp_v4_rcv (./include/linux/skbuff.h:1678 ./include/net/tcp.h:2547 net/ipv4/tcp_ipv4.c:2350) ... BUG: kernel NULL pointer dereference, address: 00000000000000c4 PF: supervisor read access in kernel mode PF: error_code(0x0000) - not-present page PGD 0 Oops: Oops: 0000 [#1] PREEMPT SMP NOPTI CPU: 10 UID: 0 PID: 0 Comm: swapper/10 Tainted: G W 6.14.0 #36 Tainted: [W]=WARN Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS rel-1.16.0-0-gd239552ce722-prebuilt.qemu.org 04/01/2014 RIP: 0010:__lock_acquire (kernel/ ---truncated---
Source: CVE Program / CVE List V5
CVSS Information
N/A
Source: CVE Program / CVE List V5
Vulnerability Type
N/A
Source: CVE Program / CVE List V5
Vulnerability Title
Linux kernel 安全漏洞
Source: CNNVD (China National Vulnerability Database)
Vulnerability Description
Linux kernel是美国Linux基金会的开源操作系统Linux所使用的内核。 Linux kernel存在安全漏洞,该漏洞源于sock_lock_init_class_and_name和rmmod导致的空指针取消引用。
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

Vendor Product Affected Versions CPE Subscribe
Linux Linux ed07536ed6731775219c1df7fa26a7588753e693 ~ 83083c5fc7cf9b0f136a42f26aba60da380f3601 -
Linux Linux 2.6.20 -

II. Public POCs for CVE-2025-23143

# POC Description Source Link Shenlong Link
AI-Generated POC Premium

No public POC found.

Login to generate AI POC

III. Intelligence Information for CVE-2025-23143

登录查看更多情报信息。

Patches & Fixes for CVE-2025-23143 (7)

Same Patch Batch · Linux · 2025-05-01 · 245 CVEs total

CVE-2025-37750 9.8 CRITICAL smb: client: fix UAF in decryption with multichannel
CVE-2025-37778 9.8 CRITICAL ksmbd: Fix dangling pointer in krb_authenticate
CVE-2022-49770 9.8 CRITICAL ceph: avoid putting the realm twice when decoding snaps fails
CVE-2022-49931 8.8 HIGH IB/hfi1: Correctly move list in sc_disable()
CVE-2025-37776 8.8 HIGH ksmbd: fix use-after-free in smb_break_all_levII_oplock()
CVE-2025-37777 8.8 HIGH ksmbd: fix use-after-free in __smb2_lease_break_noti()
CVE-2025-37790 8.8 HIGH net: mctp: Set SOCK_RCU_FREE
CVE-2022-49910 8.8 HIGH Bluetooth: L2CAP: Fix use-after-free caused by l2cap_reassemble_sdu
CVE-2022-49886 8.4 HIGH x86/tdx: Panic on bad configs that #VE on "private" memory access
CVE-2025-23159 8.4 HIGH media: venus: hfi: add a check to handle OOB in sfr region
CVE-2025-37749 8.2 HIGH net: ppp: Add bound checking for skb data on ppp_sync_txmung
CVE-2025-37774 7.8 HIGH slab: ensure slab->obj_exts is clear in a newly allocated slab page
CVE-2025-37789 7.8 HIGH net: openvswitch: fix nested key length validation in the set() action
CVE-2025-37779 7.8 HIGH lib/iov_iter: fix to increase non slab folio refcount
CVE-2022-49920 7.8 HIGH netfilter: nf_tables: netlink notifier might race to release objects
CVE-2022-49919 7.8 HIGH netfilter: nf_tables: release flow rule object from commit path
CVE-2025-37756 7.8 HIGH net: tls: explicitly disallow disconnect
CVE-2025-37761 7.8 HIGH drm/xe: Fix an out-of-bounds shift when invalidating TLB
CVE-2025-37763 7.8 HIGH drm/imagination: take paired job reference
CVE-2022-49804 7.8 HIGH s390: avoid using global register for current_stack_pointer

Showing top 20 of 245 CVEs. View all on vendor page &rarr; →

IV. Related Vulnerabilities

V. Comments for CVE-2025-23143

No comments yet


Leave a comment