В ядре Linux была устранена следующая уязвимость: cdx: Fix double free, когда создание файла sysfs терпит неудачу In cdx_create_res_attr(), если sysfs_create_bin_file() терпит неудачу, код освобождает res_attr, но не устанавливает cdx_dev->res_attr[num] в NULL. Это оставляет в массиве свисающий указатель. Затем cdx_destroy_res_attr() освобождает уже освободившуюся память.
Исправьте двойной свободный путем инициализации cdx_dev->res_attr[num] после завершения sysfs_create_bin_file().
Показать оригинальное описание (EN)
In the Linux kernel, the following vulnerability has been resolved: cdx: Fix double free when sysfs file creation fails In cdx_create_res_attr(), if sysfs_create_bin_file() fails, the code frees res_attr but doesn't set cdx_dev->res_attr[num] to NULL. This leaves a dangling pointer in the array. Then cdx_destroy_res_attr() frees the already-freed memory. Fix the double free by initializing cdx_dev->res_attr[num] after sysfs_create_bin_file() completes.