# CVE-2025-40255: net: core: prevent NULL deref in generic_hwtstamp_ioctl_lower()

- Severity: not scored yet
- 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.20%, higher than 10% of CVEs (2026-12-01)
- Published: 2025-12-04T16:08:17.023Z
- Modified: 2026-10-19T19:10:00.130Z
- Assigned by: Linux

## Description

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

net: core: prevent NULL deref in generic_hwtstamp_ioctl_lower()

The ethtool tsconfig Netlink path can trigger a null pointer
dereference. A call chain such as:

  tsconfig_prepare_data() ->
  dev_get_hwtstamp_phylib() ->
  vlan_hwtstamp_get() ->
  generic_hwtstamp_get_lower() ->
  generic_hwtstamp_ioctl_lower()

results in generic_hwtstamp_ioctl_lower() being called with
kernel_cfg->ifr as NULL.

The generic_hwtstamp_ioctl_lower() function does not expect
a NULL ifr and dereferences it, leading to a system crash.

Fix this by adding a NULL check for kernel_cfg->ifr in
generic_hwtstamp_ioctl_lower(). If ifr is NULL, return -EINVAL.

(As written by CVE List.)

## Affected

- Linux Linux: from 6e9e2eed4f39d52edf5fd006409d211facf49f6b before 8817f816ae41908e9625c0770c4af0dcdcc01238; from 6e9e2eed4f39d52edf5fd006409d211facf49f6b before f796a8dec9beafcc0f6f0d3478ed685a15c5e062; 6.14 (not affected: before 6.14; from 6.17.10 up to 6.17.*; from 6.18 up to *)

## References

- <https://git.kernel.org/stable/c/8817f816ae41908e9625c0770c4af0dcdcc01238>
- <https://git.kernel.org/stable/c/f796a8dec9beafcc0f6f0d3478ed685a15c5e062>

## Sources

- CVE List: [CVE-2025-40255](https://www.cve.org/CVERecord?id=CVE-2025-40255), CVE Terms of Use, modified 2026-05-11
- NVD: [CVE-2025-40255](https://nvd.nist.gov/vuln/detail/CVE-2025-40255), Public domain, modified 2026-10-19

---

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