В ядре Linux устранена следующая уязвимость:
wifi: brcmfmac: инициализировать работу с данными SDIO перед очисткой
brcmf_sdio_probe() сохраняет вновь выделенную шину в sdiodev->bus перед
выделение упорядоченной рабочей очереди. Если это распределение не удалось, функция
переходит к ошибке и вызывает brcmf_sdio_remove().
brcmf_sdio_remove() безоговорочно отменяет работу с шиной->данными. Инициализируйте
рабочий элемент перед первым путем отказа, который может достичь brcmf_sdio_remove(),
поэтому путь очистки всегда соответствует допустимому рабочему объекту.
Эта проблема была обнаружена нашим инструментом статического анализа, а затем подтверждена
ручной просмотр пути ошибки датчика и затрат времени на удаление. Модель проблемы — это сбой на ранней стадии установки, который достигает помощника по очистке.
который отменяет встроенный рабочий элемент до запуска его инициализатора. PoC QEMU вызвал сбой alloc_ordered_workqueue() в тот же момент
brcmf_sdio_probe(), до достижения INIT_WORK(&bus->datawork).
результирующий путь отказа вызывает brcmf_sdio_remove() и сообщает DEBUG_OBJECTS.
недопустимый слив работы с помощью brcmf_sdio_probe() и brcmf_sdio_remove() в
стек.
Показать оригинальное описание (EN)
In the Linux kernel, the following vulnerability has been resolved: wifi: brcmfmac: initialize SDIO data work before cleanup brcmf_sdio_probe() stores the newly allocated bus in sdiodev->bus before allocating the ordered workqueue. If that allocation fails, the function jumps to fail and calls brcmf_sdio_remove(). brcmf_sdio_remove() unconditionally cancels bus->datawork. Initialize the work item before the first failure path that can reach brcmf_sdio_remove(), so the cleanup path always observes a valid work object. This issue was found by our static analysis tool and then confirmed by manual review of the probe error path and the remove-time work drain. The problem pattern is an early setup failure that reaches a cleanup helper which cancels an embedded work item before its initializer has run. A QEMU PoC forced alloc_ordered_workqueue() to fail at the same point in brcmf_sdio_probe(), before INIT_WORK(&bus->datawork) is reached. The resulting fail path calls brcmf_sdio_remove(), and DEBUG_OBJECTS reports the invalid work drain with brcmf_sdio_probe() and brcmf_sdio_remove() in the stack.