В ядре Linux устранена следующая уязвимость:
топология: сохраняйте маску cpumask неизменной при печати cpumap. Во время фазз-тестирования было обнаружено следующее предупреждение:
разные возвращаемые значения (15 и 11) из vsnprintf("%*pbl
", ...)
тест:keyward ПРЕДУПРЕЖДАЕТ в kvasprintf
ВНИМАНИЕ: ЦП: 55 PID: 1168477 в lib/kasprintf.c:30 kvasprintf+0x121/0x130
Отслеживание вызова:
кваспринтф+0x121/0x130
каспринтф+0xa6/0xe0
bitmap_print_to_buf+0x89/0x100
core_siblings_list_read+0x7e/0xb0
kernfs_file_read_iter+0x15b/0x270
new_sync_read+0x153/0x260
vfs_read+0x215/0x290
ksys_read+0xb9/0x160
do_syscall_64+0x56/0x100
запись_SYSCALL_64_after_hwframe+0x78/0xe2
Трассировка вызова показывает, что kvasprintf() сообщил об этом предупреждении во время
печать core_siblings_list. kvasprintf() состоит из нескольких шагов:
(1) Сначала вычислите длину полученной форматированной строки.
(2) Выделите буфер на основе возвращаемой длины.
(3) Затем выполните фактическое форматирование строки.
(4) Проверьте, возвращена ли длина форматированных строк.
шаги (1) и (2) последовательны. Если core_cpumask изменяется между шагами (1) и (3), длины
полученные на этих двух этапах могут не совпадать.
Действительно, наш тест включает в себя процессор
горячее подключение, которое должно изменять core_cpumask во время печати. Чтобы устранить эту проблему, перед этим кэшируйте cpumask во временную переменную.
вызов cpumap_print_{list, cpumask}_to_buf(), чтобы сохранить его без изменений
в процессе печати.
Показать оригинальное описание (EN)
In the Linux kernel, the following vulnerability has been resolved: topology: Keep the cpumask unchanged when printing cpumap During fuzz testing, the following warning was discovered: different return values (15 and 11) from vsnprintf("%*pbl ", ...) test:keyward is WARNING in kvasprintf WARNING: CPU: 55 PID: 1168477 at lib/kasprintf.c:30 kvasprintf+0x121/0x130 Call Trace: kvasprintf+0x121/0x130 kasprintf+0xa6/0xe0 bitmap_print_to_buf+0x89/0x100 core_siblings_list_read+0x7e/0xb0 kernfs_file_read_iter+0x15b/0x270 new_sync_read+0x153/0x260 vfs_read+0x215/0x290 ksys_read+0xb9/0x160 do_syscall_64+0x56/0x100 entry_SYSCALL_64_after_hwframe+0x78/0xe2 The call trace shows that kvasprintf() reported this warning during the printing of core_siblings_list. kvasprintf() has several steps: (1) First, calculate the length of the resulting formatted string. (2) Allocate a buffer based on the returned length. (3) Then, perform the actual string formatting. (4) Check whether the lengths of the formatted strings returned in steps (1) and (2) are consistent. If the core_cpumask is modified between steps (1) and (3), the lengths obtained in these two steps may not match. Indeed our test includes cpu hotplugging, which should modify core_cpumask while printing. To fix this issue, cache the cpumask into a temporary variable before calling cpumap_print_{list, cpumask}_to_buf(), to keep it unchanged during the printing process.
Характеристики атаки
Последствия
Строка CVSS v3.1
Уязвимые продукты 10
| Конфигурация | От (включительно) | До (исключительно) |
|---|---|---|
|
Linux Linux_Kernel
cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*
|
5.15
|
5.15.177
|
|
Linux Linux_Kernel
cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*
|
5.16
|
6.1.125
|
|
Linux Linux_Kernel
cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*
|
6.2
|
6.6.72
|
|
Linux Linux_Kernel
cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*
|
6.7
|
6.12.10
|
|
Linux Linux_Kernel
cpe:2.3:o:linux:linux_kernel:6.13:rc1:*:*:*:*:*:*
|
— | — |
|
Linux Linux_Kernel
cpe:2.3:o:linux:linux_kernel:6.13:rc2:*:*:*:*:*:*
|
— | — |
|
Linux Linux_Kernel
cpe:2.3:o:linux:linux_kernel:6.13:rc3:*:*:*:*:*:*
|
— | — |
|
Linux Linux_Kernel
cpe:2.3:o:linux:linux_kernel:6.13:rc4:*:*:*:*:*:*
|
— | — |
|
Linux Linux_Kernel
cpe:2.3:o:linux:linux_kernel:6.13:rc5:*:*:*:*:*:*
|
— | — |
|
Linux Linux_Kernel
cpe:2.3:o:linux:linux_kernel:6.13:rc6:*:*:*:*:*:*
|
— | — |