{"id":"CVE-2024-56712","aliases":["CVE-2024-56712"],"related":[],"kind":"vulnerability","state":"published","title":"udmabuf: fix memory leak on last export_udmabuf() error path","summary":"In the Linux kernel, the following vulnerability has been resolved:\n\nudmabuf: fix memory leak on last export_udmabuf() error path\n\nIn export_udmabuf(), if dma_buf_fd() fails because the FD table is full, a\ndma_buf owning the udmabuf has already been created; but the error handling\nin udmabuf_create() will tear down the udmabuf without doing anything about\nthe containing dma_buf.\n\nThis leaves a dma_buf in memory that contains a dangling pointer; though\nthat doesn't seem to lead to anything bad except a memory leak.\n\nFix it by moving the dma_buf_fd() call out of export_udmabuf() so that we\ncan give it different error handling.\n\nNote that the shape of this code changed a lot in commit 5e72b2b41a21\n(\"udmabuf: convert udmabuf driver to use folios\"); but the memory leak\nseems to have existed since the introduction of udmabuf.","summarySource":"cvelist","descriptions":[{"lang":"en","text":"In the Linux kernel, the following vulnerability has been resolved:\n\nudmabuf: fix memory leak on last export_udmabuf() error path\n\nIn export_udmabuf(), if dma_buf_fd() fails because the FD table is full, a\ndma_buf owning the udmabuf has already been created; but the error handling\nin udmabuf_create() will tear down the udmabuf without doing anything about\nthe containing dma_buf.\n\nThis leaves a dma_buf in memory that contains a dangling pointer; though\nthat doesn't seem to lead to anything bad except a memory leak.\n\nFix it by moving the dma_buf_fd() call out of export_udmabuf() so that we\ncan give it different error handling.\n\nNote that the shape of this code changed a lot in commit 5e72b2b41a21\n(\"udmabuf: convert udmabuf driver to use folios\"); but the memory leak\nseems to have existed since the introduction of udmabuf.","source":"cvelist"},{"lang":"es","text":"En el kernel de Linux, se ha resuelto la siguiente vulnerabilidad: udmabuf: reparar pérdida de memoria en la última ruta de error export_udmabuf() En export_udmabuf(), si dma_buf_fd() falla porque la tabla FD está llena, ya se ha creado un dma_buf que posee el udmabuf; pero la gestión de errores en udmabuf_create() destruirá el udmabuf sin hacer nada con el dma_buf que lo contiene. Esto deja un dma_buf en la memoria que contiene un puntero colgante; aunque eso no parece conducir a nada malo excepto a una pérdida de memoria. Arréglelo moviendo la llamada dma_buf_fd() fuera de export_udmabuf() para que podamos darle un gestión de errores diferente. Tenga en cuenta que la forma de este código cambió mucho en el commit 5e72b2b41a21 (\"udmabuf: convertir el controlador udmabuf para usar folios\"); Pero la pérdida de memoria parece haber existido desde la introducción de udmabuf.","source":"nvd"}],"published":"2024-12-29T08:48:46.167Z","modified":"2026-10-30T13:17:48.370Z","severity":{"scorer":"CISA-ADP","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:L","score":3.3,"rating":"LOW"},"severities":[{"scorer":"CISA-ADP","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:L","score":3.3,"rating":"LOW"},{"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-401"],"affected":[{"ranges":[{"type":"git","introduced":"fbb0de795078190a9834b3409e4b009cfb18a6d4","fixed":"00ebdef47994206f60546929a0f6f63285497272","status":"affected"},{"type":"git","introduced":"fbb0de795078190a9834b3409e4b009cfb18a6d4","fixed":"e469922fbdf6ad729e5dc8d49289b5036a0ecdf8","status":"affected"},{"type":"git","introduced":"fbb0de795078190a9834b3409e4b009cfb18a6d4","fixed":"c9fc8428d4255c2128da9c4d5cd92e554d0150cf","status":"affected"},{"type":"git","introduced":"fbb0de795078190a9834b3409e4b009cfb18a6d4","fixed":"f49856f525acd5bef52ae28b7da2e001bbe7439e","status":"affected"}],"vendor":"Linux","product":"Linux","repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","source":"cvelist"},{"ranges":[{"version":"4.20","status":"affected"},{"type":"semver","introduced":"0","fixed":"4.20","status":"unaffected"},{"type":"semver","introduced":"6.1.191","lastAffected":"6.1.*","status":"unaffected"},{"type":"semver","introduced":"6.6.160","lastAffected":"6.6.*","status":"unaffected"},{"type":"semver","introduced":"6.12.7","lastAffected":"6.12.*","status":"unaffected"},{"type":"original_commit_for_fix","introduced":"6.13","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.20","fixed":"6.12.7"},{"status":"affected","version":"6.13"},{"status":"affected","version":"6.13"},{"status":"affected","version":"6.13"}],"vendor":"linux","product":"linux_kernel","cpe":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","source":"nvd"}],"references":[{"url":"https://git.kernel.org/stable/c/00ebdef47994206f60546929a0f6f63285497272","tags":[],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/e469922fbdf6ad729e5dc8d49289b5036a0ecdf8","tags":[],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/c9fc8428d4255c2128da9c4d5cd92e554d0150cf","tags":["patch"],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/f49856f525acd5bef52ae28b7da2e001bbe7439e","tags":["patch"],"sources":["cvelist","nvd"]}],"credits":[],"assigner":"Linux","ssvc":{"scorer":"CISA-ADP","exploitation":"none","automatable":"no","technicalImpact":"partial","date":"2025-04-17T20:10:27.510Z"},"sources":[{"source":"cvelist","name":"CVE List","id":"CVE-2024-56712","url":"https://www.cve.org/CVERecord?id=CVE-2024-56712","licence":"CVE Terms of Use","modified":"2026-10-30T12:20:26.741Z"},{"source":"nvd","name":"NVD","id":"CVE-2024-56712","url":"https://nvd.nist.gov/vuln/detail/CVE-2024-56712","licence":"Public domain","modified":"2026-10-30T13:17:48.370Z"}],"updatedAt":"2026-11-25T22:58:50.550Z","epss":{"score":0.0025,"percentile":0.17587,"date":"2026-12-01T12:00:22.000Z"}}