CVE-2026-64120: net: ethtool: fix NULL pointer dereference in phy_reply_size
In the Linux kernel, the following vulnerability has been resolved:
net: ethtool: fix NULL pointer dereference in phyreplysize
In phypreparedata(), several strings such as 'name', 'drvname', 'upstreamsfpname', and 'downstreamsfpname' are allocated using kstrdup(). However, these allocations were not checked for failure.
If kstrdup() fails for 'name', it returns NULL while the function continues. This leads to a kernel NULL pointer dereference and panic later in phyreplysize() when it unconditionally calls strlen() on the NULL pointer.
While other strings like 'upstreamsfpname' might be checked before access in certain code paths, failing to handle these allocations consistently can lead to incomplete data reporting or hidden bugs.
Fix this by adding proper NULL checks for all kstrdup() calls in phypreparedata() and implement a centralized error handling path using goto labels to ensure all previously allocated resources are freed on failure.
Affected Software
Remediation
Event History
Frequently Asked Questions
What is the severity of CVE-2026-64120?
CVE-2026-64120 is classified with a risk score of 48.
How do I fix CVE-2026-64120?
To resolve CVE-2026-64120, update to the latest version of the Linux kernel where the vulnerability has been patched.
What type of vulnerability is CVE-2026-64120?
CVE-2026-64120 is a null pointer dereference vulnerability in the Linux kernel.
Which component of the Linux kernel is affected by CVE-2026-64120?
CVE-2026-64120 affects the ethtool component of the Linux kernel.
When was CVE-2026-64120 published?
CVE-2026-64120 was published on July 19, 2026.