В ядре Linux была устранена следующая уязвимость: pipe: сохранить существующие считыватели fasync при ошибке установки F_SETFL и FIOASYNC решить, следует ли вызывать -> fasync(), прежде чем pipe_fasync() примет pipe->mutex. Таким образом, два включения одного O_RDWR FIFO могут входить в систему обратного вызова. fasync_helper() выделяется перед проверкой существующей записи. Если первый активирует установку обоих элементов, второй активирует обновление записи для считывания, а затем выводит из строя выделение для записи для записи.
Путь ошибки удаляет ранее существовавшую запись читателя, очищая FASYNC, пока запись записывающего устройства остается зарегистрированной. __fput() затем пропускает -> fasync(), так что более позднее уведомление трубы может лишить ссылки освобожденный файл или его f_owner. Непривилегированный воспроизводитель давления памяти запускает KASAN slab-use-after-free в send_sigio() по этому пути. Сохраните результат помощника читателя и отмените регистрацию только в том случае, если этот вызов добавил его.
Труба mutex сериализует изменения в обоих списках, поэтому неудачная новая регистрация все еще удаляет своего читателя, в то время как неудачный дубликат сохраняет существующие регистрации и FASYNC. Успешный дубликат позволяет продолжать обновлять fa_fd как и раньше.
Показать оригинальное описание (EN)
In the Linux kernel, the following vulnerability has been resolved: pipe: preserve existing fasync readers on writer setup failure F_SETFL and FIOASYNC decide whether to invoke ->fasync() before pipe_fasync() takes pipe->mutex. Two enables of one O_RDWR FIFO can therefore both enter the callback. fasync_helper() allocates before checking for an existing entry. If the first enable installs both entries, a second enable can update the reader entry and then fail the allocation for the writer entry. The error path removes the pre-existing reader entry, clearing FASYNC while the writer entry remains registered. __fput() then skips ->fasync(), so a later pipe notification can dereference the freed file or its f_owner. An unprivileged memory-pressure reproducer triggers a KASAN slab-use-after-free in send_sigio() through this path. Keep the reader helper's result and undo the registration only if this call added it. The pipe mutex serializes changes to both lists, so a failed new registration still removes its reader, while a failed duplicate preserves the existing registrations and FASYNC. Successful duplicate enables continue to update fa_fd as before.
Характеристики атаки
Последствия
Строка CVSS v3.1
Уязвимые продукты 8
| Конфигурация | От (включительно) | До (исключительно) |
|---|---|---|
|
Linux Linux_Kernel
cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*
|
2.6.30
|
5.10.273
|
|
Linux Linux_Kernel
cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*
|
2.6.30
|
5.15.224
|
|
Linux Linux_Kernel
cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*
|
2.6.30
|
6.1.191
|
|
Linux Linux_Kernel
cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*
|
2.6.30
|
6.6.161
|
|
Linux Linux_Kernel
cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*
|
2.6.30
|
6.12.115
|
|
Linux Linux_Kernel
cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*
|
2.6.30
|
6.18.59
|
|
Linux Linux_Kernel
cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*
|
2.6.30
|
7.2.13
|
|
Linux Linux_Kernel
cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*
|
2.6.30
|
7.3
|