В ядре Linux устранена следующая уязвимость:
трассировка: процесс_string() также позволяет использовать массивы
Чтобы обнаружить распространенную ошибку, когда TRACE_EVENT() TP_fast_assign()
присваивает адрес выделенной строки кольцевому буферу, а затем
ссылается на него в TP_printk(), который может быть выполнен через несколько часов, когда
строка свободна, функция test_event_printk() выполняется для всех событий как
они регистрируются, чтобы исключить нежелательное разыменование. Он вызывает Process_string() для обработки случаев в формате TP_printk(), которые
"%s". Он возвращает, безопасна ли строка.
Но оно может иметь некоторые
ложные срабатывания. Например, xe_bo_move() имеет:
TP_printk("move_lacks_source:%s, перенести объект %p [размер %zu] из %s в %s device_id:%s",
__entry->move_lacks_source ? "да" : "нет", __entry->bo, __entry->size,
xe_mem_type_to_name[__entry->old_placement],
xe_mem_type_to_name[__entry->new_placement], __get_str(device_id))
Где "%s" ссылается на xe_mem_type_to_name[]. Это массив из
указатели, которые должны быть безопасны для доступа к событию.
Вместо того, чтобы отмечать это плохая ссылка, если ссылка указывает на массив, где Поле записи является индексом, считайте это безопасным.
Показать оригинальное описание (EN)
In the Linux kernel, the following vulnerability has been resolved: tracing: Have process_string() also allow arrays In order to catch a common bug where a TRACE_EVENT() TP_fast_assign() assigns an address of an allocated string to the ring buffer and then references it in TP_printk(), which can be executed hours later when the string is free, the function test_event_printk() runs on all events as they are registered to make sure there's no unwanted dereferencing. It calls process_string() to handle cases in TP_printk() format that has "%s". It returns whether or not the string is safe. But it can have some false positives. For instance, xe_bo_move() has: TP_printk("move_lacks_source:%s, migrate object %p [size %zu] from %s to %s device_id:%s", __entry->move_lacks_source ? "yes" : "no", __entry->bo, __entry->size, xe_mem_type_to_name[__entry->old_placement], xe_mem_type_to_name[__entry->new_placement], __get_str(device_id)) Where the "%s" references into xe_mem_type_to_name[]. This is an array of pointers that should be safe for the event to access. Instead of flagging this as a bad reference, if a reference points to an array, where the record field is the index, consider it safe.
Характеристики атаки
Последствия
Строка CVSS v3.1
Уязвимые продукты 5
| Конфигурация | От (включительно) | До (исключительно) |
|---|---|---|
|
Linux Linux_Kernel
cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*
|
6.1.122
|
6.1.124
|
|
Linux Linux_Kernel
cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*
|
6.6.68
|
6.6.70
|
|
Linux Linux_Kernel
cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*
|
6.12.7
|
6.12.9
|
|
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:*:*:*:*:*:*
|
— | — |