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.
{
"osv_generated_from": "https://github.com/CVEProject/cvelistV5/tree/main/cves/2026/64xxx/CVE-2026-64120.json",
"cna_assigner": "Linux"
}