In the Linux kernel, the following vulnerability has been resolved: drm/loongson: Fix double free on BO initialization failure If ttm_bo_init_validate() fails, it drops the buffer object's reference and cleans it up through the supplied destroy callback. lsdc_bo_destroy() releases the GEM object and frees the enclosing lsdc_bo, so freeing it again in lsdc_bo_create() causes a double free on a synchronous failure path. Пусть TTM владеет очисткой после начала инициализации и возвращает ошибку напрямую. Сохраняйте явную свободу при сбое drm_gem_object_init (), который происходит до передачи права собственности на TTM.
Испытано на LS7A2000 путём возвращения drm_vma_offset_add() -ENOSPC для одного выбранного создания тупого буфера. Ошибка дошла до пользовательского пространства, вызов уничтожал один раз, и ни одна ручка не была опубликована или не отслеживалась BO. Нормальное создание буфера, обнуление, отображение, восстановление и выпуск пройдены.
Помощь AI использовалась для анализа прав собственности, исправления, инжекции неисправностей, сборки и тестирования.
Показать оригинальное описание (EN)
In the Linux kernel, the following vulnerability has been resolved: drm/loongson: Fix double free on BO initialization failure If ttm_bo_init_validate() fails, it drops the buffer object's reference and cleans it up through the supplied destroy callback. lsdc_bo_destroy() releases the GEM object and frees the enclosing lsdc_bo, so freeing it again in lsdc_bo_create() causes a double free on a synchronous failure path. Let TTM own the cleanup after initialization has started and return the error directly. Keep the explicit free on drm_gem_object_init() failure, which occurs before ownership is passed to TTM. Tested on LS7A2000 by making drm_vma_offset_add() return -ENOSPC for one selected dumb-buffer creation. The error reached userspace, the destroy callback ran once, and no handle was published or tracked BO retained. Normal buffer creation, zeroing, mapping, readback and release passed. AI assistance was used for the ownership analysis, fix, fault-injection tools, build and test execution.
Характеристики атаки
Последствия
Строка CVSS v3.1