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

Goal: 1000 CNY · Raised: 1359 CNY

100%

CVE-2026-31530— cxl/port: Fix use after free of parent_port in cxl_detach_ep()

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存在安全漏洞,该漏洞源于cxl_detach_ep函数中parent_port释放后重用,可能导致内存损坏。

AI Predicted 6.5 Difficulty: Moderate EPSS 0.12% · P2

Possible ATT&CK Techniques 1 AI

T1190 · Exploit Public-Facing Application

Affected Version Matrix 10

VendorProduct Version RangeStatus
Linux Linux 2345df54249c6fb7779e2a72b427ee79ed3eaad5< d216a4bd138eb57cc4ae7c43b2f709e3482af7e2 affected
2345df54249c6fb7779e2a72b427ee79ed3eaad5< 2c32141462045cf93d54a5146a0ba572b83533dd affected
2345df54249c6fb7779e2a72b427ee79ed3eaad5< f7dc6f381a1e5f068333f1faa9265d6af1df4235 affected
2345df54249c6fb7779e2a72b427ee79ed3eaad5< 19d2f0b97a131198efc2c4ca3eb7f980bba8c2b4 affected
6.3 affected
< 6.3 unaffected
6.12.80≤ 6.12.* unaffected
6.18.21≤ 6.18.* unaffected
… +2 more rows
Get alerts for future matching vulnerabilities Log in to subscribe

I. Basic Information for CVE-2026-31530

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
cxl/port: Fix use after free of parent_port in cxl_detach_ep()
Source: CVE Program / CVE List V5
Vulnerability Description
In the Linux kernel, the following vulnerability has been resolved: cxl/port: Fix use after free of parent_port in cxl_detach_ep() cxl_detach_ep() is called during bottom-up removal when all CXL memory devices beneath a switch port have been removed. For each port in the hierarchy it locks both the port and its parent, removes the endpoint, and if the port is now empty, marks it dead and unregisters the port by calling delete_switch_port(). There are two places during this work where the parent_port may be used after freeing: First, a concurrent detach may have already processed a port by the time a second worker finds it via bus_find_device(). Without pinning parent_port, it may already be freed when we discover port->dead and attempt to unlock the parent_port. In a production kernel that's a silent memory corruption, with lock debug, it looks like this: []DEBUG_LOCKS_WARN_ON(__owner_task(owner) != get_current()) []WARNING: kernel/locking/mutex.c:949 at __mutex_unlock_slowpath+0x1ee/0x310 []Call Trace: []mutex_unlock+0xd/0x20 []cxl_detach_ep+0x180/0x400 [cxl_core] []devm_action_release+0x10/0x20 []devres_release_all+0xa8/0xe0 []device_unbind_cleanup+0xd/0xa0 []really_probe+0x1a6/0x3e0 Second, delete_switch_port() releases three devm actions registered against parent_port. The last of those is unregister_port() and it calls device_unregister() on the child port, which can cascade. If parent_port is now also empty the device core may unregister and free it too. So by the time delete_switch_port() returns, parent_port may be free, and the subsequent device_unlock(&parent_port->dev) operates on freed memory. The kernel log looks same as above, with a different offset in cxl_detach_ep(). Both of these issues stem from the absence of a lifetime guarantee between a child port and its parent port. Establish a lifetime rule for ports: child ports hold a reference to their parent device until release. Take the reference when the port is allocated and drop it when released. This ensures the parent is valid for the full lifetime of the child and eliminates the use after free window in cxl_detach_ep(). This is easily reproduced with a reload of cxl_acpi in QEMU with CXL devices present.
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存在安全漏洞,该漏洞源于cxl_detach_ep函数中parent_port释放后重用,可能导致内存损坏。
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 2345df54249c6fb7779e2a72b427ee79ed3eaad5 ~ d216a4bd138eb57cc4ae7c43b2f709e3482af7e2 -
Linux Linux 6.3 -

II. Public POCs for CVE-2026-31530

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

No public POC found.

Login to generate AI POC

III. Intelligence Information for CVE-2026-31530

请登录查看更多情报信息。

Same Patch Batch · Linux · 2026-04-22 · 100 CVEs total

CVE-2026-31463 9.8 CRITICAL iomap: fix invalid folio access when i_blkbits differs from I/O granularity
CVE-2026-31436 9.8 CRITICAL dmaengine: idxd: fix possible wrong descriptor completion in llist_abort_desc()
CVE-2026-31444 9.8 CRITICAL ksmbd: fix use-after-free and NULL deref in smb_grant_oplock()
CVE-2026-31501 9.8 CRITICAL net: ti: icssg-prueth: fix use-after-free of CPPI descriptor in RX path
CVE-2026-31478 9.8 CRITICAL ksmbd: replace hardcoded hdr2_len with offsetof() in smb2_calc_max_out_buf_len()
CVE-2026-31448 9.4 CRITICAL ext4: avoid infinite loops caused by residual data
CVE-2026-31432 8.8 HIGH ksmbd: fix OOB write in QUERY_INFO for compound requests
CVE-2026-31433 8.8 HIGH ksmbd: fix potencial OOB in get_file_all_info() for compound requests
CVE-2026-31435 8.8 HIGH netfs: Fix read abandonment during retry
CVE-2026-31450 8.8 HIGH ext4: publish jinode after initialization
CVE-2026-31476 8.2 HIGH ksmbd: do not expire session on binding failure
CVE-2026-31513 8.1 HIGH Bluetooth: L2CAP: Fix stack-out-of-bounds read in l2cap_ecred_conn_req
CVE-2026-31464 8.1 HIGH scsi: ibmvfc: Fix OOB access in ibmvfc_discover_targets_done()
CVE-2026-31490 7.8 HIGH drm/xe/pf: Fix use-after-free in migration restore
CVE-2026-31528 7.8 HIGH perf: Make sure to use pmu_ctx->pmu for groups
CVE-2026-31473 7.8 HIGH media: mc, v4l2: serialize REINIT and REQBUFS with req_queue_mutex
CVE-2026-31479 7.8 HIGH drm/xe: always keep track of remap prev/next
CVE-2026-31475 7.8 HIGH ASoC: sma1307: fix double free of devm_kzalloc() memory
CVE-2026-31474 7.8 HIGH can: isotp: fix tx.buf use-after-free in isotp_sendmsg()
CVE-2026-31494 7.8 HIGH net: macb: use the current queue number for stats

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

IV. Related Vulnerabilities

V. Comments for CVE-2026-31530

No comments yet


Leave a comment