В ядре Linux устранена следующая уязвимость:
futex/pi: отклонять частные владельцы фьютексов Cross-MM. Закрытый ключ фьютекса заимствует мм у официанта без использования mm_users.
ссылка. Тем не менее, Attach_to_pi_owner() в настоящее время принимает владельца
из другого адресного пространства и копирует закрытый ключ в адрес владельца
Состояние ПИ.
Когда этот владелец завершает работу, функция exit_pi_state_list() использует сохраненный ключ, чтобы найти
хэш-ведро и получает ссылку на личный хэш официанта. Если
последний пользователь мм официанта одновременно завершает работу, futex_hash_free() освобождает
хэш, в то время как владелец все еще использует свою корзину и ссылку. Предотвратите это, проверив в Attach_to_pi_owner(), что для частного
фьютексы, владелец mm и официант mm одинаковы.
Выполните проверку с помощью
pi_lock владельца удерживается, и после проверки владельца::futex::state
сериализовать для одновременной очистки выхода из PI-состояния.
[tglx: Исправленный комментарий]
Показать оригинальное описание (EN)
In the Linux kernel, the following vulnerability has been resolved: futex/pi: Reject cross-mm private futex owners A private futex key borrows the waiter's mm without taking an mm_users reference. Nevertheless, attach_to_pi_owner() currently accepts an owner from a different address space and copies the private key into the owner's PI state. When that owner exits, exit_pi_state_list() uses the saved key to find the hash bucket and acquires a reference to the waiter's private hash. If the last user of the waiter's mm exits concurrently, futex_hash_free() frees the hash while the owner still uses its bucket and reference. Prevent this by validating in attach_to_pi_owner() that, for private futexes, the owner mm and waiter mm are the same. Perform the check with the owner's pi_lock held and after validating owner::futex::state to serialize against a concurrent PI-state exit cleanup. [ tglx: Amended comment ]