{"id":"CVE-2023-53181","state":"PUBLISHED","title":"dma-buf/dma-resv: Stop leaking on krealloc() failure","description":"In the Linux kernel, the following vulnerability has been resolved:\n\ndma-buf/dma-resv: Stop leaking on krealloc() failure\n\nCurrently dma_resv_get_fences() will leak the previously\nallocated array if the fence iteration got restarted and\nthe krealloc_array() fails.\n\nFree the old array by hand, and make sure we still clear\nthe returned *fences so the caller won't end up accessing\nfreed memory. Some (but not all) of the callers of\ndma_resv_get_fences() seem to still trawl through the\narray even when dma_resv_get_fences() failed. And let's\nzero out *num_fences as well for good measure.","publishedAt":"2025-09-15T14:04:32.098Z","updatedAt":"2026-05-11T19:39:50.199Z","severity":null,"assigner":"Linux","products":["Linux Linux"],"affected":[{"vendor":"Linux","product":"Linux","defaultStatus":"unaffected","versions":[{"version":"d3c80698c9f58a0683badf78793eebaa0c71afbd","status":"affected","lessThan":"19e7b9f1f7e1cb92a4cc53b4c064f7fb4b1f1983","versionType":"git"},{"version":"d3c80698c9f58a0683badf78793eebaa0c71afbd","status":"affected","lessThan":"819656cc03dec7f7f7800274dfbc8eb49f888e9f","versionType":"git"},{"version":"d3c80698c9f58a0683badf78793eebaa0c71afbd","status":"affected","lessThan":"05abb3be91d8788328231ee02973ab3d47f5e3d2","versionType":"git"}],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["drivers/dma-buf/dma-resv.c"]},{"vendor":"Linux","product":"Linux","defaultStatus":"affected","versions":[{"version":"5.16","status":"affected"},{"version":"0","status":"unaffected","lessThan":"5.16","versionType":"semver"},{"version":"6.1.42","status":"unaffected","lessThanOrEqual":"6.1.*","versionType":"semver"},{"version":"6.4.7","status":"unaffected","lessThanOrEqual":"6.4.*","versionType":"semver"},{"version":"6.5","status":"unaffected","lessThanOrEqual":"*","versionType":"original_commit_for_fix"}],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["drivers/dma-buf/dma-resv.c"]}],"references":["https://git.kernel.org/stable/c/19e7b9f1f7e1cb92a4cc53b4c064f7fb4b1f1983","https://git.kernel.org/stable/c/819656cc03dec7f7f7800274dfbc8eb49f888e9f","https://git.kernel.org/stable/c/05abb3be91d8788328231ee02973ab3d47f5e3d2"],"weaknesses":[],"ingestedAt":"2026-10-29T20:06:33.064Z","source":{"repository":"CVEProject/cvelistV5","path":"cves/2023/53xxx/CVE-2023-53181.json","commit":"556c9d3a8cd17e218bb8e452ba7cd619a384ff47"},"raw":{"dataType":"CVE_RECORD","dataVersion":"5.2","cveMetadata":{"cveId":"CVE-2023-53181","state":"PUBLISHED","datePublished":"2025-09-15T14:04:32.098Z","dateUpdated":"2026-05-11T19:39:50.199Z","assignerShortName":"Linux","assignerOrgId":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","dateReserved":"2025-09-15T13:59:19.065Z"},"containers":{"cna":{"title":"dma-buf/dma-resv: Stop leaking on krealloc() failure","descriptions":[{"lang":"en","value":"In the Linux kernel, the following vulnerability has been resolved:\n\ndma-buf/dma-resv: Stop leaking on krealloc() failure\n\nCurrently dma_resv_get_fences() will leak the previously\nallocated array if the fence iteration got restarted and\nthe krealloc_array() fails.\n\nFree the old array by hand, and make sure we still clear\nthe returned *fences so the caller won't end up accessing\nfreed memory. Some (but not all) of the callers of\ndma_resv_get_fences() seem to still trawl through the\narray even when dma_resv_get_fences() failed. And let's\nzero out *num_fences as well for good measure."}],"affected":[{"vendor":"Linux","product":"Linux","defaultStatus":"unaffected","versions":[{"version":"d3c80698c9f58a0683badf78793eebaa0c71afbd","status":"affected","lessThan":"19e7b9f1f7e1cb92a4cc53b4c064f7fb4b1f1983","versionType":"git"},{"version":"d3c80698c9f58a0683badf78793eebaa0c71afbd","status":"affected","lessThan":"819656cc03dec7f7f7800274dfbc8eb49f888e9f","versionType":"git"},{"version":"d3c80698c9f58a0683badf78793eebaa0c71afbd","status":"affected","lessThan":"05abb3be91d8788328231ee02973ab3d47f5e3d2","versionType":"git"}],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["drivers/dma-buf/dma-resv.c"]},{"vendor":"Linux","product":"Linux","defaultStatus":"affected","versions":[{"version":"5.16","status":"affected"},{"version":"0","status":"unaffected","lessThan":"5.16","versionType":"semver"},{"version":"6.1.42","status":"unaffected","lessThanOrEqual":"6.1.*","versionType":"semver"},{"version":"6.4.7","status":"unaffected","lessThanOrEqual":"6.4.*","versionType":"semver"},{"version":"6.5","status":"unaffected","lessThanOrEqual":"*","versionType":"original_commit_for_fix"}],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["drivers/dma-buf/dma-resv.c"]}],"references":[{"url":"https://git.kernel.org/stable/c/19e7b9f1f7e1cb92a4cc53b4c064f7fb4b1f1983"},{"url":"https://git.kernel.org/stable/c/819656cc03dec7f7f7800274dfbc8eb49f888e9f"},{"url":"https://git.kernel.org/stable/c/05abb3be91d8788328231ee02973ab3d47f5e3d2"}],"providerMetadata":{"shortName":"Linux","orgId":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","dateUpdated":"2026-05-11T19:39:50.199Z"},"cpeApplicability":[{"nodes":[{"operator":"OR","negate":false,"cpeMatch":[{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"5.16","versionEndExcluding":"6.1.42"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"5.16","versionEndExcluding":"6.4.7"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"5.16","versionEndExcluding":"6.5"}]}]}],"x_generator":{"engine":"bippy-1.2.0"}}}}}