В ядре Linux устранена следующая уязвимость:
Thermal/debugfs: исправлены две проблемы с блокировкой при отладке тепловой зоны. С текущим механизмом блокировки тепловой зоны в коде debugfs,
пользовательское пространство может открыть файл «смягчения» для тепловой зоны перед
установлен указатель debugfs зоны, что приведет к NULL-указателю
разыменование в tze_seq_start(). Более того, Thermal_debug_tz_remove() не вызывается в режиме Thermal.
блокировка зоны, чтобы она могла работать параллельно с другими функциями, обращающимися к
объект структуры Thermal_debugfs тепловой зоны.
Тогда может прояснится
tz->debugfs после того, как одна из этих функций проверила его и
Объект struct Thermal_debugfs может быть освобожден преждевременно. Чтобы решить первую проблему, передайте указатель на термальную зону.
структурируйте объект Thermal_debugfs для debugfs_create_file() в
Thermal_debug_tz_add() и создайте tze_seq_start(), tze_seq_next(),
tze_seq_stop() и tze_seq_show() извлекают его из s->private
вместо указателя на объект тепловой зоны. Это обеспечит
что tz_debugfs будет действителен при доступе к файлу «смягчения»
до тех пор, пока Thermal_debugfs_remove_id() не будет вызвана Thermal_debug_tz_remove()
удаляет этот файл.
Чтобы решить вторую проблему, используйте tz->lock в Thermal_debug_tz_remove().
вокруг проверки значения tz->debugfs (в случае, если одна и та же тепловая зона
удален одновременно в двух разных потоках) и его сброс в NULL. Копия: 6.8+ <stable@vger.kernel.org> # 6.8+
Показать оригинальное описание (EN)
In the Linux kernel, the following vulnerability has been resolved: thermal/debugfs: Fix two locking issues with thermal zone debug With the current thermal zone locking arrangement in the debugfs code, user space can open the "mitigations" file for a thermal zone before the zone's debugfs pointer is set which will result in a NULL pointer dereference in tze_seq_start(). Moreover, thermal_debug_tz_remove() is not called under the thermal zone lock, so it can run in parallel with the other functions accessing the thermal zone's struct thermal_debugfs object. Then, it may clear tz->debugfs after one of those functions has checked it and the struct thermal_debugfs object may be freed prematurely. To address the first problem, pass a pointer to the thermal zone's struct thermal_debugfs object to debugfs_create_file() in thermal_debug_tz_add() and make tze_seq_start(), tze_seq_next(), tze_seq_stop(), and tze_seq_show() retrieve it from s->private instead of a pointer to the thermal zone object. This will ensure that tz_debugfs will be valid across the "mitigations" file accesses until thermal_debugfs_remove_id() called by thermal_debug_tz_remove() removes that file. To address the second problem, use tz->lock in thermal_debug_tz_remove() around the tz->debugfs value check (in case the same thermal zone is removed at the same time in two different threads) and its reset to NULL. Cc :6.8+ <stable@vger.kernel.org> # 6.8+
Характеристики атаки
Последствия
Строка CVSS v3.1
Тип уязвимости (CWE)
Уязвимые продукты 7
| Конфигурация | От (включительно) | До (исключительно) |
|---|---|---|
|
Linux Linux_Kernel
cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*
|
6.8
|
6.8.10
|
|
Linux Linux_Kernel
cpe:2.3:o:linux:linux_kernel:6.9:rc1:*:*:*:*:*:*
|
— | — |
|
Linux Linux_Kernel
cpe:2.3:o:linux:linux_kernel:6.9:rc2:*:*:*:*:*:*
|
— | — |
|
Linux Linux_Kernel
cpe:2.3:o:linux:linux_kernel:6.9:rc3:*:*:*:*:*:*
|
— | — |
|
Linux Linux_Kernel
cpe:2.3:o:linux:linux_kernel:6.9:rc4:*:*:*:*:*:*
|
— | — |
|
Linux Linux_Kernel
cpe:2.3:o:linux:linux_kernel:6.9:rc5:*:*:*:*:*:*
|
— | — |
|
Linux Linux_Kernel
cpe:2.3:o:linux:linux_kernel:6.9:rc6:*:*:*:*:*:*
|
— | — |