В ядре Linux устранена следующая уязвимость:
можно: bcm: исправить гонку данных на rx_stamp/rx_ifindex в bcm_rx_handler()
Для операции rx, подписанной на всех интерфейсах (ifindex == 0), та же операция
регистрируется один раз в общем списке фильтров с подстановочными знаками для каждой сети, поэтому
bcm_rx_handler() может работать одновременно на разных процессорах для кадров
поступающие на разные сетевые устройства.
op->rx_stamp и op->rx_ifindex были написаны до bcm_rx_update_lock
приняты, что позволяет авторам-одновременникам соревноваться друг с другом, включая разорванный
хранилище 64-битного rx_stamp на 32-битных платформах. За пределами разорванного хранилища bcm_send_to_user() должен сообщить временную метку/ifindex.
того же кадра, содержимое которого он доставляет. Итак, задание
помещается в тот же непрерывный раздел bcm_rx_update_lock, что и содержимое
сравнение.
В качестве побочного эффекта функция кадра запроса RTR (которая никогда не достигает
bcm_send_to_user()) больше не обновляет rx_stamp/rx_ifindex, поскольку только
путь уведомления нуждается в них.
Показать оригинальное описание (EN)
In the Linux kernel, the following vulnerability has been resolved: can: bcm: fix data race on rx_stamp/rx_ifindex in bcm_rx_handler() For an rx op subscribed on all interfaces (ifindex == 0), the same op is registered once in the shared per-netns wildcard filter list, so bcm_rx_handler() can run concurrently on different CPUs for frames arriving on different net devices. op->rx_stamp and op->rx_ifindex were written before bcm_rx_update_lock was taken, allowing concurrent writers to race each other - including a torn store of the 64-bit rx_stamp on 32-bit platforms. Beyond a torn store bcm_send_to_user() must report the timestamp/ifindex of the very same frame whose content it is delivering. So the assignment is placed in the same unbroken bcm_rx_update_lock section as the content comparison. As a side effect, the RTR-request frame feature (which never reach bcm_send_to_user()) no longer updates rx_stamp/rx_ifindex, since only the notification path needs them.