# CVE-2026-64120: net: ethtool: fix NULL pointer dereference in phy_reply_size

- Severity: Medium 5.5 (CVSS:3.1, scored by NVD) `CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H`
- Known to be exploited: not in CISA's catalogue, which lists only what CISA has confirmed
- Likelihood of exploitation in the next 30 days (EPSS): 0.12%, higher than 2% of CVEs (2026-12-01)
- Published: 2026-07-19T15:40:19.044Z
- Modified: 2026-08-13T15:11:48.607Z
- Weaknesses: CWE-476
- Assigned by: Linux

## Description

In the Linux kernel, the following vulnerability has been resolved:

net: ethtool: fix NULL pointer dereference in phy_reply_size

In phy_prepare_data(), several strings such as 'name', 'drvname',
'upstream_sfp_name', and 'downstream_sfp_name' 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 phy_reply_size() when it unconditionally calls strlen() on
the NULL pointer.

While other strings like 'upstream_sfp_name' 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
phy_prepare_data() and implement a centralized error handling path
using goto labels to ensure all previously allocated resources are
freed on failure.

(As written by CVE List.)

## Affected

- Linux Linux: from 9dd2ad5e92b962d1349a7541d167e8e214e49f95 before 61f53c1e58d68723bc1db10912a53f1991f08719; from 9dd2ad5e92b962d1349a7541d167e8e214e49f95 before 3dbe20a3809347bacda890822e7ca013bd85a18c; from 9dd2ad5e92b962d1349a7541d167e8e214e49f95 before 4908f1395fb1b832ceec11584af649874a2732ea; 6.16 (not affected: before 6.16; from 6.18.34 up to 6.18.*; from 7.0.11 up to 7.0.*; from 7.1 up to *)
- linux linux_kernel: from 6.16 before 6.18.34; from 6.19 before 7.0.11; 7.1

## References

- <https://git.kernel.org/stable/c/61f53c1e58d68723bc1db10912a53f1991f08719> (patch)
- <https://git.kernel.org/stable/c/3dbe20a3809347bacda890822e7ca013bd85a18c> (patch)
- <https://git.kernel.org/stable/c/4908f1395fb1b832ceec11584af649874a2732ea> (patch)

## Sources

- CVE List: [CVE-2026-64120](https://www.cve.org/CVERecord?id=CVE-2026-64120), CVE Terms of Use, modified 2026-07-19
- NVD: [CVE-2026-64120](https://nvd.nist.gov/vuln/detail/CVE-2026-64120), Public domain, modified 2026-08-13

---

Page: https://cve.day/CVE-2026-64120 · Whole record: https://cve.day/CVE-2026-64120.json · Rebuilt by cve.day 2026-11-25T22:59:29.157Z
