В ядре Linux устранена следующая уязвимость:
efi/capsule-loader: исправлен неправильный размер при перераспределении физического массива. Вызов krealloc() для cap_info->phys в __efi_capsule_setup_info() использует
sizeof(phys_addr_t *) вместо sizeof(phys_addr_t), что может быть
вызывая недостаточное выделение. Распределение также несовместимо с исходным распределением массива в
efi_capsule_open(), который выделяет одну запись с помощью sizeof(phys_addr_t),
и функция efi_capsule_write(), которая сохраняет значения phys_addr_t (не
указатели) через page_to_phys().
В 64-битных системах, где sizeof(phys_addr_t) == sizeof(phys_addr_t *), это
проходит незаметно. В 32-битных системах с PAE, где phys_addr_t — 64-битный, но
указатели 32-битные, при этом выделяется половина необходимого пространства, что может
привести к переполнению буфера кучи при хранении физических адресов. Это похоже на ошибку, исправленную в коммите fccfa646ef36 («efi/capsule-loader:
исправить неправильный размер выделения"), что устранило ту же проблему на начальном этапе.
место распределения.
Показать оригинальное описание (EN)
In the Linux kernel, the following vulnerability has been resolved: efi/capsule-loader: fix incorrect sizeof in phys array reallocation The krealloc() call for cap_info->phys in __efi_capsule_setup_info() uses sizeof(phys_addr_t *) instead of sizeof(phys_addr_t), which might be causing an undersized allocation. The allocation is also inconsistent with the initial array allocation in efi_capsule_open() that allocates one entry with sizeof(phys_addr_t), and the efi_capsule_write() function that stores phys_addr_t values (not pointers) via page_to_phys(). On 64-bit systems where sizeof(phys_addr_t) == sizeof(phys_addr_t *), this goes unnoticed. On 32-bit systems with PAE where phys_addr_t is 64-bit but pointers are 32-bit, this allocates half the required space, which might lead to a heap buffer overflow when storing physical addresses. This is similar to the bug fixed in commit fccfa646ef36 ("efi/capsule-loader: fix incorrect allocation size") which fixed the same issue at the initial allocation site.
Характеристики атаки
Последствия
Строка CVSS v3.1
Уязвимые продукты 12
| Конфигурация | От (включительно) | До (исключительно) |
|---|---|---|
|
Linux Linux_Kernel
cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*
|
4.14.13
|
4.15
|
|
Linux Linux_Kernel
cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*
|
4.15.1
|
5.10.258
|
|
Linux Linux_Kernel
cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*
|
5.11
|
5.15.209
|
|
Linux Linux_Kernel
cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*
|
5.16
|
6.1.175
|
|
Linux Linux_Kernel
cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*
|
6.2
|
6.6.141
|
|
Linux Linux_Kernel
cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*
|
6.7
|
6.12.91
|
|
Linux Linux_Kernel
cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*
|
6.13
|
6.18.33
|
|
Linux Linux_Kernel
cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*
|
6.19
|
7.0.10
|
|
Linux Linux_Kernel
cpe:2.3:o:linux:linux_kernel:4.15:-:*:*:*:*:*:*
|
— | — |
|
Linux Linux_Kernel
cpe:2.3:o:linux:linux_kernel:4.15:rc7:*:*:*:*:*:*
|
— | — |
|
Linux Linux_Kernel
cpe:2.3:o:linux:linux_kernel:4.15:rc8:*:*:*:*:*:*
|
— | — |
|
Linux Linux_Kernel
cpe:2.3:o:linux:linux_kernel:4.15:rc9:*:*:*:*:*:*
|
— | — |