В ядре Linux была устранена следующая уязвимость: регулятор: tps6594-регулятор: Fix n_linear_ranges for TPS65224 BUCK2-4 The TPS65224 BUCK2, дескрипторы BUCK3 и BUCK4 проходят 4 как n_linear_ranges, но tps65224_bucks_2_3_4_ranges[] имеет только две записи, охватывающие селекторы 0x00-0x45. Линейные помощники диапазона зацикливаются над записями n_linear_ranges, поэтому любой поиск селектора выше 0x45 читает через конец массива и рассматривает все, что следует за ним, как еще два диапазона. Это происходит на обычном пути регистрации, когда ядро проверяет ограничения напряжения против каждого селектора.
TPS652G1 использует те же дескрипторы и также подвержен влиянию. Используйте ARRAY_SIZE(), чтобы число всегда соответствовало таблице.
Показать оригинальное описание (EN)
In the Linux kernel, the following vulnerability has been resolved: regulator: tps6594-regulator: Fix n_linear_ranges for TPS65224 BUCK2-4 The TPS65224 BUCK2, BUCK3 and BUCK4 descriptors pass 4 as n_linear_ranges, but tps65224_bucks_2_3_4_ranges[] only has two entries, covering selectors 0x00-0x45. The linear range helpers loop over n_linear_ranges entries, so any lookup of a selector above 0x45 reads past the end of the array and treats whatever follows it as two more ranges. This happens on the normal registration path when the core checks the voltage constraints against every selector. TPS652G1 uses the same descriptors and is affected too. Use ARRAY_SIZE() so the count always matches the table.