{"id":"CVE-2024-27066","state":"PUBLISHED","title":"virtio: packed: fix unmap leak for indirect desc table","description":"In the Linux kernel, the following vulnerability has been resolved:\n\nvirtio: packed: fix unmap leak for indirect desc table\n\nWhen use_dma_api and premapped are true, then the do_unmap is false.\n\nBecause the do_unmap is false, vring_unmap_extra_packed is not called by\ndetach_buf_packed.\n\n  if (unlikely(vq->do_unmap)) {\n                curr = id;\n                for (i = 0; i < state->num; i++) {\n                        vring_unmap_extra_packed(vq,\n                                                 &vq->packed.desc_extra[curr]);\n                        curr = vq->packed.desc_extra[curr].next;\n                }\n  }\n\nSo the indirect desc table is not unmapped. This causes the unmap leak.\n\nSo here, we check vq->use_dma_api instead. Synchronously, dma info is\nupdated based on use_dma_api judgment\n\nThis bug does not occur, because no driver use the premapped with\nindirect.","publishedAt":"2024-05-01T13:04:12.582Z","updatedAt":"2026-08-05T11:29:20.653Z","severity":{"score":7.5,"label":"High","version":"3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H","source":"Linux"},"assigner":"Linux","products":["Linux Linux"],"affected":[{"vendor":"Linux","product":"Linux","defaultStatus":"unaffected","versions":[{"version":"b319940f83c21bb4c1fabffe68a862be879a6193","status":"affected","lessThan":"e142169aca5546ae6619c39a575cda8105362100","versionType":"git"},{"version":"b319940f83c21bb4c1fabffe68a862be879a6193","status":"affected","lessThan":"75450ff8c6fe8755bf5b139b238eaf9739cfd64e","versionType":"git"},{"version":"b319940f83c21bb4c1fabffe68a862be879a6193","status":"affected","lessThan":"51bacd9d29bf98c3ebc65e4a0477bb86306b4140","versionType":"git"},{"version":"b319940f83c21bb4c1fabffe68a862be879a6193","status":"affected","lessThan":"d5c0ed17fea60cca9bc3bf1278b49ba79242bbcd","versionType":"git"}],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["drivers/virtio/virtio_ring.c"]},{"vendor":"Linux","product":"Linux","defaultStatus":"affected","versions":[{"version":"6.6","status":"affected"},{"version":"0","status":"unaffected","lessThan":"6.6","versionType":"semver"},{"version":"6.6.23","status":"unaffected","lessThanOrEqual":"6.6.*","versionType":"semver"},{"version":"6.7.11","status":"unaffected","lessThanOrEqual":"6.7.*","versionType":"semver"},{"version":"6.8.2","status":"unaffected","lessThanOrEqual":"6.8.*","versionType":"semver"},{"version":"6.9","status":"unaffected","lessThanOrEqual":"*","versionType":"original_commit_for_fix"}],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["drivers/virtio/virtio_ring.c"]}],"references":["https://git.kernel.org/stable/c/e142169aca5546ae6619c39a575cda8105362100","https://git.kernel.org/stable/c/75450ff8c6fe8755bf5b139b238eaf9739cfd64e","https://git.kernel.org/stable/c/51bacd9d29bf98c3ebc65e4a0477bb86306b4140","https://git.kernel.org/stable/c/d5c0ed17fea60cca9bc3bf1278b49ba79242bbcd"],"weaknesses":[],"ingestedAt":"2026-10-29T20:07:10.607Z","source":{"repository":"CVEProject/cvelistV5","path":"cves/2024/27xxx/CVE-2024-27066.json","commit":"556c9d3a8cd17e218bb8e452ba7cd619a384ff47"},"raw":{"dataType":"CVE_RECORD","dataVersion":"5.2","cveMetadata":{"cveId":"CVE-2024-27066","state":"PUBLISHED","datePublished":"2024-05-01T13:04:12.582Z","dateUpdated":"2026-08-05T11:29:20.653Z","assignerShortName":"Linux","assignerOrgId":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","dateReserved":"2024-02-19T14:20:24.216Z"},"containers":{"cna":{"title":"virtio: packed: fix unmap leak for indirect desc table","descriptions":[{"lang":"en","value":"In the Linux kernel, the following vulnerability has been resolved:\n\nvirtio: packed: fix unmap leak for indirect desc table\n\nWhen use_dma_api and premapped are true, then the do_unmap is false.\n\nBecause the do_unmap is false, vring_unmap_extra_packed is not called by\ndetach_buf_packed.\n\n  if (unlikely(vq->do_unmap)) {\n                curr = id;\n                for (i = 0; i < state->num; i++) {\n                        vring_unmap_extra_packed(vq,\n                                                 &vq->packed.desc_extra[curr]);\n                        curr = vq->packed.desc_extra[curr].next;\n                }\n  }\n\nSo the indirect desc table is not unmapped. This causes the unmap leak.\n\nSo here, we check vq->use_dma_api instead. Synchronously, dma info is\nupdated based on use_dma_api judgment\n\nThis bug does not occur, because no driver use the premapped with\nindirect."}],"affected":[{"vendor":"Linux","product":"Linux","defaultStatus":"unaffected","versions":[{"version":"b319940f83c21bb4c1fabffe68a862be879a6193","status":"affected","lessThan":"e142169aca5546ae6619c39a575cda8105362100","versionType":"git"},{"version":"b319940f83c21bb4c1fabffe68a862be879a6193","status":"affected","lessThan":"75450ff8c6fe8755bf5b139b238eaf9739cfd64e","versionType":"git"},{"version":"b319940f83c21bb4c1fabffe68a862be879a6193","status":"affected","lessThan":"51bacd9d29bf98c3ebc65e4a0477bb86306b4140","versionType":"git"},{"version":"b319940f83c21bb4c1fabffe68a862be879a6193","status":"affected","lessThan":"d5c0ed17fea60cca9bc3bf1278b49ba79242bbcd","versionType":"git"}],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["drivers/virtio/virtio_ring.c"]},{"vendor":"Linux","product":"Linux","defaultStatus":"affected","versions":[{"version":"6.6","status":"affected"},{"version":"0","status":"unaffected","lessThan":"6.6","versionType":"semver"},{"version":"6.6.23","status":"unaffected","lessThanOrEqual":"6.6.*","versionType":"semver"},{"version":"6.7.11","status":"unaffected","lessThanOrEqual":"6.7.*","versionType":"semver"},{"version":"6.8.2","status":"unaffected","lessThanOrEqual":"6.8.*","versionType":"semver"},{"version":"6.9","status":"unaffected","lessThanOrEqual":"*","versionType":"original_commit_for_fix"}],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["drivers/virtio/virtio_ring.c"]}],"references":[{"url":"https://git.kernel.org/stable/c/e142169aca5546ae6619c39a575cda8105362100"},{"url":"https://git.kernel.org/stable/c/75450ff8c6fe8755bf5b139b238eaf9739cfd64e"},{"url":"https://git.kernel.org/stable/c/51bacd9d29bf98c3ebc65e4a0477bb86306b4140"},{"url":"https://git.kernel.org/stable/c/d5c0ed17fea60cca9bc3bf1278b49ba79242bbcd"}],"metrics":[{"cvssV3_1":{"version":"3.1","vectorString":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H","baseScore":7.5,"baseSeverity":"HIGH"},"scenarios":[{"lang":"en","value":"AV:N - The only consumer of premapped mode is virtio-net's receive queues, and RX buffer resubmission (`try_fill_recv()`) is driven by consumption of inbound packets, so the leaking submit/detach cycle is exercised by a remote peer sending traffic to the interface. The vulnerable component is bound to the network stack and no credentials or local access are needed to drive it.\nAC:L - Nothing about the trigger depends on memory layout, timing, or a race — a remote party simply generates traffic and each buffer cycle leaks a mapping deterministically.\nPR:N - Driving virtio-net RX buffer churn requires no authentication or account on the target; an unauthenticated remote sender reaching the interface is sufficient.\nUI:N - No victim action is required; the RX refill and descriptor detach path runs automatically in NAPI context whenever packets arrive.\nS:U - The leaked DMA/IOVA resources and the exhaustion they cause are all within the same kernel security authority as the vulnerable virtio_ring code; no VM, IOMMU, or sandbox boundary is crossed by the party that can trigger the leak.\nC:N - The defect is purely a missing `dma_unmap_single()` in the accounting path — no out-of-bounds read, no kernel data reaches userspace, and the leaked swiotlb slot is never reused so its contents cannot cross-contaminate a later mapping.\nI:N - No memory is corrupted or modified by the bug itself; the stale IOMMU translation could only be abused by a deliberately malicious device or hypervisor, which under the virtio trust model already has full guest memory access, so no integrity is gained by the attacker who can actually trigger this.\nA:H - Every request leaks a streaming DMA mapping with no upper bound, exhausting swiotlb slots / IOVA space and growing IOMMU page tables and rbtree nodes until DMA mapping fails system-wide for all devices and the kernel runs out of memory — a hard denial of service, not mere degradation."}]}],"providerMetadata":{"shortName":"Linux","orgId":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","dateUpdated":"2026-08-05T11:29:20.653Z"},"cpeApplicability":[{"nodes":[{"operator":"OR","negate":false,"cpeMatch":[{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"6.6","versionEndExcluding":"6.6.23"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"6.6","versionEndExcluding":"6.7.11"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"6.6","versionEndExcluding":"6.8.2"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"6.6","versionEndExcluding":"6.9"}]}]}],"x_generator":{"engine":"bippy-1.2.0"}},"adp":[{"title":"CISA ADP Vulnrichment","metrics":[{"other":{"type":"ssvc","content":{"timestamp":"2024-06-13T18:28:27.748226Z","id":"CVE-2024-27066","options":[{"Exploitation":"none"},{"Automatable":"no"},{"Technical Impact":"partial"}],"role":"CISA Coordinator","version":"2.0.3"}}}],"providerMetadata":{"shortName":"CISA-ADP","orgId":"134c704f-9b21-4f2e-91b3-4a467353bcc0","dateUpdated":"2024-07-30T14:58:09.210Z"}},{"title":"CVE Program Container","references":[{"url":"https://git.kernel.org/stable/c/e142169aca5546ae6619c39a575cda8105362100","tags":["x_transferred"]},{"url":"https://git.kernel.org/stable/c/75450ff8c6fe8755bf5b139b238eaf9739cfd64e","tags":["x_transferred"]},{"url":"https://git.kernel.org/stable/c/51bacd9d29bf98c3ebc65e4a0477bb86306b4140","tags":["x_transferred"]},{"url":"https://git.kernel.org/stable/c/d5c0ed17fea60cca9bc3bf1278b49ba79242bbcd","tags":["x_transferred"]}],"providerMetadata":{"shortName":"CVE","orgId":"af854a3a-2127-422b-91ae-364da2661108","dateUpdated":"2024-08-02T00:27:57.845Z"}}]}}}