Linux kernel unsafe PTP port access in ice driver
- Exploited
- No known exploitation
- Fix
- Fixed in 6.13
- Who is exposed
- Not reported
Summary
The ice driver in the Linux kernel accessed its list of PTP ports without proper locking in some code paths, which could lead to unsafe access to those port structures. The fix switches the list to sleepable RCU and adds reference counting so that ports remain valid while in use.
Written by a model
Original description
In the Linux kernel, the following vulnerability has been resolved:
ice: use reference counting and SRCU for PTP port access
The ice adapter structure maintains a list of ports associated with the adapter. This is used for supporting PTP, where the clock owner must handle many operations that require access to the PTP port structures of the associated PFs.
This is implemented using a linked list and a mutex. This sort of works, but a few places within the code do not acquire the mutex when iterating the list. This includes ice_ptp_flush_all_tx_tracker(), ice_ptp_restart_all_phy(), and ice_ptp_prepare_rebuild_sec().
Fixing this is tricky, especially since it is not clear if we can simply acquire the lock around the complete iterations.
The pattern of use for the port list is read-mostly with modifications only happening during PF initialization when elements are inserted. This typically only happens during early boot, though a PF could in principle be removed or loaded at arbitrary times via bind and unbind operations.
The use of a mutex does mean the driver can sleep while holding it, but it still creates complicates with lock ordering and prevents iterating the list in any code path that can't sleep.
Instead, use SRCU primitives for the port linked list, along with a reference count on the port. The kref reference counter ensures that a PF will have a valid lifetime and not be removed until the reference is released. Note that this change focuses solely on the port list and does not make an effort to resolve access to ctrl_pf, which is currently being investigated by another developer.
Use of sleepable RCU is required because we often iterate the PTP port list and perform operations that might sleep. Attempts at implementing regular RCU have thus far not proven to be acceptable.
The remove path first removes the port from the list, and we use kref_get_unless_zero to ensure that such ports are skipped when iterating the list. This ensures that once a port starts removing we will drop references and no longer be able to acquire new ones. This avoids loop iterations chaining together to indefinitely block removal.
The ice_ptp_release_port_srcu() function is used as the release function for the kref_put() call. This uses wake_up_var() to wake the removing thread. The waiting thread will block until the final reference has been removed, then it will use synchronize_srcu() to ensure any outstanding SRCU critical sections have had the necessary grace period.
This flow ensures that accesses to ports via the adapter port list will remain valid until both the SRCU critical sections have ended and all the references to the ports have been dropped. Strictly speaking, SRCU alone might be sufficient for existing code paths, but the reference count allows the option for passing a pointer to the port on to other functions if necessary in the future.
What to do
Upgrade to a fixed version: 6.13.
Check your systems with an agent
Paste this into a coding or ops agent. It checks your systems read-only and reports a table per asset.
Check whether my systems are affected by CVE-2026-139138 (ice: use reference counting and SRCU for PTP port access), using the cve.now data below.
Rules: work read-only. Do not run exploit code, proof-of-concept scripts or scanners that send attack payloads, and do not change any configuration, package, image or deployment. Report findings only.
What cve.now has for CVE-2026-139138 (entry last updated 2026-11-30):
Affected:
- Linux Linux: from 6.12.11, fixed in 6.13
- Linux Linux: versions 6.13
Fixed versions: 6.13.
Setup: unknown whether the bug needs a non-default feature or setting. Check the advisory.
CISA KEV: CVE-2026-139138 is not listed as of cve.now's last read.
This KEV status is for CVE-2026-139138 only. If you also check another CVE, look up its own KEV status; never assume it from this one.
How to check:
- Installed software: check what is actually running, not what a repo declares. Read the version from each host, container image and Kubernetes node (the binary's version output, the OS package database, image layers), and check whether the conditions above hold there. Distribution packages may carry a backported fix under an older version number; confirm against the distribution's own advisory.
Verify against the linked advisories before concluding, and cite the date you read each one:
- https://git.kernel.org/stable/c/85525fab62d8dbec58445de0c1ced59da4bd2d70
- https://git.kernel.org/stable/c/91b962d7059d63a8566868be6f2871ed3c2cbe89
- https://git.kernel.org/stable/c/d5d859a6efff473d799d35999a35aa764dcc185b
Do not conclude an asset is unaffected unless you checked it and the evidence covers both its version and the conditions above. If you could not check something, mark it unknown and say what is missing.
Report a table with one row per asset and these columns: Asset | Version or build | Status (affected, fixed, not applicable, unknown) | Compensating controls | Exposure (internet-facing, internal, none) | Evidence | Next action.
Entry: https://cve.now/CVE-2026-139138
For follow-up questions, use the cve.now MCP server at https://mcp.cve.now/mcp (no authentication), for example execute with name cve.get and arguments {"id": "CVE-2026-139138"}.Affected versions
- Linux LinuxFrom 6.12.11 · fixed in 6.13
- Linux Linux6.13
cve.now Index
- Exploitation?/40Unknown. No CISA SSVC exploitation rating yet
- Exposure?/25Unknown. No advisory context yet
- Reach20/20Affects Linux kernel (software on nearly every server, desktop or phone)
- Severity?/10Unknown. No CVSS score or vendor rating
- No patch0/5No signal
What would change the score
- Would score about 75 if added to CISA KEV
- Would score about 70 if CISA's SSVC rates exploitation active
- Would score about 42 if advisories confirm default setups are exposed
Timeline
- CVE published
- First seen by cve.now
Evidence 5
| Kind | Source |
|---|---|
| CVE record 2Establishes: The identifier and description. | |
| Record | CVE List · CVE-2026-139138 |
| Record | NVD · CVE-2026-139138 |
| Other links 3 | |
| Link | git.kernel.org · stable/c/85525fab62d8dbec58445de0c1ced59da4bd2d70 |
| Link | git.kernel.org · stable/c/91b962d7059d63a8566868be6f2871ed3c2cbe89 |
| Link | git.kernel.org · stable/c/d5d859a6efff473d799d35999a35aa764dcc185b |
Questions about CVE-2026-139138
Is CVE-2026-139138 being exploited?
It is not in CISA's Known Exploited Vulnerabilities catalog, and CISA's SSVC assessment does not mark exploitation as active. That does not mean it has not been attacked: vendors and researchers can report attacks before CISA lists them. No public exploit code is tracked.
Source: cve.now feed data
Which versions are affected by CVE-2026-139138?
Linux: from 6.12.11 before 6.13. Linux: version 6.13.
Source: cve.now feed data
How do I fix CVE-2026-139138?
Upgrade to a fixed version: 6.13.
Source: cve.now feed data
Related
- CVE-2026-139801KVM: nSVM: Check validity of vmcs01 save area copied from SMRAM on RSM
- CVE-2026-139799mm/shmem: hold off eviction in shmem_writeout()
- CVE-2026-139792ALSA: pcm: Prevent O_APPEND open on OSS streams
- CVE-2026-139788cipso: stop modifying live ip_options_rcu
- CVE-2026-139786mm/vma: avoid spurious write locks when mm->mm_lock_seq overflows
- CVE-2026-1398009p/xen: drain response work after unbinding IRQ
No corrections so far. Something wrong on this page? Report an error.