CVE-2021-47305

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.
Configurations

Configuration 1 (hide)

OR cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*
cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*
cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*
cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*
cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*
cpe:2.3:o:linux:linux_kernel:5.14:rc1:*:*:*:*:*:*

History

12 May 2025, 20:00

Type Values Removed Values Added
CVSS v2 : unknown
v3 : unknown
v2 : unknown
v3 : 5.5
CWE CWE-617
First Time Linux linux Kernel
Linux
CPE cpe:2.3:o:linux:linux_kernel:5.14:rc1:*:*:*:*:*:*
cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*
References () https://git.kernel.org/stable/c/0d514185ae792d3a1903c8e1a83899aa996705ce - () https://git.kernel.org/stable/c/0d514185ae792d3a1903c8e1a83899aa996705ce - Patch
References () https://git.kernel.org/stable/c/19edcd97727aae9362444a859a24d99a8730cb27 - () https://git.kernel.org/stable/c/19edcd97727aae9362444a859a24d99a8730cb27 - Patch
References () https://git.kernel.org/stable/c/19f51c2529339280d2c8c6427cd3e21ddf1ac3f8 - () https://git.kernel.org/stable/c/19f51c2529339280d2c8c6427cd3e21ddf1ac3f8 - Patch
References () https://git.kernel.org/stable/c/41f45e91c92c8480242ea448d54e28c753b13902 - () https://git.kernel.org/stable/c/41f45e91c92c8480242ea448d54e28c753b13902 - Patch
References () https://git.kernel.org/stable/c/e0355a0ad31a1d677b2a4514206de4902bd550e8 - () https://git.kernel.org/stable/c/e0355a0ad31a1d677b2a4514206de4902bd550e8 - Patch
References () https://git.kernel.org/stable/c/ffe000217c5068c5da07ccb1c0f8cce7ad767435 - () https://git.kernel.org/stable/c/ffe000217c5068c5da07ccb1c0f8cce7ad767435 - Patch

21 Nov 2024, 06:35

Type Values Removed Values Added
References () https://git.kernel.org/stable/c/0d514185ae792d3a1903c8e1a83899aa996705ce - () https://git.kernel.org/stable/c/0d514185ae792d3a1903c8e1a83899aa996705ce -
References () https://git.kernel.org/stable/c/19edcd97727aae9362444a859a24d99a8730cb27 - () https://git.kernel.org/stable/c/19edcd97727aae9362444a859a24d99a8730cb27 -
References () https://git.kernel.org/stable/c/19f51c2529339280d2c8c6427cd3e21ddf1ac3f8 - () https://git.kernel.org/stable/c/19f51c2529339280d2c8c6427cd3e21ddf1ac3f8 -
References () https://git.kernel.org/stable/c/41f45e91c92c8480242ea448d54e28c753b13902 - () https://git.kernel.org/stable/c/41f45e91c92c8480242ea448d54e28c753b13902 -
References () https://git.kernel.org/stable/c/e0355a0ad31a1d677b2a4514206de4902bd550e8 - () https://git.kernel.org/stable/c/e0355a0ad31a1d677b2a4514206de4902bd550e8 -
References () https://git.kernel.org/stable/c/ffe000217c5068c5da07ccb1c0f8cce7ad767435 - () https://git.kernel.org/stable/c/ffe000217c5068c5da07ccb1c0f8cce7ad767435 -
Summary
  • (es) En el kernel de Linux, se ha resuelto la siguiente vulnerabilidad: dma-buf/sync_file: no filtrar barreras en caso de falla de fusión. Cada llamada a add_fence() realiza un dma_fence_get() en la barrera relevante. En la ruta del error, no estábamos llamando a dma_fence_put() por lo que se filtraron todas esas barreras. Además, en el caso de falla de krealloc_array, no estábamos liberando la matriz de vallas. En su lugar, asegúrese de que i y las vallas estén siempre inicializadas en cero y dma_fence_put() todas las vallas y kfree(fences) en cada ruta de error.

21 May 2024, 15:15

Type Values Removed Values Added
New CVE

Information

Published : 2024-05-21 15:15

Updated : 2025-05-12 20:00


NVD link : CVE-2021-47305

Mitre link : CVE-2021-47305

CVE.ORG link : CVE-2021-47305


JSON object : View

Products Affected

linux

  • linux_kernel
CWE
CWE-617

Reachable Assertion