{"id":"CVE-2025-39905","aliases":["CVE-2025-39905"],"related":[],"kind":"vulnerability","state":"published","title":"net: phylink: add lock for serializing concurrent pl->phydev writes with resolver","summary":"In the Linux kernel, the following vulnerability has been resolved:\n\nnet: phylink: add lock for serializing concurrent pl->phydev writes with resolver\n\nCurrently phylink_resolve() protects itself against concurrent\nphylink_bringup_phy() or phylink_disconnect_phy() calls which modify\npl->phydev by relying on pl->state_mutex.\n\nThe problem is that in phylink_resolve(), pl->state_mutex is in a lock\ninversion state with pl->phydev->lock. So pl->phydev->lock needs to be\nacquired prior to pl->state_mutex. But that requires dereferencing\npl->phydev in the first place, and without pl->state_mutex, that is\nracy.\n\nHence the reason for the extra lock. Currently it is redundant, but it\nwill serve a functional purpose once mutex_lock(&phy->lock) will be\nmoved outside of the mutex_lock(&pl->state_mutex) section.\n\nAnother alternative considered would have been to let phylink_resolve()\nacquire the rtnl_mutex, which is also held when phylink_bringup_phy()\nand phylink_disconnect_phy() are called. But since phylink_disconnect_phy()\nruns under rtnl_lock(), it would deadlock with phylink_resolve() when\ncalling flush_work(&pl->resolve). Additionally, it would have been\nundesirable because it would have unnecessarily blocked many other call\npaths as well in the entire kernel, so the smaller-scoped lock was\npreferred.","summarySource":"cvelist","descriptions":[{"lang":"en","text":"In the Linux kernel, the following vulnerability has been resolved:\n\nnet: phylink: add lock for serializing concurrent pl->phydev writes with resolver\n\nCurrently phylink_resolve() protects itself against concurrent\nphylink_bringup_phy() or phylink_disconnect_phy() calls which modify\npl->phydev by relying on pl->state_mutex.\n\nThe problem is that in phylink_resolve(), pl->state_mutex is in a lock\ninversion state with pl->phydev->lock. So pl->phydev->lock needs to be\nacquired prior to pl->state_mutex. But that requires dereferencing\npl->phydev in the first place, and without pl->state_mutex, that is\nracy.\n\nHence the reason for the extra lock. Currently it is redundant, but it\nwill serve a functional purpose once mutex_lock(&phy->lock) will be\nmoved outside of the mutex_lock(&pl->state_mutex) section.\n\nAnother alternative considered would have been to let phylink_resolve()\nacquire the rtnl_mutex, which is also held when phylink_bringup_phy()\nand phylink_disconnect_phy() are called. But since phylink_disconnect_phy()\nruns under rtnl_lock(), it would deadlock with phylink_resolve() when\ncalling flush_work(&pl->resolve). Additionally, it would have been\nundesirable because it would have unnecessarily blocked many other call\npaths as well in the entire kernel, so the smaller-scoped lock was\npreferred.","source":"cvelist"},{"lang":"es","text":"En el kernel de Linux, la siguiente vulnerabilidad ha sido resuelta:\n\nnet: phylink: añadir un bloqueo para serializar escrituras concurrentes de pl->phydev con el resolvedor\n\nActualmente, phylink_resolve() se protege contra llamadas concurrentes a phylink_bringup_phy() o phylink_disconnect_phy() que modifican pl->phydev al depender de pl->state_mutex.\n\nEl problema es que en phylink_resolve(), pl->state_mutex está en un estado de inversión de bloqueo con pl->phydev->lock. Así que pl->phydev->lock necesita ser adquirido antes de pl->state_mutex. Pero eso requiere desreferenciar pl->phydev en primer lugar, y sin pl->state_mutex, eso es propenso a condiciones de carrera.\n\nDe ahí la razón del bloqueo adicional. Actualmente es redundante, pero servirá un propósito funcional una vez que mutex_lock(&phy->lock) sea movido fuera de la sección mutex_lock(&pl->state_mutex).\n\nOtra alternativa considerada habría sido permitir que phylink_resolve() adquiera el rtnl_mutex, el cual también se mantiene cuando se llaman a phylink_bringup_phy() y phylink_disconnect_phy(). Pero dado que phylink_disconnect_phy() se ejecuta bajo rtnl_lock(), entraría en interbloqueo con phylink_resolve() al llamar a flush_work(&pl->resolve). Además, habría sido indeseable porque habría bloqueado innecesariamente muchas otras rutas de llamada también en todo el kernel, por lo que se prefirió el bloqueo de alcance más pequeño.","source":"nvd"}],"published":"2025-10-01T07:44:28.758Z","modified":"2026-10-19T21:10:00.160Z","severity":{"scorer":"CISA-ADP","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:L/AC:H/PR:L/UI:N/S:U/C:H/I:H/A:H","score":7,"rating":"HIGH"},"severities":[{"scorer":"CISA-ADP","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:L/AC:H/PR:L/UI:N/S:U/C:H/I:H/A:H","score":7,"rating":"HIGH"},{"scorer":"NVD","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:L/AC:H/PR:L/UI:N/S:U/C:H/I:H/A:H","score":7,"rating":"HIGH"}],"cwes":["CWE-362"],"affected":[{"ranges":[{"type":"git","introduced":"5fd0f1a02e750e2db4038dee60edea669ce5aab1","fixed":"56fe63b05ec84ae6674269d78397cec43a7a295a","status":"affected"},{"type":"git","introduced":"5fd0f1a02e750e2db4038dee60edea669ce5aab1","fixed":"0ba5b2f2c381dbec9ed9e4ab3ae5d3e667de0dc3","status":"affected"}],"vendor":"Linux","product":"Linux","repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","source":"cvelist"},{"ranges":[{"version":"6.14","status":"affected"},{"type":"semver","introduced":"0","fixed":"6.14","status":"unaffected"},{"type":"semver","introduced":"6.16.8","lastAffected":"6.16.*","status":"unaffected"},{"type":"original_commit_for_fix","introduced":"6.17","lastAffected":"*","status":"unaffected"}],"vendor":"Linux","product":"Linux","repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","source":"cvelist"},{"ranges":[{"status":"affected","fixed":"6.16.8"},{"status":"affected","version":"6.17"},{"status":"affected","version":"6.17"},{"status":"affected","version":"6.17"},{"status":"affected","version":"6.17"},{"status":"affected","version":"6.17"}],"vendor":"linux","product":"linux_kernel","cpe":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","source":"nvd"}],"references":[{"url":"https://git.kernel.org/stable/c/56fe63b05ec84ae6674269d78397cec43a7a295a","tags":["patch"],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/0ba5b2f2c381dbec9ed9e4ab3ae5d3e667de0dc3","tags":["patch"],"sources":["cvelist","nvd"]}],"credits":[],"assigner":"Linux","ssvc":{"scorer":"CISA-ADP","exploitation":"none","automatable":"no","technicalImpact":"total","date":"2026-01-14T19:30:27.795Z"},"sources":[{"source":"cvelist","name":"CVE List","id":"CVE-2025-39905","url":"https://www.cve.org/CVERecord?id=CVE-2025-39905","licence":"CVE Terms of Use","modified":"2026-05-11T21:38:40.520Z"},{"source":"nvd","name":"NVD","id":"CVE-2025-39905","url":"https://nvd.nist.gov/vuln/detail/CVE-2025-39905","licence":"Public domain","modified":"2026-10-19T21:10:00.160Z"}],"updatedAt":"2026-11-25T22:59:05.386Z","epss":{"score":0.00111,"percentile":0.01436,"date":"2026-12-01T12:00:22.000Z"}}