CVE-2025-39872
published high CVSS 3.1 · 7.8hsr: hold rcu and dev lock for hsr_get_port_ndev
Package status and fixes
| Distro / vendor | Release | Package / product | Publisher status | Fixed build | Source |
|---|---|---|---|---|---|
| Linux | — | Linuxef964411c8ca775967355d855abc56aeaca3c867 to < 9433ba79c2ec3ec7c9a711748701549339c3438c · 9c10dd8eed74de9e8adeb820939f8745cd566d4a to < 68a6729afd3e8e9a2a32538642ce92b96ccf9b1d · 9c10dd8eed74de9e8adeb820939f8745cd566d4a to < 847748fc66d08a89135a74e29362a66ba4e3ab15 · 6.12.63 to < 6.12.64 · Other versions: unaffected | Affected | Not stated | Linux |
| Linux | — | Linux6.14 (affected) · 0 to < 6.14 (unaffected · semver) · 6.12.64 through 6.12.* (unaffected · semver) · 6.16.8 through 6.16.* (unaffected · semver) · 6.17 and later (unaffected · original_commit_for_fix) · Other versions: affected | Version-specific | Not stated | Linux |
| Amazon Linux | AL2 | Release evaluation | Not Affected | Not required | Amazon Linux assessment |
| Amazon Linux | AL2023 | Release evaluation | Not Affected | Not required | Amazon Linux assessment |
| Debian | trixie | linux | Advisory build | 6.12.69-1 | DSA-6126-1 |
Description
In the Linux kernel, the following vulnerability has been resolved: hsr: hold rcu and dev lock for hsr_get_port_ndev hsr_get_port_ndev calls hsr_for_each_port, which need to hold rcu lock. On the other hand, before return the port device, we need to hold the device reference to avoid UaF in the caller function.
Related advisories
Vendor advisories explicitly linked to this CVE.
Assessment
CVSS risk assessment and additional context for this vulnerability.
- CVSS version
- 3.1
- Base score
- 7.8 / 10
- Severity
- high
- Provider
- Linux · cna
- Vector string
- CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H
- Scenarios
- en: AV:L - The vulnerable path is entered from local socket/netlink operations — a multicast group join on the HSR master propagates via `hsr_set_rx_mode()` to the ICSSG slave's `ndo_set_rx_mode`, which queues the work that calls `hsr_get_port_ndev()`. A remote peer on the HSR ring cannot induce multicast address changes or HSR port reconfiguration, so this is not network-reachable. AC:L - The attacker fully controls the traversal side of the race by looping `IP_ADD_MEMBERSHIP`/`IP_DROP_MEMBERSHIP` to repeatedly queue `emac_ndo_set_rx_mode_work`, and the walk runs in preemptible process context with no RCU or RTNL held, so no tight timing window must be won — only overlap with a port-list mutation, which can be retried indefinitely. PR:L - Triggering the vulnerable `hsr_get_port_ndev()` traversal requires only an ordinary unprivileged UDP socket performing a multicast group join on the HSR interface; no capability check exists anywhere on that path. Widening the race window via HSR port reconfiguration needs only CAP_NET_ADMIN, which per kernel CNA guidance is scored as Low. UI:N - The entire sequence is driven by the attacker's own socket operations against an already-configured HSR-offload interface. No victim action is needed. S:U - The use-after-free corrupts kernel memory within the same kernel security authority; there is no VM, IOMMU, or sandbox boundary crossed. C:H - The unlocked RCU walk dereferences a freed `hsr_port` and the returned `net_device` is used without a reference, and `netdev_priv()` on that freed device is read as a `prueth_emac` — a use-after-free read whose contents the attacker can groom via heap spray, yielding kernel memory disclosure and pointer leakage. I:H - `icssg_fdb_setup()` performs `++(emac->prueth->icssg_hwcmdseq)` — a pointer loaded out of the freed object and then written through — plus further writes into PRU shared memory at addresses derived from freed data, giving a controllable write primitive suitable for control-flow hijacking after heap reuse. A:H - Following a `kfree_rcu()`-freed list node and dereferencing a freed `net_device` reliably produces an oops/panic (and slab corruption) even when not exploited further, and the attacker can retrigger it repeatedly on an industrial redundancy device.
Publisher product statements
Version ranges and default statuses as reported by each provider.
| Vendor | Product | Version status | Source |
|---|---|---|---|
| Linux | Linux | ef964411c8ca775967355d855abc56aeaca3c867 to < 9433ba79c2ec3ec7c9a711748701549339c3438c (affected · git)9c10dd8eed74de9e8adeb820939f8745cd566d4a to < 68a6729afd3e8e9a2a32538642ce92b96ccf9b1d (affected · git)9c10dd8eed74de9e8adeb820939f8745cd566d4a to < 847748fc66d08a89135a74e29362a66ba4e3ab15 (affected · git)6.12.63 to < 6.12.64 (affected · semver)Default: unaffected | Linux · cna |
| Linux | Linux | 6.14 (affected)0 to < 6.14 (unaffected · semver)6.12.64 through 6.12.* (unaffected · semver)6.16.8 through 6.16.* (unaffected · semver)6.17 and later (unaffected · original_commit_for_fix)Default: affected | Linux · cna |
Weaknesses
0No weakness assertions.
References
3Provider assertions
1Linux · cna
hsr: hold rcu and dev lock for hsr_get_port_ndev
Provenance
- Schema
- 5.2
- Searchable
- yes
- Content hash
- 186dcf30714602521ceced18664c8d3378103e54a4eed482f7b00e10fcfa390c
- Ingested
- 23 Sep 2026, 08:47:06 UTC
- Source record
- Official CVE record