В ядре Linux устранена следующая уязвимость:
Thunderbolt: свойство: Отклонить dir_len <4, чтобы предотвратить опустошение size_t
На некорневом пути __tb_property_parse_dir() берет dir_len из
запись->длина (u16 расширен до size_t). Два различных условия OOB
следовать, когда запись-> длина < 4:
1. Некорневой путь начинается с kmemdup(&block[dir_offset],
sizeof(*dir->uuid), ...) который всегда читает 4 dword из
dir_offset. tb_property_entry_valid() только применяет
dir_offset + запись->длина <= block_len, то есть созданная запись
с dir_offset ближе к концу блока свойств и
запись->длина в 0..3 пропускает этот шлюз, но позволяет копировать UUID
выйти из блока (например, dir_offset = 497, dir_len = 3 в
Блок из 500 слов читает блок [497..501]).
2.
После kmemdup content_len = dir_len - 4 опустошает size_t
до ~SIZE_MAX, записи становятся SIZE_MAX/4, а запись
walk запускает OOB на каждой итерации, пока запись не завершится неудачей
проверка или ядро не работает на несопоставленной странице. Отклонить dir_len < 4 на некорневом пути *до* UUID kmemdup,
который закрывает обе дырки. Также переместите INIT_LIST_HEAD(&dir->properties) сразу после
выделение каталога, поэтому новый путь возврата ошибок (и существующий
путь отказа uuid-alloc) вызов tb_property_free_dir() видит
проходной список, а не инициализированный нулем NULL next/prev, который
list_for_each_entry_safe() сработает.
Показать оригинальное описание (EN)
In the Linux kernel, the following vulnerability has been resolved: thunderbolt: property: Reject dir_len < 4 to prevent size_t underflow On the non-root path, __tb_property_parse_dir() takes dir_len from entry->length (u16 widened to size_t). Two distinct OOB conditions follow when entry->length < 4: 1. The non-root path begins with kmemdup(&block[dir_offset], sizeof(*dir->uuid), ...) which always reads 4 dwords from dir_offset. tb_property_entry_valid() only enforces dir_offset + entry->length <= block_len, so a crafted entry with dir_offset close to the end of the property block and entry->length in 0..3 passes that gate but lets the UUID copy run off the block (e.g. dir_offset = 497, dir_len = 3 in a 500-dword block reads block[497..501]). 2. After the kmemdup, content_len = dir_len - 4 underflows size_t to ~SIZE_MAX, nentries becomes SIZE_MAX / 4, and the entry walk runs OOB on each iteration until an entry fails validation or the kernel oopses on an unmapped page. Reject dir_len < 4 on the non-root path *before* the UUID kmemdup, which closes both holes. Also move INIT_LIST_HEAD(&dir->properties) up to immediately after the dir allocation so the new error-return path (and the existing uuid-alloc failure path) calling tb_property_free_dir() sees a walkable list rather than the zero-initialized NULL next/prev that list_for_each_entry_safe() would oops on.
Характеристики атаки
Последствия
Строка CVSS v3.1
Тип уязвимости (CWE)
Уязвимые продукты 12
| Конфигурация | От (включительно) | До (исключительно) |
|---|---|---|
|
Linux Linux_Kernel
cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*
|
4.15
|
5.10.259
|
|
Linux Linux_Kernel
cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*
|
5.11
|
5.15.210
|
|
Linux Linux_Kernel
cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*
|
5.16
|
6.1.176
|
|
Linux Linux_Kernel
cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*
|
6.2
|
6.6.143
|
|
Linux Linux_Kernel
cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*
|
6.7
|
6.12.93
|
|
Linux Linux_Kernel
cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*
|
6.13
|
6.18.35
|
|
Linux Linux_Kernel
cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*
|
6.19
|
7.0.12
|
|
Linux Linux_Kernel
cpe:2.3:o:linux:linux_kernel:7.1:rc1:*:*:*:*:*:*
|
— | — |
|
Linux Linux_Kernel
cpe:2.3:o:linux:linux_kernel:7.1:rc2:*:*:*:*:*:*
|
— | — |
|
Linux Linux_Kernel
cpe:2.3:o:linux:linux_kernel:7.1:rc3:*:*:*:*:*:*
|
— | — |
|
Linux Linux_Kernel
cpe:2.3:o:linux:linux_kernel:7.1:rc4:*:*:*:*:*:*
|
— | — |
|
Linux Linux_Kernel
cpe:2.3:o:linux:linux_kernel:7.1:rc5:*:*:*:*:*:*
|
— | — |