В ядре Linux устранена следующая уязвимость:
crypto: asymmetric_keys — исправлено чтение OOB в pefile_digest_pe_contents.
pefile_digest_pe_contents() вычисляет длину хэша конечных данных как
пелен — (хешированные_байты + размер_сертификата). Созданный PE может внести дополнение
превысить pelen, в результате чего беззнаковое вычитание опустеет до ~4 ГиБ. Это передается в crypto_shash_update(), который считывает данные за пределы и
паника на несопоставленных защитных страницах vmalloc.
ОШИБКА: невозможно обработать ошибку страницы для адреса: ffffc900038d8000. Упс: Упс: 0000 [#1] СМП КАСАН НОПТИ
RIP: 0010:sha256_blocks_generic (lib/crypto/sha256.c:152)
Отслеживание вызова:
<ЗАДАЧА>
__sha256_update (lib/crypto/sha256.c:208)
crypto_sha256_update (crypto/sha256.c:142)
verify_pefile_signature (crypto/asymmetric_keys/verify_pefile.c:436)
kexec_kernel_verify_pe_sig (kernel/kexec_file.c:151)
__do_sys_kexec_file_load (ядро/kexec_file.c:406)
do_syscall_64 (arch/x86/entry/syscall_64.c:94)
запись_SYSCALL_64_after_hwframe (arch/x86/entry/entry_64.S:121)
</TASK>
Паника ядра – не синхронизируется: фатальное исключение
Убедитесь, что добавление не переполняется и результат не
превысить пелен перед вычитанием. Возврат -ELIBBAD в случае неудачи.
Показать оригинальное описание (EN)
In the Linux kernel, the following vulnerability has been resolved: crypto: asymmetric_keys - fix OOB read in pefile_digest_pe_contents pefile_digest_pe_contents() computes the trailing-data hash length as pelen - (hashed_bytes + certs_size). A crafted PE can make the addition exceed pelen, causing the unsigned subtraction to underflow to ~4 GiB. This is passed to crypto_shash_update() which reads out of bounds and panics on unmapped vmalloc guard pages. BUG: unable to handle page fault for address: ffffc900038d8000 Oops: Oops: 0000 [#1] SMP KASAN NOPTI RIP: 0010:sha256_blocks_generic (lib/crypto/sha256.c:152) Call Trace: <TASK> __sha256_update (lib/crypto/sha256.c:208) crypto_sha256_update (crypto/sha256.c:142) verify_pefile_signature (crypto/asymmetric_keys/verify_pefile.c:436) kexec_kernel_verify_pe_sig (kernel/kexec_file.c:151) __do_sys_kexec_file_load (kernel/kexec_file.c:406) do_syscall_64 (arch/x86/entry/syscall_64.c:94) entry_SYSCALL_64_after_hwframe (arch/x86/entry/entry_64.S:121) </TASK> Kernel panic - not syncing: Fatal exception Validate that the addition does not overflow and the result does not exceed pelen before the subtraction. Return -ELIBBAD on failure.
Характеристики атаки
Последствия
Строка CVSS v3.1
Тип уязвимости (CWE)
Уязвимые продукты 7
| Конфигурация | От (включительно) | До (исключительно) |
|---|---|---|
|
Linux Linux_Kernel
cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*
|
3.17
|
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.97
|
|
Linux Linux_Kernel
cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*
|
6.13
|
6.18.40
|
|
Linux Linux_Kernel
cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*
|
6.19
|
7.1.5
|