В ядре Linux устранена следующая уязвимость:
трассировка: исправление использования триггера освобождения после освобождения частных данных. Commit 61d445af0a7c («трассировка: добавить массовую сборку мусора для освобождения
event_trigger_data") переместил kfree() из event_trigger_data в kthread.
который запускает функцию Tracepoint_synchronize_unregister() перед освобождением. Это удалило
синхронизация, которую обратные вызовы триггера .free используются для неявного и
встроенный из триггера_data_free().
event_hist_trigger_free(), event_hist_trigger_named_free() и
event_enable_trigger_free() освобождает свои спутниковые данные (hist_data, cmd_ops,
Enable_data) сразу после возврата триггера_data_free().
С
синхронизация теперь отложена до kthread, одновременной точки трассировки
обработчик все еще может получить доступ к этим данным через триггер list_del_rcu(),
вызывая использование после бесплатного использования. Разбор гистограммы должен оставаться синхронным: remove_hist_vars() и
unregister_field_var_hists() должен отделить синтетическое событие от
гистограмма перед возвратом записи для удаления триггера, в противном случае произойдет следующее
команда вступает в силу, и удаление синтетического события завершается с ошибкой -EBUSY, так как
Самотестирование триггера-synthetic-eprobe.tc ловит. Заставьте эти обратные вызовы подождать
с правильным барьером — трассировка_синхронизации_unregister(), соответствие
свободный kthread - перед освобождением.
Триггер включения не имеет такого синхронного требования, и блокирующий
синхронизация там приведет к повторной сериализации пути, который намеренно зафиксирован
отложено. Дайте ему дополнительный обратный вызов Private_data_free(), который будет доступен бесплатно.
kthread запускается после льготного периода и освобождает Enable_data оттуда.
Показать оригинальное описание (EN)
In the Linux kernel, the following vulnerability has been resolved: tracing: Fix use-after-free freeing trigger private data Commit 61d445af0a7c ("tracing: Add bulk garbage collection of freeing event_trigger_data") moved the kfree() of event_trigger_data to a kthread that runs tracepoint_synchronize_unregister() before freeing. That removed the synchronization the trigger .free callbacks used to get implicitly and inline from trigger_data_free(). event_hist_trigger_free(), event_hist_trigger_named_free() and event_enable_trigger_free() free their satellite data (hist_data, cmd_ops, enable_data) right after trigger_data_free() returns. With the synchronization now deferred to the kthread, a concurrent tracepoint handler can still reach that data through the list_del_rcu()'d trigger, causing a use-after-free. The histogram teardown must stay synchronous: remove_hist_vars() and unregister_field_var_hists() have to detach a synthetic event from the histogram before the trigger-removal write returns, otherwise a following command races in and the synthetic-event removal fails with -EBUSY, as the trigger-synthetic-eprobe.tc selftest catches. Make those callbacks wait with the correct barrier - tracepoint_synchronize_unregister(), matching the free kthread - before freeing. The enable trigger has no such synchronous requirement, and a blocking synchronize there would re-serialize the path that commit deliberately deferred. Give it an optional private_data_free() callback that the free kthread runs after its grace period, and free enable_data from there.
Характеристики атаки
Последствия
Строка CVSS v3.1