В ядре Linux устранена следующая уязвимость:
isofs: привязывает компоненты символической ссылки Rock Ridge к записи SL.
get_symlink_chunk() и обработка SL в
parse_rock_ridge_inode_internal() обходит компоненты переменной длины
запись Rock Ridge "SL" (символическая ссылка). Каждый компонент представляет собой двухбайтовый
заголовок (флаги, длина), за которым следует лен байт текста, поэтому он занимает
slp->len + 2 байта. Оба цикла читают slp->len и переходят к следующему.
компонент, а get_symlink_chunk() дополнительно выполняет
memcpy(rpnt, slp->text, slp->len), но ни один из них не проверяет, что компонент
находится внутри записи SL до ее разыменования.
Созданная запись SL, компонент которой объявляет len, проходящий мимо
запись (rr->len), следовательно, запускает чтение за пределами допустимого диапазона до 255
байты. Когда запись находится в конце резервного буфера - для
пример небольшого блока продолжения kmalloc()ed, доступного через CE
запись — чтение пересекает выделение; get_symlink_chunk(), затем
копирует байты за пределами границ в тело символической ссылки, возвращаемой пользователю
пространство с помощью readlink(), раскрывая соседнюю память ядра. Образы ISO 9660 обычно монтируются с ненадежных съемных носителей.
среды рабочего стола автоматически монтируют их (например, через udisks2) без
CAP_SYS_ADMIN — чтобы содержимое записи контролировалось злоумышленником.
Отклонить любой компонент, который не помещается в оставшиеся байты записи.
прежде чем использовать его. В get_symlink_chunk() верните NULL, как существующий
проверки выходного буфера (plimit), поэтому неверная запись делает readlink()
потерпеть неудачу с -EIO, а не молча возвращать усеченную цель; в
parse_rock_ridge_inode_internal() останавливает обход размера индексного дескриптора.
Показать оригинальное описание (EN)
In the Linux kernel, the following vulnerability has been resolved: isofs: bound Rock Ridge symlink components to the SL record get_symlink_chunk() and the SL handling in parse_rock_ridge_inode_internal() walk the variable-length components of a Rock Ridge "SL" (symbolic link) record. Each component is a two-byte header (flags, len) followed by len bytes of text, so it occupies slp->len + 2 bytes. Both loops read slp->len and advance to the next component, and get_symlink_chunk() additionally does memcpy(rpnt, slp->text, slp->len), but neither checks that the component lies within the SL record before dereferencing it. A crafted SL record whose component declares a len that runs past the record (rr->len) therefore triggers an out-of-bounds read of up to 255 bytes. When the record sits at the tail of its backing buffer - for example a small kmalloc()ed continuation block reached through a CE record - the read crosses the allocation; get_symlink_chunk() then copies the out-of-bounds bytes into the symlink body returned to user space by readlink(), disclosing adjacent kernel memory. ISO 9660 images are routinely mounted from untrusted removable media - desktop environments auto-mount them (e.g. via udisks2) without CAP_SYS_ADMIN - so the record contents are attacker-controlled. Reject any component that does not fit in the remaining record bytes before using it. In get_symlink_chunk() return NULL, like the existing output-buffer (plimit) checks, so a malformed record makes readlink() fail with -EIO rather than silently returning a truncated target; in parse_rock_ridge_inode_internal() stop the inode-size walk.
Характеристики атаки
Последствия
Строка CVSS v3.1
Тип уязвимости (CWE)
Уязвимые продукты 12
| Конфигурация | От (включительно) | До (исключительно) |
|---|---|---|
|
Linux Linux_Kernel
cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*
|
2.6.12.1
|
5.10.261
|
|
Linux Linux_Kernel
cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*
|
5.11
|
5.15.212
|
|
Linux Linux_Kernel
cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*
|
5.16
|
6.1.178
|
|
Linux Linux_Kernel
cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*
|
6.2
|
6.6.145
|
|
Linux Linux_Kernel
cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*
|
6.7
|
6.12.96
|
|
Linux Linux_Kernel
cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*
|
6.13
|
6.18.39
|
|
Linux Linux_Kernel
cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*
|
6.19
|
7.1.4
|
|
Linux Linux_Kernel
cpe:2.3:o:linux:linux_kernel:2.6.12:-:*:*:*:*:*:*
|
— | — |
|
Linux Linux_Kernel
cpe:2.3:o:linux:linux_kernel:2.6.12:rc2:*:*:*:*:*:*
|
— | — |
|
Linux Linux_Kernel
cpe:2.3:o:linux:linux_kernel:2.6.12:rc3:*:*:*:*:*:*
|
— | — |
|
Linux Linux_Kernel
cpe:2.3:o:linux:linux_kernel:2.6.12:rc4:*:*:*:*:*:*
|
— | — |
|
Linux Linux_Kernel
cpe:2.3:o:linux:linux_kernel:2.6.12:rc5:*:*:*:*:*:*
|
— | — |