{"schemaVersion":1,"url":"https://cve.openhack.com/cve/CVE-2024-56712","id":"CVE-2024-56712","title":"udmabuf: fix memory leak on last export_udmabuf() error path","description":"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","descriptionLong":"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.","published":"2024-12-29T08:48:46.167Z","updated":"2026-11-01T02:30:28.523200737Z","reserved":"2024-12-27T15:00:39.857Z","status":"Modified","rejected":false,"assigner":"Linux","metric":{"version":"3.1","score":5.5,"vector":"CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H","rating":"medium","source":"NVD"},"metrics":[{"version":"3.1","score":5.5,"vector":"CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H","rating":"medium","source":"NVD"},{"version":"3.1","score":3.3,"vector":"CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:L","rating":"low","source":"CISA-ADP"},{"version":"3.1","score":3.3,"vector":"CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:L","rating":"low","source":"OSV"}],"rating":"medium","products":["Linux"],"affectedProducts":[{"vendor":"Linux","product":"Linux","defaultStatus":"unaffected","versions":[{"version":"fbb0de795078190a9834b3409e4b009cfb18a6d4","lessThan":"00ebdef47994206f60546929a0f6f63285497272","status":"affected","versionType":"git"},{"version":"fbb0de795078190a9834b3409e4b009cfb18a6d4","lessThan":"e469922fbdf6ad729e5dc8d49289b5036a0ecdf8","status":"affected","versionType":"git"},{"version":"fbb0de795078190a9834b3409e4b009cfb18a6d4","lessThan":"c9fc8428d4255c2128da9c4d5cd92e554d0150cf","status":"affected","versionType":"git"},{"version":"fbb0de795078190a9834b3409e4b009cfb18a6d4","lessThan":"f49856f525acd5bef52ae28b7da2e001bbe7439e","status":"affected","versionType":"git"}],"platforms":[]},{"vendor":"Linux","product":"Linux","defaultStatus":"affected","versions":[{"version":"4.20","status":"affected"},{"version":"0","lessThan":"4.20","status":"unaffected","versionType":"semver"},{"version":"6.1.191","lessThanOrEqual":"6.1.*","status":"unaffected","versionType":"semver"},{"version":"6.6.160","lessThanOrEqual":"6.6.*","status":"unaffected","versionType":"semver"},{"version":"6.12.7","lessThanOrEqual":"6.12.*","status":"unaffected","versionType":"semver"},{"version":"6.13","lessThanOrEqual":"*","status":"unaffected","versionType":"original_commit_for_fix"}],"platforms":[]}],"packages":[],"cwes":["CWE-401"],"aliases":[],"references":[{"url":"https://git.kernel.org/stable/c/00ebdef47994206f60546929a0f6f63285497272","tags":["web"]},{"url":"https://git.kernel.org/stable/c/e469922fbdf6ad729e5dc8d49289b5036a0ecdf8","tags":["web"]},{"url":"https://git.kernel.org/stable/c/c9fc8428d4255c2128da9c4d5cd92e554d0150cf","tags":["Patch","web"]},{"url":"https://git.kernel.org/stable/c/f49856f525acd5bef52ae28b7da2e001bbe7439e","tags":["Patch","web"]},{"url":"https://github.com/CVEProject/cvelistV5/tree/main/cves/2024/56xxx/CVE-2024-56712.json","tags":["advisory"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2024-56712","tags":["advisory"]},{"url":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","tags":["package"]}],"patchReferenced":true,"fixAvailable":true,"exploitReferenced":false,"kev":false,"kevAdded":null,"kevDue":null,"kevEntry":null,"ssvc":{"exploitation":"none","automatable":"no","technicalImpact":"partial"},"epss":0.0025,"epssPercentile":0.16738,"sources":[{"name":"CVE List","url":"https://www.cve.org/CVERecord?id=CVE-2024-56712","ok":true},{"name":"NVD","url":"https://nvd.nist.gov/vuln/detail/CVE-2024-56712","ok":true,"note":"Modified"},{"name":"OSV","url":"https://osv.dev/vulnerability/CVE-2024-56712","ok":true,"note":"0 packages"},{"name":"CISA KEV","url":"https://www.cisa.gov/known-exploited-vulnerabilities-catalog","ok":true,"note":"not listed"},{"name":"EPSS","url":"https://api.first.org/data/v1/epss?cve=CVE-2024-56712","ok":true,"note":"scored 2026-11-20"}],"aiTitle":false,"tech":[],"critical":[],"attention":null}