В ядре Linux была устранена следующая уязвимость: dm-crypt: исправить условие крошечной гонки в crypt_dec_pending crypt_dec_pending читает io->error перед вызовом atomic_dec_and_test. Другой контекст, например crypt_endio, вызванный из прерывания, может установить io->error и отбросить его ссылку между чтением и уменьшением. crypt_dec_pending затем отбрасывает последнюю ссылку и завершает био со статусом устаревшего - так что чтение, которое не удалось и никогда не было расшифровано, или запись, которая не удалось, сообщается как успешная. Чтение было помещено перед декрементом commit b35f8caa0890 («dm crypt: подождите, пока endio завершится перед уничтожением»), потому что этот commit освободил dm_crypt_io перед вызовом bio_endio.
Это уже не так, dm_crypt_io теперь живет в данных на био. Вместо этого прочитайте io->error после atomic_dec_and_test. atomic_dec_and_test полностью заказан, поэтому дополнительный барьер не требуется.
Показать оригинальное описание (EN)
In the Linux kernel, the following vulnerability has been resolved: dm-crypt: fix a tiny race condition in crypt_dec_pending crypt_dec_pending reads io->error before calling atomic_dec_and_test. Another context, for example crypt_endio called from an interrupt, may set io->error and drop its reference between the read and the decrement. crypt_dec_pending then drops the last reference and completes the bio with the stale status - so a read that failed and was never decrypted, or a write that failed, is reported as successful. The read was placed before the decrement by commit b35f8caa0890 ("dm crypt: wait for endio to complete before destruction"), because that commit freed dm_crypt_io before calling bio_endio. This is no longer the case, dm_crypt_io lives in the per-bio data now. Read io->error after atomic_dec_and_test instead. atomic_dec_and_test is fully ordered, so no additional barrier is needed.
Характеристики атаки
Последствия
Строка CVSS v3.1
Уязвимые продукты 9
| Конфигурация | От (включительно) | До (исключительно) |
|---|---|---|
|
Linux Linux_Kernel
cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*
|
2.6.29
|
5.10.273
|
|
Linux Linux_Kernel
cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*
|
2.6.29
|
5.15.224
|
|
Linux Linux_Kernel
cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*
|
2.6.29
|
6.1.191
|
|
Linux Linux_Kernel
cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*
|
2.6.29
|
6.6.161
|
|
Linux Linux_Kernel
cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*
|
2.6.29
|
6.12.115
|
|
Linux Linux_Kernel
cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*
|
2.6.29
|
6.18.59
|
|
Linux Linux_Kernel
cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*
|
2.6.29
|
7.2.13
|
|
Linux Linux_Kernel
cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*
|
2.6.29
|
7.3
|
|
Linux Linux_Kernel
cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*
|
2.6.28.9
|
— |