CVE-2025-40255
Severity CVSS v4.0:
Pending analysis
Type:
Unavailable / Other
Publication date:
04/12/2025
Last modified:
04/12/2025
Description
In the Linux kernel, the following vulnerability has been resolved:<br />
<br />
net: core: prevent NULL deref in generic_hwtstamp_ioctl_lower()<br />
<br />
The ethtool tsconfig Netlink path can trigger a null pointer<br />
dereference. A call chain such as:<br />
<br />
tsconfig_prepare_data() -><br />
dev_get_hwtstamp_phylib() -><br />
vlan_hwtstamp_get() -><br />
generic_hwtstamp_get_lower() -><br />
generic_hwtstamp_ioctl_lower()<br />
<br />
results in generic_hwtstamp_ioctl_lower() being called with<br />
kernel_cfg->ifr as NULL.<br />
<br />
The generic_hwtstamp_ioctl_lower() function does not expect<br />
a NULL ifr and dereferences it, leading to a system crash.<br />
<br />
Fix this by adding a NULL check for kernel_cfg->ifr in<br />
generic_hwtstamp_ioctl_lower(). If ifr is NULL, return -EINVAL.



