В ядре Linux устранена следующая уязвимость: uio: Fix stale info pointer in failed registration path After device_add(), устройство UIO видно в пользовательском пространстве и можно открыть /dev/uioX. Если более поздний шаг настройки терпит неудачу, __uio_register_device() раскручивает устройство, но оставляет idev->info, указывая на принадлежащую вызывающему абоненту структуру uio_info. Это небезопасно, когда открывающий гоняется с неудачным регистрационным путем.
Открытый файл сохраняет ссылку на uio_device, в то время как абонент видит сбой регистрации и может освободить свою структуру uio_info. Более поздние операции с файлами могут следовать за idev->info и освобождать память. Обработайте сбои post-device_add (), такие как отмена регистрации: удалите атрибуты UIO, пока указатель информации все еще действителен, затем очистите idev->info под info_lock и разбудите существующих официантов / пользователей Async, прежде чем удалять устройство и незначительные.
Это заставляет уже открытые дескрипторы файлов наблюдать то же состояние «устройство ушло», что и обычный uio_unregister_device().
Показать оригинальное описание (EN)
In the Linux kernel, the following vulnerability has been resolved: uio: Fix stale info pointer in failed registration path After device_add(), the UIO device is visible to userspace and /dev/uioX can be opened. If a later setup step fails, __uio_register_device() unwinds the device but leaves idev->info pointing at the caller-owned struct uio_info. That is unsafe when an opener races with the failed registration path. The open file keeps a reference to the uio_device, while the caller sees registration failure and may free its struct uio_info. Later file operations can then follow idev->info and dereference freed memory. Handle post-device_add() failures like unregister: remove UIO attributes while the info pointer is still valid, then clear idev->info under info_lock and wake existing waiters/async users before removing the device and minor. This makes already-open file descriptors observe the same "device gone" state as normal uio_unregister_device().
Характеристики атаки
Последствия
Строка CVSS v3.1