ethtool: eeprom: add more safeties to EEPROM Netlink fallback
Linux
Affected versions
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
|
Linux
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
|
≥ 96d971e307cc0e434f96329b42bbd98cfbca07d2 · < 4fe1bc4b3603f621240d5b401742f302190db769| No fix yet |
| Linux Linux |
|
|
In the Linux kernel, the following vulnerability has been resolved:
ethtool: eeprom: add more safeties to EEPROM Netlink fallback
The Netlink fallback path for reading module EEPROM (fallback_set_params()) validates that offset < eeprom_len, but does not check that offset + length stays within eeprom_len. The ioctl equivalent (ethtool_get_any_eeprom() in ioctl.c) has always enforced both bounds:
if (eeprom.offset + eeprom.len > total_len) return -EINVAL;
This could lead to surprises in both drivers and device FW. Add the missing offset + length validation to fallback_set_params(), mirroring the ioctl.
Similarly - ethtool core in general, and ethtool_get_any_eeprom() in particular tries to zero-init all buffers passed to the drivers to avoid any extra work of zeroing things out. eeprom_fallback() uses a plain kmalloc(), change it to zalloc.
From the CVE record · Linux
The Linux kernel's ethtool EEPROM Netlink fallback checks the requested offset but not whether the requested length extends beyond the EEPROM. A request using this fallback path could reach drivers or device firmware with an out-of-bounds range. The input does not specify access or authentication requirements.
Engineers running the Linux kernel should check their versions against the vendor advisory; affected versions are not specified.