В ядре Linux устранена следующая уязвимость:
openrisc: сигнал: не восстанавливать привилегированные биты SR на sigreturn
restre_sigcontext() копирует весь регистр наблюдения (SR) из
сигнальный кадр и очищает SPR_SR_SM только перед повторной загрузкой значения в
аппаратный СР (через ЭСР и л.рфе) на возврат в пользовательское пространство. Все
остальные биты SR остаются под контролем пользователя. Таким образом, непривилегированная задача может вернуться из обработчика сигнала через
созданный сигфрейм, который очищает SPR_SR_DME.
Когда данные MMU отключены,
ЦП не выполняет трансляцию или защиту при доступе к данным, поэтому задача
получает доступ на чтение и запись к произвольной физической памяти, локальной
повышение привилегий. SPR_SR_IME, SPR_SR_SUMRA, SPR_SR_LEE, SPR_SR_EPH
и биты включения кэша отображаются таким же образом. Ресет ptrace GPR
уже отказывается от каких-либо изменений в СР именно по этой причине. Восстановить только биты арифметического флага (F, CY, OV) из сигнального кадра.
и возьмите каждый бит привилегированного управления из SR, на котором сохранено ядро.
вход сигнала.
Проверено с помощью qemu-system-or1k -M или 1k-sim: перед этим измените
непривилегированный PoC очищает SPR_SR_DME в rt_sigreturn и записывает маркер в
физический адрес 0x03000000 (за пределами памяти ядра = 32M); после этого
тот же PoC получает SIGSEGV, а физическая память не изменяется.
Показать оригинальное описание (EN)
In the Linux kernel, the following vulnerability has been resolved: openrisc: signal: do not restore privileged SR bits on sigreturn restore_sigcontext() copies the whole supervision register (SR) from the signal frame and only clears SPR_SR_SM before the value is reloaded into the hardware SR (through ESR and l.rfe) on the return to user space. All other SR bits are left under user control. An unprivileged task can thus return from a signal handler through a crafted sigframe that clears SPR_SR_DME. With the data MMU disabled the CPU performs no translation or protection on data accesses, so the task gains read and write access to arbitrary physical memory, a local privilege escalation. SPR_SR_IME, SPR_SR_SUMRA, SPR_SR_LEE, SPR_SR_EPH and the cache-enable bits are exposed the same way. The ptrace GPR regset already refuses any change to SR for exactly this reason. Restore only the arithmetic flag bits (F, CY, OV) from the signal frame and take every privileged control bit from the SR the kernel saved on signal entry. Verified with qemu-system-or1k -M or1k-sim: before this change an unprivileged PoC clears SPR_SR_DME in rt_sigreturn and writes a marker to physical address 0x03000000 (beyond the kernel's mem=32M); afterwards the same PoC receives SIGSEGV and physical memory is unchanged.
Характеристики атаки
Последствия
Строка CVSS v3.1
Уязвимые продукты 8
| Конфигурация | От (включительно) | До (исключительно) |
|---|---|---|
|
Linux Linux_Kernel
cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*
|
3.1
|
5.10.266
|
|
Linux Linux_Kernel
cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*
|
3.1
|
5.15.217
|
|
Linux Linux_Kernel
cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*
|
3.1
|
6.1.184
|
|
Linux Linux_Kernel
cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*
|
3.1
|
6.6.153
|
|
Linux Linux_Kernel
cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*
|
3.1
|
6.12.105
|
|
Linux Linux_Kernel
cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*
|
3.1
|
6.18.46
|
|
Linux Linux_Kernel
cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*
|
3.1
|
7.1.10
|
|
Linux Linux_Kernel
cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*
|
3.1
|
7.2
|