В ядре Linux была устранена следующая уязвимость: cpufreq/amd-pstate: handle missing policy in dynamic EPP callbacks cpufreq_cpu_get() возвращает NULL, когда политика cpufreq не связана с запрашиваемым CPU, например, из-за того, что CPU отключен или политика уже удалена. И amd_pstate_power_supply_notifier() и amd_pstate_profile_set() приобретают политику через cpufreq_cpu_get(), а затем передают этот указатель в amd_pstate_get_balanced_epp() и amd_pstate_set_epp(), которые безоговорочно отклоняют его. Таким образом, гоночный CPU hotplug или driver drawdown может привести к смещению указателя NULL на любом из этих динамических путей EPP.
Третий вызываемый cpufreq_cpu_get() в этом файле, amd_pstate_verify(), уже обрабатывает случай NULL. Приведите два новых вызывающего абонента в соответствие с этим шаблоном: верните NOTIFY_OK из уведомления об источнике питания (соответствуя другим выходам «нечего делать») и -ENODEV из amd_pstate_profile_set (обычная ошибка cpufreq для отсутствующей политики CPU). Найдено путем проверки кода; не протестировано на оборудовании.
Показать оригинальное описание (EN)
In the Linux kernel, the following vulnerability has been resolved: cpufreq/amd-pstate: handle missing policy in dynamic EPP callbacks cpufreq_cpu_get() returns NULL when no cpufreq policy is associated with the requested CPU, for example because the CPU is offline or the policy has already been torn down. Both amd_pstate_power_supply_notifier() and amd_pstate_profile_set() acquire a policy via cpufreq_cpu_get() and then pass that pointer to amd_pstate_get_balanced_epp() and amd_pstate_set_epp(), which dereference it unconditionally. A racing CPU hotplug or driver teardown can therefore lead to a NULL pointer dereference on either of these dynamic EPP paths. The third cpufreq_cpu_get() caller in this file, amd_pstate_verify(), already handles the NULL case. Bring the two new callers in line with that pattern: return NOTIFY_OK from the power-supply notifier (matching the other "nothing to do" exits) and -ENODEV from amd_pstate_profile_set() (the usual cpufreq error for a missing CPU policy). Found by code inspection; not tested on hardware.
Уязвимые продукты 2
| Конфигурация | От (включительно) | До (исключительно) |
|---|---|---|
|
Linux Linux_Kernel
cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*
|
7.1
|
7.2.6
|
|
Linux Linux_Kernel
cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*
|
7.1
|
7.3
|