В ядре Linux устранена следующая уязвимость:
PCI: перед доступом проверьте заголовок ПЗУ и адрес структуры данных. Мы встречаем сбой при запуске стресс-нг на машине x86_64:
ОШИБКА: невозможно обработать ошибку страницы для адреса: ffa0000007f40000. RIP: 0010:pci_get_rom_size+0x52/0x220
Отслеживание вызова:
<ЗАДАЧА>
pci_map_rom+0x80/0x130
pci_read_rom+0x4b/0xe0
kernfs_file_read_iter+0x96/0x180
vfs_read+0x1b1/0x300
Наш анализ показывает, что начальный адрес пространства ПЗУ
0xffa0000007f30000, размер 0x10000.
Из-за нехватки места в ПЗУ,
перед вызовом readl(pds) значение pds равно 0xffa0000007f3ffff, что
уже указан на конец пространства ПЗУ, вызов readl() прочитает 4 байта
поэтому вызовите доступ за пределы границ и спровоцируйте сбой. Исправьте это с помощью
добавление заголовка изображения и проверка структуры данных. Мы также обнаружили еще один сбой на машине Arm64:
Невозможно обработать запрос на подкачку ядра по виртуальному адресу ffff8000dd1393ff.
Информация об прерывании памяти:
СОЭ = 0x0000000096000021
EC = 0x25: DABT (текущий EL), IL = 32 бита
НАБОР = 0, ФнВ = 0
ЕА = 0, S1PTW = 0
FSC = 0x21: ошибка выравнивания
Трассировка вызовов такая же, как и для x86_64, но причина сбоя в том, что
адрес структуры данных не соответствует 4, а машинный отчет Arm64
«ошибка выравнивания». Исправьте это, добавив проверку выравнивания.
[bhelgaas: сокращать имена функций, переносить комментарии]
Показать оригинальное описание (EN)
In the Linux kernel, the following vulnerability has been resolved: PCI: Check ROM header and data structure addr before accessing We meet a crash when running stress-ng on x86_64 machine: BUG: unable to handle page fault for address: ffa0000007f40000 RIP: 0010:pci_get_rom_size+0x52/0x220 Call Trace: <TASK> pci_map_rom+0x80/0x130 pci_read_rom+0x4b/0xe0 kernfs_file_read_iter+0x96/0x180 vfs_read+0x1b1/0x300 Our analysis reveals that the ROM space's start address is 0xffa0000007f30000, and size is 0x10000. Because of broken ROM space, before calling readl(pds), the pds's value is 0xffa0000007f3ffff, which is already pointed to the ROM space end, invoking readl() would read 4 bytes therefore cause an out-of-bounds access and trigger a crash. Fix this by adding image header and data structure checking. We also found another crash on arm64 machine: Unable to handle kernel paging request at virtual address ffff8000dd1393ff Mem abort info: ESR = 0x0000000096000021 EC = 0x25: DABT (current EL), IL = 32 bits SET = 0, FnV = 0 EA = 0, S1PTW = 0 FSC = 0x21: alignment fault The call trace is the same with x86_64, but the crash reason is that the data structure addr is not aligned with 4, and arm64 machine report "alignment fault". Fix this by adding alignment checking. [bhelgaas: shorten function names, wrap comments]
Характеристики атаки
Последствия
Строка CVSS v3.1
Уязвимые продукты 6
| Конфигурация | От (включительно) | До (исключительно) |
|---|---|---|
|
Linux Linux_Kernel
cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*
|
4.5
|
6.1.178
|
|
Linux Linux_Kernel
cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*
|
4.5
|
6.6.145
|
|
Linux Linux_Kernel
cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*
|
4.5
|
6.12.97
|
|
Linux Linux_Kernel
cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*
|
4.5
|
6.18.40
|
|
Linux Linux_Kernel
cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*
|
4.5
|
7.1.5
|
|
Linux Linux_Kernel
cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*
|
4.5
|
7.2-rc1
|