CVE-2026-139190: net: usb: lan78xx: avoid NULL PHY dereference in WoL setup
In the Linux kernel, the following vulnerability has been resolved:
net: usb: lan78xx: avoid NULL PHY dereference in WoL setup
LAN7801 supports fixed-link configurations without an attached PHY. However, lan78xxsetwol() unconditionally passes netdev->phydev to phyethtoolsetwol(), causing a NULL pointer dereference when a userspace WoL request reaches this path.
Report no WoL capabilities when no PHY is attached, and return -EOPNOTSUPP from lan78xxsetwol() before modifying the wakeup configuration. Keep the existing phylib WoL handling for devices with an attached PHY.
The issue was reproduced using USB Raw Gadget and dummyhcd in QEMU. An ETHTOOLSWOL ioctl triggered a kernel Oops with the original driver. With this change, the PHY-less configuration no longer advertises unsupported WoL operations, avoiding the crash.
Affected Software
Event History
Frequently Asked Questions
Which systems are exposed to the crash?
Systems using the Linux lan78xx USB network driver for a LAN7801 device configured with a fixed link and no attached PHY are affected. Devices with an attached PHY continue to use the existing phylib Wake-on-LAN handling.
What is required to trigger the issue?
A userspace Wake-on-LAN configuration request must reach the driver, such as an ETHTOOL_SWOL ioctl. On a PHY-less fixed-link configuration, the driver dereferences the absent netdev PHY pointer and can cause a kernel Oops.
Does a PHY-less configuration support Wake-on-LAN after the fix?
No. The fixed behavior reports no Wake-on-LAN capabilities when no PHY is attached and rejects Wake-on-LAN setup with -EOPNOTSUPP before changing wakeup configuration.
What can be done before applying the fix?
Avoid issuing userspace Wake-on-LAN setup requests against LAN7801 interfaces configured without an attached PHY. This prevents the vulnerable lan78xx Wake-on-LAN setup path from being invoked.