{"id":"CVE-2021-47305","aliases":["CVE-2021-47305"],"related":[],"kind":"vulnerability","state":"published","title":"dma-buf/sync_file: Don't leak fences on merge failure","summary":"In the Linux kernel, the following vulnerability has been resolved:\n\ndma-buf/sync_file: Don't leak fences on merge failure\n\nEach add_fence() call does a dma_fence_get() on the relevant fence.  In\nthe error path, we weren't calling dma_fence_put() so all those fences\ngot leaked.  Also, in the krealloc_array failure case, we weren't\nfreeing the fences array.  Instead, ensure that i and fences are always\nzero-initialized and dma_fence_put() all the fences and kfree(fences) on\nevery error path.","summarySource":"cvelist","descriptions":[{"lang":"en","text":"In the Linux kernel, the following vulnerability has been resolved:\n\ndma-buf/sync_file: Don't leak fences on merge failure\n\nEach add_fence() call does a dma_fence_get() on the relevant fence.  In\nthe error path, we weren't calling dma_fence_put() so all those fences\ngot leaked.  Also, in the krealloc_array failure case, we weren't\nfreeing the fences array.  Instead, ensure that i and fences are always\nzero-initialized and dma_fence_put() all the fences and kfree(fences) on\nevery error path.","source":"cvelist"},{"lang":"es","text":"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.","source":"nvd"}],"published":"2024-05-21T14:35:25.345Z","modified":"2026-06-17T04:17:09.110Z","severity":{"scorer":"NVD","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H","score":5.5,"rating":"MEDIUM"},"severities":[{"scorer":"NVD","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H","score":5.5,"rating":"MEDIUM"}],"cwes":["CWE-617"],"affected":[{"ranges":[{"type":"git","introduced":"a02b9dc90d844cc7df7b63264e7920cc425052d9","fixed":"19f51c2529339280d2c8c6427cd3e21ddf1ac3f8","status":"affected"},{"type":"git","introduced":"a02b9dc90d844cc7df7b63264e7920cc425052d9","fixed":"e0355a0ad31a1d677b2a4514206de4902bd550e8","status":"affected"},{"type":"git","introduced":"a02b9dc90d844cc7df7b63264e7920cc425052d9","fixed":"41f45e91c92c8480242ea448d54e28c753b13902","status":"affected"},{"type":"git","introduced":"a02b9dc90d844cc7df7b63264e7920cc425052d9","fixed":"0d514185ae792d3a1903c8e1a83899aa996705ce","status":"affected"},{"type":"git","introduced":"a02b9dc90d844cc7df7b63264e7920cc425052d9","fixed":"19edcd97727aae9362444a859a24d99a8730cb27","status":"affected"},{"type":"git","introduced":"a02b9dc90d844cc7df7b63264e7920cc425052d9","fixed":"ffe000217c5068c5da07ccb1c0f8cce7ad767435","status":"affected"}],"vendor":"Linux","product":"Linux","repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","source":"cvelist"},{"ranges":[{"version":"4.9","status":"affected"},{"type":"semver","introduced":"0","fixed":"4.9","status":"unaffected"},{"type":"semver","introduced":"4.14.241","lastAffected":"4.14.*","status":"unaffected"},{"type":"semver","introduced":"4.19.199","lastAffected":"4.19.*","status":"unaffected"},{"type":"semver","introduced":"5.4.135","lastAffected":"5.4.*","status":"unaffected"},{"type":"semver","introduced":"5.10.53","lastAffected":"5.10.*","status":"unaffected"},{"type":"semver","introduced":"5.13.5","lastAffected":"5.13.*","status":"unaffected"},{"type":"original_commit_for_fix","introduced":"5.14","lastAffected":"*","status":"unaffected"}],"vendor":"Linux","product":"Linux","repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","source":"cvelist"},{"ranges":[{"status":"affected","introduced":"4.9","fixed":"4.14.241"},{"status":"affected","introduced":"4.15","fixed":"4.19.199"},{"status":"affected","introduced":"4.20","fixed":"5.4.135"},{"status":"affected","introduced":"5.5","fixed":"5.10.53"},{"status":"affected","introduced":"5.11","fixed":"5.13.5"},{"status":"affected","version":"5.14"}],"vendor":"linux","product":"linux_kernel","cpe":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","source":"nvd"}],"references":[{"url":"https://git.kernel.org/stable/c/19f51c2529339280d2c8c6427cd3e21ddf1ac3f8","tags":["patch","x-transferred"],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/e0355a0ad31a1d677b2a4514206de4902bd550e8","tags":["patch","x-transferred"],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/41f45e91c92c8480242ea448d54e28c753b13902","tags":["patch","x-transferred"],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/0d514185ae792d3a1903c8e1a83899aa996705ce","tags":["patch","x-transferred"],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/19edcd97727aae9362444a859a24d99a8730cb27","tags":["patch","x-transferred"],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/ffe000217c5068c5da07ccb1c0f8cce7ad767435","tags":["patch","x-transferred"],"sources":["cvelist","nvd"]}],"credits":[],"assigner":"Linux","ssvc":{"scorer":"CISA-ADP","exploitation":"none","automatable":"no","technicalImpact":"partial","date":"2024-06-17T17:37:39.251Z"},"sources":[{"source":"cvelist","name":"CVE List","id":"CVE-2021-47305","url":"https://www.cve.org/CVERecord?id=CVE-2021-47305","licence":"CVE Terms of Use","modified":"2026-05-11T13:51:55.194Z"},{"source":"nvd","name":"NVD","id":"CVE-2021-47305","url":"https://nvd.nist.gov/vuln/detail/CVE-2021-47305","licence":"Public domain","modified":"2026-06-17T04:17:09.110Z"}],"updatedAt":"2026-11-25T22:58:08.787Z","epss":{"score":0.00238,"percentile":0.15958,"date":"2026-12-01T12:00:22.000Z"}}