CVE-2021-47305

dma-buf/sync_file: Don't leak fences on merge failure

MEDIUM
5.5
CVSS Score
Published: May 21, 2024 at 02:35 PM UTC
Updated: June 17, 2026 at 04:17 AM UTC
1 product affected across 1 vendorLinux Kernel

Using Linux by Linux?

Get instant alerts when new vulnerabilities affect Linux - before attackers find them.

Real-time alertsTrack your software stackFree plan available
Severity
MEDIUM5.5
Exploit prediction
EPSS 0.2%
SSVC
No known exploit

Description

In the Linux kernel, the following vulnerability has been resolved: dma-buf/sync_file: Don't leak fences on merge failure Each add_fence() call does a dma_fence_get() on the relevant fence. In the error path, we weren't calling dma_fence_put() so all those fences got leaked. Also, in the krealloc_array failure case, we weren't freeing the fences array. Instead, ensure that i and fences are always zero-initialized and dma_fence_put() all the fences and kfree(fences) on every error path.

Affected

Our own answer: ranges merged, affected separated from platform-only, with confidence and review flags.

4.15 ≤ v < 4.19.1994.20 ≤ v < 5.4.1354.9 ≤ v < 4.14.2414.9 ≤ v < 4.19.1994.9 ≤ v < 5.10.534.9 ≤ v < 5.13.54.9 ≤ v < 5.144.9 ≤ v < 5.4.1355.11 ≤ v < 5.13.55.5 ≤ v < 5.10.535.14 rc1a02b9dc90d844cc7df7b63264e7920cc425052d9
Vendor states this is fixed in 0d514185ae792d3a1903c8e1a83899aa996705ce (fixed)
Vendor states this is fixed in 19edcd97727aae9362444a859a24d99a8730cb27 (fixed)
Vendor states this is fixed in 19f51c2529339280d2c8c6427cd3e21ddf1ac3f8 (fixed)
Vendor states this is fixed in 41f45e91c92c8480242ea448d54e28c753b13902 (fixed)
Vendor states this is fixed in e0355a0ad31a1d677b2a4514206de4902bd550e8 (fixed)
Vendor states this is fixed in ffe000217c5068c5da07ccb1c0f8cce7ad767435 (fixed)
Vendor states this is fixed in 4.14.241 (unaffected)
Vendor states this is fixed in 4.19.199 (unaffected)
Vendor states this is fixed in 4.9 (unaffected)
Vendor states this is fixed in 5.10.53 (unaffected)
Vendor states this is fixed in 5.13.5 (unaffected)
Vendor states this is fixed in 5.14 (unaffected)
Vendor states this is fixed in 5.4.135 (unaffected)

References (6)

Patch
Source: 416baaa9-dc9f-4396-8d5f-8c081fb06d67
https://git.kernel.org/stable/c/0d514185ae792d3a1903c8e1a83899aa996705ce
Patch
Source: 416baaa9-dc9f-4396-8d5f-8c081fb06d67
https://git.kernel.org/stable/c/19edcd97727aae9362444a859a24d99a8730cb27
Patch
Source: 416baaa9-dc9f-4396-8d5f-8c081fb06d67
https://git.kernel.org/stable/c/19f51c2529339280d2c8c6427cd3e21ddf1ac3f8
Patch
Source: 416baaa9-dc9f-4396-8d5f-8c081fb06d67
https://git.kernel.org/stable/c/41f45e91c92c8480242ea448d54e28c753b13902
Patch
Source: 416baaa9-dc9f-4396-8d5f-8c081fb06d67
https://git.kernel.org/stable/c/e0355a0ad31a1d677b2a4514206de4902bd550e8
Patch
Source: 416baaa9-dc9f-4396-8d5f-8c081fb06d67
https://git.kernel.org/stable/c/ffe000217c5068c5da07ccb1c0f8cce7ad767435

SSVC — Action Prioritization

SSVCNo known exploitNot automatablePartial impact

SSVC signals action urgency (what to patch first), separate from CVSS which measures severity.

CVSS

Attack Vector
LOCAL
Complexity
LOW
Privileges
LOW
User Interaction
NONE
Scope
UNCHANGED
Confidentiality
NONE
Integrity
NONE
Availability
HIGH
Vector?

Quick Info

StatusANALYZED
CWE
CWE-617

Get alerted

Stop reading CVE feeds looking for your own stack

Track the products you run and VulnTracker tells you when a new CVE affects them — with what is known about fixing it, and nothing about the rest.

Free plan, no card