LiveActive security incident?Get immediate response
CVE Record

CVE-2024-36894: usb: gadget: f_fs: Fix race between aio_cancel() and AIO request complete

In the Linux kernel, the following vulnerability has been resolved: usb: gadget: f_fs: Fix race between aio_cancel() and AIO request complete FFS based applications can utilize the aio_cancel() callback to dequeue pending USB requests submitted to the UDC. There is a scenario where the FFS application issues an AIO cancel call, while the UDC is handling a soft disconnect. For a DWC3 based implementation, the callstack looks like the following: DWC3 Gadget FFS Application dwc3_gadget_soft_disconnect() ... --> dwc3_stop_active_transfers() --> dwc3_gadget_giveback(-ESHUTDOWN) --> ffs_epfile_async_io_complete() ffs_aio_cancel() --> usb_ep_free_request() --> usb_ep_dequeue() There is currently no locking implemented between the AIO completion handler and AIO cancel, so the issue occurs if the completion routine is running in parallel to an AIO cancel call coming from the FFS application. As the completion call frees the USB request (io_data->req) the FFS application is also referencing it for the usb_ep_dequeue() call. This can lead to accessing a stale/hanging pointer. commit b566d38857fc ("usb: gadget: f_fs: use io_data->status consistently") relocated the usb_ep_free_request() into ffs_epfile_async_io_complete(). However, in order to properly implement locking to mitigate this issue, the spinlock can't be added to ffs_epfile_async_io_complete(), as usb_ep_dequeue() (if successfully dequeuing a USB request) will call the function driver's completion handler in the same context. Hence, leading into a deadlock. Fix this issue by moving the usb_ep_free_request() back to ffs_user_copy_worker(), and ensuring that it explicitly sets io_data->req to NULL after freeing it within the ffs->eps_lock. This resolves the race condition above, as the ffs_aio_cancel() routine will not continue attempting to dequeue a request that has already been freed, or the ffs_user_copy_work() not freeing the USB request until the AIO cancel is done referencing it. This fix depends on commit b566d38857fc ("usb: gadget: f_fs: use io_data->status consistently")

MediumCVSS 5.6Not KEV-listedUpdated
Glexia's TakeAutomated analysismoderate

Security readout for executives and security teams

Plain-English summary

CVE-2024-36894 is a Linux kernel race condition in USB gadget FunctionFS. Under specific timing, a USB request can be freed while another path still references it. Business urgency is moderate: exploitation requires physical access, low privileges, and high complexity, but successful abuse could affect confidentiality or availability.

Executive priority

Treat as a scheduled remediation item unless you operate exposed USB gadget or embedded Linux devices. Prioritize vendor patching for products that can be physically accessed by untrusted users.

Technical view

The flaw is CWE-362 in usb/gadget/f_fs. A race between ffs_aio_cancel() and asynchronous I/O completion during USB gadget soft disconnect can leave io_data->req stale. The kernel fix moves usb_ep_free_request() handling and clears the request pointer under ffs->eps_lock to prevent dequeueing or freeing already-released requests.

Likely exposure

Systems running affected Linux kernels with USB gadget FunctionFS support are most relevant. Exposure is more likely in embedded, appliance, mobile, or USB-device-mode systems than standard servers. Confirm by kernel branch, backported fixes, and vendor advisories.

Exploitation context

No KEV listing or provided source indicates active exploitation. CVSS is 5.6 with physical attack vector, low privileges, no user interaction, and high attack complexity. The bug is timing-sensitive and tied to USB gadget behavior.

Researcher notes

The source describes a use-after-free-style stale pointer risk caused by missing synchronization, not a broadly remote issue. Version exposure needs careful branch and backport review because downstream vendors may ship fixes without matching upstream version numbers.

Mitigation direction

  • Apply Linux kernel updates containing the referenced stable fixes.
  • Check Debian, Siemens, and other vendor advisories for product-specific guidance.
  • Prioritize exposed USB gadget or embedded systems over ordinary servers.
  • If no vendor fix is available, follow vendor-recommended compensating controls.

Validation and detection

  • Inventory Linux kernel versions and vendor patch levels.
  • Identify systems using USB gadget FunctionFS or device-mode USB.
  • Verify whether the relevant stable commits are present or backported.
  • Review vendor advisories for affected product mappings.
  • Document systems where USB gadget functionality is disabled or absent.
Prepared
Confidence
medium
Sources
12

Generated from the cited source records. This long-tail analysis has not been individually reviewed by a named human.

Potential ATT&CK relevance

Conservative CVE-to-ATT&CK context

These mappings and lookup hints may be relevant to the vulnerability behavior, CWE, affected product, or exposure path. Glexia-inferred context is not an official MITRE, ATT&CK, CWE, or CVE Program mapping.

ATT&CK lookup starting points

Use these exact CWE pages and searches to review the Glexia ATT&CK library from this CVE's weakness and description context.

cwe · low confidence lookup

CWE-362: Exact CWE lookup

Use the exact CWE identifier as the starting point before reviewing related ATT&CK behavior. Open the exact CWE lookup page first, then review the ATT&CK searches from that MITRE weakness context. This is a Glexia lookup hint, not an official ATT&CK mapping.

Open ATT&CK lookup
cve · low confidence lookup

CVE-2024-36894 mapping review

Open the CVE-to-ATT&CK bridge for reviewed, inferred, or future official mappings tied to this CVE.

Open ATT&CK lookup
Vulnerability profileCVE Program record
Severity
Medium
CVSS
5.6 (3.1)
Known Exploited
No
Published

Vector: CVSS:3.1/AV:P/AC:H/PR:L/UI:N/S:U/C:H/I:N/A:H

Official CVE source material

CNA and ADP enrichment extracted from CVE v5

These fields come from the CVE record and ADP containers, not from Glexia's Take. They preserve time-varying source decisions such as CISA SSVC, KEV status, CVSS metrics, and provider references.

1CVSS vectors
3Timeline events
3ADP providers
12Source links

SSVC decision data

CISA-ADPCISA Coordinator
Timestamp
Version
2.0.3
Exploitation: noneAutomatable: noTechnical Impact: partial

CVSS vector scores

1 official score

We collect every scored CVSS vector available in the official CNA and ADP containers. When more than one version is present, the table keeps the source vectors side by side instead of collapsing them into the highest score.

ScoreVersionSeverityVectorExploitImpactSource
5.6CVSS 3.1MediumCVSS:3.1/AV:P/AC:H/PR:L/UI:N/S:U/C:H/I:N/A:H0.45.2CISA-ADP

Vulnerability scoring details

Base CVSS 3.1 score

5.6Medium
CVSS 3.1 vector shape for CVE-2024-36894Attack VectorAttack ComplexityPrivileges RequiredUser InteractionScopeConfidentiality ImpactIntegrity ImpactAvailability Impact

Vector: CVSS:3.1/AV:P/AC:H/PR:L/UI:N/S:U/C:H/I:N/A:H

Attack Vector
NetworkAdjacentLocalPhysical
Attack Complexity
LowHigh
Privileges Required
NoneLowHigh
User Interaction
NoneRequired
Scope
ChangedUnchanged
Confidentiality Impact
HighLowNone
Integrity Impact
HighLowNone
Availability Impact
HighLowNone

Vulnerability timeline

Timeline events are normalized from CVE metadata, CNA source timelines, ADP timelines, and KEV metadata when present.

  1. CVE reservedCVE Program

    The CVE ID was reserved by the assigning CNA.

  2. CVE publishedCVE Program

    The CVE record was published.

  3. CVE updatedCVE Program

    The CVE record metadata indicates this as the latest update time.

ADP provider summaries

CISA-ADPCISA ADP Vulnrichment
cvssV3_1other:ssvc
CVECVE Program Container
siemens-SADPADP container
Affected products

Products and packages named in the record

VendorProductVersion / packageStatus
LinuxLinux2e4c7553cd6f9c68bb741582dcb614edcbeca70f, 2e4c7553cd6f9c68bb741582dcb614edcbeca70f, 2e4c7553cd6f9c68bb741582dcb614edcbeca70f, 2e4c7553cd6f9c68bb741582dcb614edcbeca70f, 2e4c7553cd6f9c68bb741582dcb614edcbeca70f, 2e4c7553cd6f9c68bb741582dcb614edcbeca70f, 2e4c7553cd6f9c68bb741582dcb614edcbeca70f, 2e4c7553cd6f9c68bb741582dcb614edcbeca70funaffected
LinuxLinux3.15, 0, 4.19.317, 5.4.279, 5.10.221, 5.15.162, 6.1.95, 6.6.31, 6.8.10, 6.9affected
Weakness

CWE details

CWE links open Glexia weakness intelligence pages with official CWE context, developer remediation guidance, and related CVE mappings.