Ad

CVE-2026-98563

NONE EPSS 0.20%
Обновлено 19 октября 2026
Linux
Параметр Значение
Поставщик Linux
Публичный эксплойт Нет

В ядре Linux была устранена следующая уязвимость: net: phylink: record the PHY only one recallup cannot fail phylink_bringup_phy() хранит PHY в pl->phydev до своего последнего шага, подверженного ошибкам: на MAC, чьи phylink ops реализуют LPI, phy_eee_rx_clock_stop() может выйти из строя с реальной ошибкой MDIO. Звонящие раскручиваются с помощью phy_detach(), который ничего не знает о pl->phydev, поэтому указатель на PHY, который больше не подключен, переживает неудачное соединение. phylink_connect_phy() проходит через phylink_attach_phy(), который отказывается прикрепляться, пока установлен pl->phydev, превращая временную ошибку MDIO в постоянную -EBUSY. Путь SFP хуже, чем это: sfp_sm_probe_phy() отвечает на сбой с помощью phy_device_remove() и phy_device_free(), и он назначает sfp->mod_phy только после этого возврата ошибки, поэтому ничто не очищает pl->phydev, и остается указывая на освобожденный phy_device, что phylink_resolve() и помощники ettool идут на чтение. phylink_fwnode_phy_connect() скрывает такую проблему.

Разъединение не делает: phylink_disconnect_phy () передает указатель на phy_disconnect (), а второй phy_detach () на том же PHY сбрасывает ссылки на первый уже выпущенный. Обнаруженный при создании порта DSA выживает в PHY, чей драйвер прибывает после датчиков коммутатора: сохранение порта через неудачное соединение и повторная попытка - это то, что делает это окно доступным. Опубликуйте указатель после последнего вызова, который может не сработать, вместо того, чтобы раскручивать его после.

Ничто между этими двумя точками не читает pl->phydev, и следующая регистрация не может потерпеть неудачу: phy_request_interrupt () возвращается к голосованию самостоятельно. Состояние PHY-стороны сохраняет порядок, который у него был, поэтому ни одна операция MDIO не движется относительно другой.

Показать оригинальное описание (EN)

In the Linux kernel, the following vulnerability has been resolved: net: phylink: record the PHY only once bringup cannot fail phylink_bringup_phy() stores the PHY in pl->phydev before its last fallible step: on a MAC whose phylink ops implement LPI, phy_eee_rx_clock_stop() can fail with a real MDIO error. The callers unwind with phy_detach(), which knows nothing about pl->phydev, so a pointer to a PHY that is no longer attached outlives the failed connect. What that costs depends on how the caller got here. phylink_connect_phy() goes through phylink_attach_phy(), which refuses to attach while pl->phydev is set, turning a transient MDIO error into a permanent -EBUSY. The SFP path is worse than that: sfp_sm_probe_phy() answers the failure with phy_device_remove() and phy_device_free(), and it assigns sfp->mod_phy only past that error return, so nothing clears pl->phydev and it is left pointing at a freed phy_device that phylink_resolve() and the ethtool helpers go on reading. phylink_fwnode_phy_connect() has no such check, so a later connect overwrites the stale pointer and hides the problem. A disconnect does not: phylink_disconnect_phy() hands that pointer to phy_disconnect(), and the second phy_detach() on the same PHY drops references the first one already released. Found while making a DSA port survive a PHY whose driver arrives after the switch probes: keeping the port across a failed connect and retrying is what makes this window reachable. Publish the pointer after the last call that can fail instead of unwinding it afterwards. Nothing between the two points reads pl->phydev, and the registration that follows cannot fail: phy_request_interrupt() falls back to polling on its own. The PHY-side state keeps the order it had, so no MDIO operation moves relative to another.