CVE-2025-40255

net: core: prevent NULL deref in generic_hwtstamp_ioctl_lower()

State
Published
Severity
Not scored
Published
Dec 4, 2025
Updated
May 11, 2026
Reserved
Apr 16, 2025

Read the record on cve.org

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.

Scores

The record has no CVSS score.

Weaknesses

The record names no weakness.

Affected Products

ProductVersions
LinuxLinux
  • 6e9e2eed4f39d52edf5fd006409d211facf49f6b to before 8817f816ae41908e9625c0770c4af0dcdcc01238Affected
  • 6e9e2eed4f39d52edf5fd006409d211facf49f6b to before f796a8dec9beafcc0f6f0d3478ed685a15c5e062Affected
LinuxLinux
  • 6.14Affected
  • before 6.14Not affected
  • 6.17.10 through 6.17.*Not affected
  • 6.18 and laterNot affected

References

Every record here comes from the CVE Program’s CVE List. © 1999–2026 The MITRE Corporation. CVE is a registered trademark of The MITRE Corporation. The records are reproduced under the CVE Program terms of use.