CVE-2025-40315

Severity CVSS v4.0:
Pending analysis
Type:
Unavailable / Other
Publication date:
08/12/2025
Last modified:
08/12/2025

Description

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

Impact