В ядре Linux была устранена следующая уязвимость: dma-buf/dma-fence: fix checking signaling bit for timeline and driver name v3 Патч "dma-buf: dma-fence: Fix potential NULL pointer dereference" изменил проверку на проверку указателя ops вместо поданного бита, чтобы избежать потенциального NULL dereference. Проблема теперь заключается в том, что указатель операций очищается только тогда, когда ни релиз, ни обратный звонок ожидания не реализованы, и это еще не верно для многих реализаций dma_fence. Таким образом, эти реализации потеряли защиту RCU после сигнализации возвращаемой строки, что привело к потенциальному использованию после бесплатного.
Добавьте проверку сигнализации к проверке указателя ops, чтобы у нас была как защита от удаления NULL, так и защита RCU после передачи сигнала для возвращенной строки. v2: улучшите комментарии, чтобы отметить защиту RCU, и объясните, почему мы проверяем состояние сигнализации и указатель ops v3: некоторые улучшения комментариев, предложенные Philip
Показать оригинальное описание (EN)
In the Linux kernel, the following vulnerability has been resolved: dma-buf/dma-fence: fix checking signaling bit for timeline and driver name v3 The patch "dma-buf: dma-fence: Fix potential NULL pointer dereference" changed the check to test for the ops pointer instead of the signaled bit to avoid a potential NULL dereference when the ops pointer has been cleared. The problem is now that the ops pointer is cleared only when neither the release nor the wait callback is implemented and this isn't true for a lot of dma_fence implementations yet. So those implementations lost the RCU protection after signaling of the returned string resulting in potential use after free. Add the signaling check additional to the ops pointer check so that we have both the protection against NULL dereference as well as the RCU protection after signaling for the returned string. v2: improve comments to note RCU protection and explain why we check both signaling state and ops pointer v3: some comment improvements suggested by Philip
Характеристики атаки
Последствия
Строка CVSS v3.1