spi: hisi-kunpeng: Add verification for the max_frequency provided by the firmware
Linux
Affected versions
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
| No fix yet |
| Linux Linux |
|
Linux
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
| No fix yet |
| Linux Linux |
|
|
In the Linux kernel, the following vulnerability has been resolved:
spi: hisi-kunpeng: Add verification for the max_frequency provided by the firmware
If the value of max_speed_hz is 0, it may cause a division by zero error in hisi_calc_effective_speed(). The value of max_speed_hz is provided by firmware. Firmware is generally considered as a trusted domain. However, as division by zero errors can cause system failure, for defense measure, the value of max_speed is validated here. So 0 is regarded as invalid and an error code is returned.
From the CVE record · Linux
The Linux kernel’s hisi-kunpeng SPI driver can divide by zero if firmware provides a max_speed_hz value of 0. This can cause system failure; the input does not describe a network attack, authentication requirement, or user interaction.
Engineers running Linux kernels with the hisi-kunpeng SPI driver should check whether their kernel is affected; affected versions were not provided.