{"id":"CVE-2026-63929","state":"PUBLISHED","title":"iio: buffer: Fix DMA fence leak in iio_buffer_enqueue_dmabuf()","description":"In the Linux kernel, the following vulnerability has been resolved:\n\niio: buffer: Fix DMA fence leak in iio_buffer_enqueue_dmabuf()\n\niio_buffer_enqueue_dmabuf() allocates a struct iio_dma_fence (104 bytes,\nkmalloc-128) via kmalloc_obj()+dma_fence_init(), which sets the initial\nkref to 1.  It then calls dma_resv_add_fence() which takes a second\nreference (kref=2), and stores a raw pointer in block->fence.\n\nOn the success path the function returns without calling dma_fence_put()\nto release the initial reference, so every buffer enqueue permanently\nleaks one kmalloc-128 allocation.\n\nThe iio_buffer_cleanup() work item only releases the temporary reference\ntaken during completion signalling by iio_buffer_signal_dmabuf_done();\nthe initial reference from dma_fence_init() is never released.\n\nWith four iio_rwdev instances at 240kHz and 512 samples per buffer,\nthis produces ~1875 kmalloc-128 allocations per second matching the\nobserved slab growth exactly. A test with ftrace confirmed that the\ndma_fence_destroy event was never triggered.\n\nFix by calling dma_fence_put() after dma_resv_add_fence(), transferring\nownership of the fence to the DMA reservation object. The DMA fence then\ngets properly discarded after being signalled.","publishedAt":"2026-07-19T14:55:29.309Z","updatedAt":"2026-07-19T14:55:29.309Z","severity":null,"assigner":"Linux","products":["Linux Linux"],"affected":[{"vendor":"Linux","product":"Linux","defaultStatus":"unaffected","versions":[{"version":"3e26d9f08fbe0b73e951a5e810fdb7a332b7e37f","status":"affected","lessThan":"9678aeed8b77d495a417dd057d479f3733094019","versionType":"git"},{"version":"3e26d9f08fbe0b73e951a5e810fdb7a332b7e37f","status":"affected","lessThan":"3412a95afaa5d3262008dfc34f3c7be33d8151dc","versionType":"git"},{"version":"3e26d9f08fbe0b73e951a5e810fdb7a332b7e37f","status":"affected","lessThan":"96cdeaba6a008503455b78a9641c05c2a886a7ec","versionType":"git"},{"version":"3e26d9f08fbe0b73e951a5e810fdb7a332b7e37f","status":"affected","lessThan":"a093999355084bdbfe6e97f1dd232e58a1525f0b","versionType":"git"}],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["drivers/iio/industrialio-buffer.c"]},{"vendor":"Linux","product":"Linux","defaultStatus":"affected","versions":[{"version":"6.11","status":"affected"},{"version":"0","status":"unaffected","lessThan":"6.11","versionType":"semver"},{"version":"6.12.93","status":"unaffected","lessThanOrEqual":"6.12.*","versionType":"semver"},{"version":"6.18.35","status":"unaffected","lessThanOrEqual":"6.18.*","versionType":"semver"},{"version":"7.0.12","status":"unaffected","lessThanOrEqual":"7.0.*","versionType":"semver"},{"version":"7.1","status":"unaffected","lessThanOrEqual":"*","versionType":"original_commit_for_fix"}],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["drivers/iio/industrialio-buffer.c"]}],"references":["https://git.kernel.org/stable/c/9678aeed8b77d495a417dd057d479f3733094019","https://git.kernel.org/stable/c/3412a95afaa5d3262008dfc34f3c7be33d8151dc","https://git.kernel.org/stable/c/96cdeaba6a008503455b78a9641c05c2a886a7ec","https://git.kernel.org/stable/c/a093999355084bdbfe6e97f1dd232e58a1525f0b"],"weaknesses":[],"ingestedAt":"2026-10-29T20:12:41.951Z","source":{"repository":"CVEProject/cvelistV5","path":"cves/2026/63xxx/CVE-2026-63929.json","commit":"556c9d3a8cd17e218bb8e452ba7cd619a384ff47"},"raw":{"dataType":"CVE_RECORD","dataVersion":"5.2","cveMetadata":{"cveId":"CVE-2026-63929","state":"PUBLISHED","datePublished":"2026-07-19T14:55:29.309Z","dateUpdated":"2026-07-19T14:55:29.309Z","assignerShortName":"Linux","assignerOrgId":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","dateReserved":"2026-07-19T07:54:57.021Z"},"containers":{"cna":{"title":"iio: buffer: Fix DMA fence leak in iio_buffer_enqueue_dmabuf()","descriptions":[{"lang":"en","value":"In the Linux kernel, the following vulnerability has been resolved:\n\niio: buffer: Fix DMA fence leak in iio_buffer_enqueue_dmabuf()\n\niio_buffer_enqueue_dmabuf() allocates a struct iio_dma_fence (104 bytes,\nkmalloc-128) via kmalloc_obj()+dma_fence_init(), which sets the initial\nkref to 1.  It then calls dma_resv_add_fence() which takes a second\nreference (kref=2), and stores a raw pointer in block->fence.\n\nOn the success path the function returns without calling dma_fence_put()\nto release the initial reference, so every buffer enqueue permanently\nleaks one kmalloc-128 allocation.\n\nThe iio_buffer_cleanup() work item only releases the temporary reference\ntaken during completion signalling by iio_buffer_signal_dmabuf_done();\nthe initial reference from dma_fence_init() is never released.\n\nWith four iio_rwdev instances at 240kHz and 512 samples per buffer,\nthis produces ~1875 kmalloc-128 allocations per second matching the\nobserved slab growth exactly. A test with ftrace confirmed that the\ndma_fence_destroy event was never triggered.\n\nFix by calling dma_fence_put() after dma_resv_add_fence(), transferring\nownership of the fence to the DMA reservation object. The DMA fence then\ngets properly discarded after being signalled."}],"affected":[{"vendor":"Linux","product":"Linux","defaultStatus":"unaffected","versions":[{"version":"3e26d9f08fbe0b73e951a5e810fdb7a332b7e37f","status":"affected","lessThan":"9678aeed8b77d495a417dd057d479f3733094019","versionType":"git"},{"version":"3e26d9f08fbe0b73e951a5e810fdb7a332b7e37f","status":"affected","lessThan":"3412a95afaa5d3262008dfc34f3c7be33d8151dc","versionType":"git"},{"version":"3e26d9f08fbe0b73e951a5e810fdb7a332b7e37f","status":"affected","lessThan":"96cdeaba6a008503455b78a9641c05c2a886a7ec","versionType":"git"},{"version":"3e26d9f08fbe0b73e951a5e810fdb7a332b7e37f","status":"affected","lessThan":"a093999355084bdbfe6e97f1dd232e58a1525f0b","versionType":"git"}],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["drivers/iio/industrialio-buffer.c"]},{"vendor":"Linux","product":"Linux","defaultStatus":"affected","versions":[{"version":"6.11","status":"affected"},{"version":"0","status":"unaffected","lessThan":"6.11","versionType":"semver"},{"version":"6.12.93","status":"unaffected","lessThanOrEqual":"6.12.*","versionType":"semver"},{"version":"6.18.35","status":"unaffected","lessThanOrEqual":"6.18.*","versionType":"semver"},{"version":"7.0.12","status":"unaffected","lessThanOrEqual":"7.0.*","versionType":"semver"},{"version":"7.1","status":"unaffected","lessThanOrEqual":"*","versionType":"original_commit_for_fix"}],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["drivers/iio/industrialio-buffer.c"]}],"references":[{"url":"https://git.kernel.org/stable/c/9678aeed8b77d495a417dd057d479f3733094019"},{"url":"https://git.kernel.org/stable/c/3412a95afaa5d3262008dfc34f3c7be33d8151dc"},{"url":"https://git.kernel.org/stable/c/96cdeaba6a008503455b78a9641c05c2a886a7ec"},{"url":"https://git.kernel.org/stable/c/a093999355084bdbfe6e97f1dd232e58a1525f0b"}],"providerMetadata":{"shortName":"Linux","orgId":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","dateUpdated":"2026-07-19T14:55:29.309Z"},"cpeApplicability":[{"nodes":[{"operator":"OR","negate":false,"cpeMatch":[{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"6.11","versionEndExcluding":"6.12.93"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"6.11","versionEndExcluding":"6.18.35"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"6.11","versionEndExcluding":"7.0.12"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"6.11","versionEndExcluding":"7.1"}]}]}],"x_generator":{"engine":"bippy-1.2.0"}}}}}