powercap: intel_rapl: fix UBSAN shift-out-of-bounds issue
Linux
Affected versions
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
|
Linux
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
|
≥ 2d281d8196e38dd3a4ee9af26621ddde8329f269 · < 139bbbd01114433b80fe59f5e1330615aadf9752| No fix yet |
| Linux Linux |
|
|
In the Linux kernel, the following vulnerability has been resolved:
powercap: intel_rapl: fix UBSAN shift-out-of-bounds issue
When value < time_unit, the parameter of ilog2() will be zero and the return value is -1. u64(-1) is too large for shift exponent and then will trigger shift-out-of-bounds:
shift exponent 18446744073709551615 is too large for 32-bit type 'int' Call Trace: rapl_compute_time_window_core rapl_write_data_raw set_time_window store_constraint_time_window_us
From the CVE record · Linux
The Linux kernel’s intel_rapl powercap code can trigger a shift-out-of-bounds error when a time-window value is smaller than the time unit. The error occurs while writing a constraint time window; the input does not specify attacker access requirements or user interaction.
Engineers running Linux kernels with the intel_rapl powercap component should check their versions; affected versions are not specified.