В ядре Linux устранена следующая уязвимость: fsverity: RCU-задержка освобождения struct fsverity_info __fsverity_get_info() вызывает rhashtable_lookup_fast(), который просто использует rcu_read_lock() и не синхронизируется напрямую с fsverity_remove_info(). Для того же inode это не проблема: его fsverity_info удаляется только во время выселения inode или при неспособности включить истинность, когда inode больше не нуждается в своем fsverity_info, и он больше не будет доступен через этот inode. Однако это нарушается и может вызвать use-after-free для одновременного __fsverity_get_info () для * различных * инодов.
Они полагаются только на следующий fsverity_info::rhash_head в rhashtable под rcu_read_lock(). Они также используют fsverity_info::inode для сравнения ключей. Исправьте это, отложив освобождение «struct fsverity_info» после того, как он был удален из rhashtable.
Показать оригинальное описание (EN)
In the Linux kernel, the following vulnerability has been resolved: fsverity: RCU-delay the freeing of struct fsverity_info __fsverity_get_info() calls rhashtable_lookup_fast(), which just uses rcu_read_lock() and doesn't directly synchronize with fsverity_remove_info(). For the same inode this isn't a problem: its fsverity_info is removed only at inode eviction time or upon failure to enable verity, when the inode no longer needs its fsverity_info and it will no longer be accessed via that inode. However, this is broken and can cause a use-after-free for concurrent __fsverity_get_info() for *different* inodes. Those rely on following fsverity_info::rhash_head in the rhashtable under rcu_read_lock() only. They also use fsverity_info::inode to do the key comparison. Fix this by RCU-delaying the freeing of 'struct fsverity_info' after it's been removed from the rhashtable.
Характеристики атаки
Последствия
Строка CVSS v3.1
Уязвимые продукты 2
| Конфигурация | От (включительно) | До (исключительно) |
|---|---|---|
|
Linux Linux_Kernel
cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*
|
7.0
|
7.2.11
|
|
Linux Linux_Kernel
cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*
|
7.0
|
7.3
|