В ядре Linux устранена следующая уязвимость:
xfrm: исправлена утечка аутентификации xfrm_state_construct()
Attach_auth_trunc() может выделить x->aalg при выходе
x->props.aalgo имеет нулевое значение, если выбранный алгоритм аутентификации не имеет
sadb_alg_id. Одним из реальных случаев является cmac(aes).
xfrm_state_construct() затем обрабатывает !x->props.aalgo как «нет аутентификации».
алгоритм еще прикреплен» и вызывает Attach_auth(). Это перезаписывает
x->aalg и теряет первое распределение.
Любой последующий сбой или демонтаж освобождает только указатель замены. Проверьте, подключен ли уже x->aalg, вместо того, чтобы делать вывод, что состояние из x->props.aalgo.
Показать оригинальное описание (EN)
In the Linux kernel, the following vulnerability has been resolved: xfrm: fix xfrm_state_construct() auth-trunc leak attach_auth_trunc() can allocate x->aalg while leaving x->props.aalgo at zero when the selected auth algorithm has no sadb_alg_id. One real case is cmac(aes). xfrm_state_construct() then treats !x->props.aalgo as "no auth algorithm attached yet" and calls attach_auth(). That overwrites x->aalg and loses the first allocation. Any later failure or teardown only frees the replacement pointer. Check whether x->aalg is already attached instead of inferring that state from x->props.aalgo.