Ad

CVE-2025-40315

NONE EPSS 0.22%
Обновлено 15 октября 2026
Linux
Параметр Значение
Поставщик Linux
Публичный эксплойт Нет

In the Linux kernel, the following vulnerability has been resolved: usb: gadget: f_fs: Fix epfile null pointer access after ep enable. Условие гонки возникает, когда ffs_func_eps_enable() работает одновременно с ffs_data_reset(). ffs_data_clear(), вызываемый в ffs_data_reset(), устанавливает ffs->epfiles в NULL перед сбросом ffs->eps_count в 0, что приводит к удалению указателя NULL при доступе к epfile->ep в ffs_func_eps_enable() после успешного usb_ep_enable(). Указатель ffs->epfiles установлен на NULL как в ffs_data_clear(), так и в ffs_data_close(), а его модификация защищена спин-локом ffs->eps_lock.

И вся функция ffs_func_eps_enable() также защищена ffs->eps_lock. Таким образом, добавьте обработку указателей NULL для ffs->epfiles в функции ffs_func_eps_enable () для устранения проблем

Показать оригинальное описание (EN)

In the Linux kernel, the following vulnerability has been resolved: usb: gadget: f_fs: Fix epfile null pointer access after ep enable. A race condition occurs when ffs_func_eps_enable() runs concurrently with ffs_data_reset(). The ffs_data_clear() called in ffs_data_reset() sets ffs->epfiles to NULL before resetting ffs->eps_count to 0, leading to a NULL pointer dereference when accessing epfile->ep in ffs_func_eps_enable() after successful usb_ep_enable(). The ffs->epfiles pointer is set to NULL in both ffs_data_clear() and ffs_data_close() functions, and its modification is protected by the spinlock ffs->eps_lock. And the whole ffs_func_eps_enable() function is also protected by ffs->eps_lock. Thus, add NULL pointer handling for ffs->epfiles in the ffs_func_eps_enable() function to fix issues