В ядре Linux была устранена следующая уязвимость: printk: Исправлена возможная консольная use-after-free When, излучающая запись с помощью устаревшей печати, возможно, что происходит передача другому устаревшему контексту печати. Когда контекст выполняет передачу, блокировка чтения консоли SRCU освобождается, и указатель на структуру консоли теперь может быть недействительным. Поэтому, после вызова nbcon_legacy_emit_next_record() или console_emit_next_record(), необходимо проверить, произошла ли передача _до_ дальнейшего использования con.
Sashiko указал, что console_flush_one_record() не делает этого. В console_flush_one_record(), после выпуска записи, переместить дальнейшее использование con после проверки передачи.
Показать оригинальное описание (EN)
In the Linux kernel, the following vulnerability has been resolved: printk: Fix possible console use-after-free When emitting a record via legacy printing, it is possible that a handover to another legacy printing context occurs. When a context has performed a handover, the console SRCU read lock is released and the pointer to the console struct might now be invalid. Therefore, after calling nbcon_legacy_emit_next_record() or console_emit_next_record(), it is necessary to check if a handover occurred _before_ further @con usage. Sashiko pointed out that console_flush_one_record() was not doing this. In console_flush_one_record(), after emitting a record, move the further usage of @con after the handover check.