cpufreq: intel_pstate: Fix NULL pointer dereference in update_cpu_qos_request()
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 |
|
|
6.18.196.19.97.0In the Linux kernel, the following vulnerability has been resolved:
cpufreq: intel_pstate: Fix NULL pointer dereference in update_cpu_qos_request()
The update_cpu_qos_request() function attempts to initialize the 'freq' variable by dereferencing 'cpudata' before verifying if the 'policy' is valid.
This issue occurs on systems booted with the "nosmt" parameter, where all_cpu_data[cpu] is NULL for the SMT sibling threads. As a result, any call to update_qos_requests() will result in a NULL pointer dereference as the code will attempt to access pstate.turbo_freq using the NULL cpudata pointer.
Also, pstate.turbo_freq may be updated by intel_pstate_get_hwp_cap() after initializing the 'freq' variable, so it is better to defer the 'freq' until intel_pstate_get_hwp_cap() has been called.
Fix this by deferring the 'freq' assignment until after the policy and driver_data have been validated.
[ rjw: Added one paragraph to the changelog ]
From the CVE record · Linux
The Linux kernel’s intel_pstate driver can dereference a NULL pointer when updating CPU QoS requests on systems booted with the nosmt parameter. This can cause a kernel crash; the input does not describe an attacker path, authentication requirement, or user interaction.
Operators running the Linux kernel on systems booted with nosmt should check whether their kernel includes the fix; affected versions are not specified.