ghsa-857r-xmrg-gj95
Vulnerability from github
Published
2024-05-01 15:30
Modified
2024-05-01 15:30
Details

In the Linux kernel, the following vulnerability has been resolved:

virtio: packed: fix unmap leak for indirect desc table

When use_dma_api and premapped are true, then the do_unmap is false.

Because the do_unmap is false, vring_unmap_extra_packed is not called by detach_buf_packed.

if (unlikely(vq->do_unmap)) { curr = id; for (i = 0; i < state->num; i++) { vring_unmap_extra_packed(vq, &vq->packed.desc_extra[curr]); curr = vq->packed.desc_extra[curr].next; } }

So the indirect desc table is not unmapped. This causes the unmap leak.

So here, we check vq->use_dma_api instead. Synchronously, dma info is updated based on use_dma_api judgment

This bug does not occur, because no driver use the premapped with indirect.

Show details on source website


{
  "affected": [],
  "aliases": [
    "CVE-2024-27066"
  ],
  "database_specific": {
    "cwe_ids": [],
    "github_reviewed": false,
    "github_reviewed_at": null,
    "nvd_published_at": "2024-05-01T13:15:50Z",
    "severity": null
  },
  "details": "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-\u003edo_unmap)) {\n                curr = id;\n                for (i = 0; i \u003c state-\u003enum; i++) {\n                        vring_unmap_extra_packed(vq,\n                                                 \u0026vq-\u003epacked.desc_extra[curr]);\n                        curr = vq-\u003epacked.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-\u003euse_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.",
  "id": "GHSA-857r-xmrg-gj95",
  "modified": "2024-05-01T15:30:36Z",
  "published": "2024-05-01T15:30:36Z",
  "references": [
    {
      "type": "ADVISORY",
      "url": "https://nvd.nist.gov/vuln/detail/CVE-2024-27066"
    },
    {
      "type": "WEB",
      "url": "https://git.kernel.org/stable/c/51bacd9d29bf98c3ebc65e4a0477bb86306b4140"
    },
    {
      "type": "WEB",
      "url": "https://git.kernel.org/stable/c/75450ff8c6fe8755bf5b139b238eaf9739cfd64e"
    },
    {
      "type": "WEB",
      "url": "https://git.kernel.org/stable/c/d5c0ed17fea60cca9bc3bf1278b49ba79242bbcd"
    },
    {
      "type": "WEB",
      "url": "https://git.kernel.org/stable/c/e142169aca5546ae6619c39a575cda8105362100"
    }
  ],
  "schema_version": "1.4.0",
  "severity": []
}


Log in or create an account to share your comment.




Tags
Taxonomy of the tags.


Loading...

Loading...