CVE-2025-39905: Linux Kernel net phylink - Race Condition
- Cve: CVE-2025-39905
- Name: Linux Kernel net phylink - Race Condition
- Description: In the Linux kernel, the following vulnerability has been resolved: net: phylink: add lock for serializing concurrent pl->phydev writes with resolver Currently phylink_resolve() protects itself against concurrent phylink_bringup_phy() or phylink_disconnect_phy() calls which modify pl->phydev by relying on pl->state_mutex. The problem is that in phylink_resolve(), pl->state_mutex is in a lock inversion state with pl->phydev->lock. So pl->phydev->lock needs to be acquired prior to pl->state_mutex. But that requires dereferencing pl->phydev in the first place, and without pl->state_mutex, that is racy. Hence the reason for the extra lock. Currently it is redundant, but it will serve a functional purpose once mutex_lock(&phy->lock) will be moved outside of the mutex_lock(&pl->state_mutex) section. Another alternative considered would have been to let phylink_resolve() acquire the rtnl_mutex, which is also held when phylink_bringup_phy() and phylink_disconnect_phy() are called. But since phylink_disconnect_phy() runs under rtnl_lock(), it would deadlock with phylink_resolve() when calling flush_work(&pl->resolve). Additionally, it would have been undesirable because it would have unnecessarily blocked many other call paths as well in the entire kernel, so the smaller-scoped lock was preferred.
- Impact: Attackers can cause race conditions leading to inconsistent kernel state or potential denial of service.
- Remediation: Update to the latest Linux kernel version containing the fix for proper locking in phylink.
- Vulnerability type: race_condition
- Vulnerability impact: denial_of_service
- Requirement type: none
- Labels source: projectdiscovery
- Severity: high
- Cvss score: 7
- Cvss vector: CVSS:3.1/AV:L/AC:H/PR:L/UI:N/S:U/C:H/I:H/A:H
- Epss score: 0.00111
- Epss percentile: 0.01312
- Assignee: 416baaa9-dc9f-4396-8d5f-8c081fb06d67
- Published at: 2025-10-01T08:15:33Z
- Age in days: 419
- Modified at: 2026-10-19T21:10:00Z
- Patch available: yes
- References total: 2
- Products total: 1
- Oss: yes
- Projects total: 1
- Advisory url: https://nvd.nist.gov/vuln/detail/CVE-2025-39905
- Nvd status: modified
- Checked, none or zero: known exploited entries, nuclei templates, public exploits total, public exploits capped, public exploits, rejected by nvd
- Not known: requirements, hackerone
Cwe
| Id | Name |
|---|---|
| CWE-362 | Concurrent Execution using Shared Resource with Improper Synchronization |
References
| Url | Source | Tags |
|---|---|---|
| https://git.kernel.org/stable/c/0ba5b2f2c381dbec9ed9e4ab3ae5d3e667de0dc3 | nvd | Patch |
| https://git.kernel.org/stable/c/56fe63b05ec84ae6674269d78397cec43a7a295a | nvd | Patch |
Products
| Product | Affected | Platform bound | Sources | Url |
|---|---|---|---|---|
| linux:linux_kernel | = 6.17 rc1, = 6.17 rc2, = 6.17 rc3, = 6.17 rc4, = 6.17 rc5, < 6.16.8 | no | nvd | /v1/products/linux/linux_kernel |
Projects
| Repository | Link kinds | Indexed | Url |
|---|---|---|---|
| torvalds/linux | cna_commit, commit | yes | /v1/repositories/torvalds/linux |
Index
- Checked, none or zero: repositories, repositories high signal, packages
Exploitation
- Authentication required: yes
- Exposed hosts: 10038339
- Checked, none or zero: known exploited, known exploited by, exploitation seen, public exploit, public exploit count, initial access, remote
- Not known: known exploited since, vulncheck known exploited since, public exploit first date, nuclei template, initial access since, hackerone reports