Description
In the Linux kernel, the following vulnerability has been resolved:

usb: gadget: f_fs: Fix DMA fence leak

In ffs_dmabuf_transfer(), a ffs_dma_fence object is kmalloc'd, with the
underlying dma_fence later initialized by dma_fence_init(), which sets
its kref counter to 1. Then, dma_resv_add_fence() gets a second
reference, and a pointer to the ffs_dma_fence is passed as the
usb_request's "context" field.

The dma-resv mechanism will manage the second reference, but the first
reference is never properly released; the ffs_dmabuf_cleanup() function
decreases the reference count, but only to balance with the reference
grab in ffs_dmabuf_signal_done().

The code will then slowly leak memory as more ffs_dma_fence objects are
created without being ever freed.

Address this issue by transferring ownership of the fence to the DMA
reservation object, by calling dma_fence_put() right after
dma_resv_add_fence(). The ffs_dma_fence then gets properly discarded
after being signalled.
Published: 2026-07-25
Score: 5.5 Medium
EPSS: < 1% Very Low
KEV: No
Impact: n/a
Action: n/a
AI Analysis

Impact

This vulnerability is a memory leak in the Linux kernel’s USB gadget f_fs driver caused by an orphaned reference to a DMA fence that is never released. Each USB request that creates a DMA fence leaves an unrecruited reference, causing the kernel to gradually consume more memory. Over time the kernel can exhaust available memory, leading to a denial of service or forced reboot.

Affected Systems

All Linux kernel releases prior to the patch commit 0cae3d6109427c455bad0a18dfb3e2a91657e38a are affected. The flaw resides in the f_fs component of the kernel’s USB gadget subsystem, so any system that supports USB gadgets and has the f_fs driver enabled is vulnerable. Most mainstream distributions shipping recent kernels without this update are at risk.

Risk and Exploitability

The CVSS score of 5.5 indicates moderate severity, while the EPSS score of less than 1% suggests that active exploitation is unlikely at present. The flaw is not listed in the CISA KEV catalog. An attacker would need to trigger repeated USB gadget transfers that allocate DMA fences, a scenario that could be engineered by a malicious USB device or a misconfigured gadget. The impact remains significant because a sustained leak can drain kernel memory and force a reboot, even though exploitation vectors in the wild are not widely reported.

Generated by OpenCVE AI on August 2, 2026 at 13:20 UTC.

Remediation

No vendor fix or workaround currently provided.

OpenCVE Recommended Actions

  • Upgrade the kernel to a build that includes the ffs_dmabuf_transfer fix (commit 0cae3d6109427c455bad0a18dfb3e2a91657e38a or newer).
  • If a kernel upgrade cannot be performed immediately, apply the patch manually to the ffs_dmabuf_transfer code, ensuring dma_fence_put() is called right after dma_resv_add_fence().
  • Disable or limit the use of the USB gadget f_fs driver on systems that must remain online until a patch can be applied.

Generated by OpenCVE AI on August 2, 2026 at 13:20 UTC.

Tracking

Sign in to view the affected projects.

Advisories
Source ID Title
Debian DLA Debian DLA DLA-4724-1 linux-6.12 new package
History

Sat, 01 Aug 2026 02:30:00 +0000

Type Values Removed Values Added
Weaknesses CWE-459

Wed, 29 Jul 2026 12:15:00 +0000

Type Values Removed Values Added
Weaknesses CWE-772
References
Metrics threat_severity

None

cvssV3_1

{'score': 5.5, 'vector': 'CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H'}

threat_severity

Moderate


Sun, 26 Jul 2026 02:30:00 +0000

Type Values Removed Values Added
Weaknesses CWE-459

Sat, 25 Jul 2026 09:30:00 +0000

Type Values Removed Values Added
Description In the Linux kernel, the following vulnerability has been resolved: usb: gadget: f_fs: Fix DMA fence leak In ffs_dmabuf_transfer(), a ffs_dma_fence object is kmalloc'd, with the underlying dma_fence later initialized by dma_fence_init(), which sets its kref counter to 1. Then, dma_resv_add_fence() gets a second reference, and a pointer to the ffs_dma_fence is passed as the usb_request's "context" field. The dma-resv mechanism will manage the second reference, but the first reference is never properly released; the ffs_dmabuf_cleanup() function decreases the reference count, but only to balance with the reference grab in ffs_dmabuf_signal_done(). The code will then slowly leak memory as more ffs_dma_fence objects are created without being ever freed. Address this issue by transferring ownership of the fence to the DMA reservation object, by calling dma_fence_put() right after dma_resv_add_fence(). The ffs_dma_fence then gets properly discarded after being signalled.
Title usb: gadget: f_fs: Fix DMA fence leak
First Time appeared Linux
Linux linux Kernel
CPEs cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*
Vendors & Products Linux
Linux linux Kernel
References

Subscriptions

Linux Linux Kernel
cve-icon MITRE

Status: PUBLISHED

Assigner: Linux

Published:

Updated: 2026-07-25T08:49:56.340Z

Reserved: 2026-07-19T15:36:31.780Z

Link: CVE-2026-64328

cve-icon Vulnrichment

No data.

cve-icon NVD

Status : Awaiting Analysis

Published: 2026-07-25T10:17:14.430

Modified: 2026-08-11T15:00:57.447

Link: CVE-2026-64328

cve-icon Redhat

Severity : Moderate

Publid Date: 2026-07-25T00:00:00Z

Links: CVE-2026-64328 - Bugzilla

cve-icon OpenCVE Enrichment

Updated: 2026-08-02T13:30:17Z

Weaknesses
  • CWE-772

    Missing Release of Resource after Effective Lifetime