CVE-2024-27066

Source
https://nvd.nist.gov/vuln/detail/CVE-2024-27066
Import Source
https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2024-27066.json
JSON Data
https://api.osv.dev/v1/vulns/CVE-2024-27066
Downstream
Published
2024-05-01T13:04:12Z
Modified
2025-10-15T10:25:12.412673Z
Summary
virtio: packed: fix unmap leak for indirect desc table
Details

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

virtio: packed: fix unmap leak for indirect desc table

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

Because the dounmap is false, vringunmapextrapacked is not called by detachbufpacked.

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

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

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

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

References

Affected packages

Git / git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git

Affected ranges

Type
GIT
Repo
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
Events
Introduced
b319940f83c21bb4c1fabffe68a862be879a6193
Fixed
e142169aca5546ae6619c39a575cda8105362100
Type
GIT
Repo
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
Events
Introduced
b319940f83c21bb4c1fabffe68a862be879a6193
Fixed
75450ff8c6fe8755bf5b139b238eaf9739cfd64e
Type
GIT
Repo
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
Events
Introduced
b319940f83c21bb4c1fabffe68a862be879a6193
Fixed
51bacd9d29bf98c3ebc65e4a0477bb86306b4140
Type
GIT
Repo
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
Events
Introduced
b319940f83c21bb4c1fabffe68a862be879a6193
Fixed
d5c0ed17fea60cca9bc3bf1278b49ba79242bbcd

Affected versions

v6.*

v6.6
v6.6-rc1
v6.6-rc2
v6.6-rc3
v6.6-rc4
v6.6-rc5
v6.6-rc6
v6.6-rc7
v6.6.1
v6.6.10
v6.6.11
v6.6.12
v6.6.13
v6.6.14
v6.6.15
v6.6.16
v6.6.17
v6.6.18
v6.6.19
v6.6.2
v6.6.20
v6.6.21
v6.6.22
v6.6.3
v6.6.4
v6.6.5
v6.6.6
v6.6.7
v6.6.8
v6.6.9
v6.7
v6.7-rc1
v6.7-rc2
v6.7-rc3
v6.7-rc4
v6.7-rc5
v6.7-rc6
v6.7-rc7
v6.7-rc8
v6.7.1
v6.7.10
v6.7.2
v6.7.3
v6.7.4
v6.7.5
v6.7.6
v6.7.7
v6.7.8
v6.7.9
v6.8
v6.8-rc1
v6.8-rc2
v6.8-rc3
v6.8-rc4
v6.8-rc5
v6.8-rc6
v6.8-rc7
v6.8.1

Database specific

{
    "vanir_signatures": [
        {
            "signature_version": "v1",
            "signature_type": "Function",
            "target": {
                "file": "drivers/virtio/virtio_ring.c",
                "function": "virtqueue_add_indirect_packed"
            },
            "id": "CVE-2024-27066-01488c7d",
            "digest": {
                "length": 2684.0,
                "function_hash": "71829946791448367090746279378187527795"
            },
            "deprecated": false,
            "source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@51bacd9d29bf98c3ebc65e4a0477bb86306b4140"
        },
        {
            "signature_version": "v1",
            "signature_type": "Function",
            "target": {
                "file": "drivers/virtio/virtio_ring.c",
                "function": "virtqueue_add_indirect_packed"
            },
            "id": "CVE-2024-27066-0b945a98",
            "digest": {
                "length": 2684.0,
                "function_hash": "71829946791448367090746279378187527795"
            },
            "deprecated": false,
            "source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@d5c0ed17fea60cca9bc3bf1278b49ba79242bbcd"
        },
        {
            "signature_version": "v1",
            "signature_type": "Line",
            "target": {
                "file": "drivers/virtio/virtio_ring.c"
            },
            "id": "CVE-2024-27066-1844d98a",
            "digest": {
                "line_hashes": [
                    "339596633029749655932058025881675999130",
                    "17203958994190351722313077617563855415",
                    "285583612751536254068160691787444730861",
                    "334745877579348348367438895779716618478",
                    "268378609346611359885301091376258517436",
                    "277441548818140065125347502481147972544",
                    "223944282765193062518697613519352444945",
                    "150474774105695447911702629202024039428",
                    "329688931314770791425706417645133332093",
                    "329785554173428548153484240107863021655",
                    "263788721602803074223913631750859477605",
                    "52045156199426326465155419819530653745"
                ],
                "threshold": 0.9
            },
            "deprecated": false,
            "source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@d5c0ed17fea60cca9bc3bf1278b49ba79242bbcd"
        },
        {
            "signature_version": "v1",
            "signature_type": "Function",
            "target": {
                "file": "drivers/virtio/virtio_ring.c",
                "function": "detach_buf_packed"
            },
            "id": "CVE-2024-27066-22bb012d",
            "digest": {
                "length": 942.0,
                "function_hash": "261567477688692479740052905378930828421"
            },
            "deprecated": false,
            "source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@e142169aca5546ae6619c39a575cda8105362100"
        },
        {
            "signature_version": "v1",
            "signature_type": "Function",
            "target": {
                "file": "drivers/virtio/virtio_ring.c",
                "function": "virtqueue_add_packed"
            },
            "id": "CVE-2024-27066-282e766c",
            "digest": {
                "length": 3119.0,
                "function_hash": "88847965938049743274555965940710532401"
            },
            "deprecated": false,
            "source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@e142169aca5546ae6619c39a575cda8105362100"
        },
        {
            "signature_version": "v1",
            "signature_type": "Line",
            "target": {
                "file": "drivers/virtio/virtio_ring.c"
            },
            "id": "CVE-2024-27066-6ae82468",
            "digest": {
                "line_hashes": [
                    "339596633029749655932058025881675999130",
                    "17203958994190351722313077617563855415",
                    "285583612751536254068160691787444730861",
                    "334745877579348348367438895779716618478",
                    "268378609346611359885301091376258517436",
                    "277441548818140065125347502481147972544",
                    "223944282765193062518697613519352444945",
                    "150474774105695447911702629202024039428",
                    "329688931314770791425706417645133332093",
                    "329785554173428548153484240107863021655",
                    "263788721602803074223913631750859477605",
                    "52045156199426326465155419819530653745"
                ],
                "threshold": 0.9
            },
            "deprecated": false,
            "source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@51bacd9d29bf98c3ebc65e4a0477bb86306b4140"
        },
        {
            "signature_version": "v1",
            "signature_type": "Function",
            "target": {
                "file": "drivers/virtio/virtio_ring.c",
                "function": "virtqueue_add_packed"
            },
            "id": "CVE-2024-27066-6b87066e",
            "digest": {
                "length": 3119.0,
                "function_hash": "88847965938049743274555965940710532401"
            },
            "deprecated": false,
            "source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@d5c0ed17fea60cca9bc3bf1278b49ba79242bbcd"
        },
        {
            "signature_version": "v1",
            "signature_type": "Function",
            "target": {
                "file": "drivers/virtio/virtio_ring.c",
                "function": "virtqueue_add_packed"
            },
            "id": "CVE-2024-27066-8cd0f11b",
            "digest": {
                "length": 3119.0,
                "function_hash": "88847965938049743274555965940710532401"
            },
            "deprecated": false,
            "source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@51bacd9d29bf98c3ebc65e4a0477bb86306b4140"
        },
        {
            "signature_version": "v1",
            "signature_type": "Function",
            "target": {
                "file": "drivers/virtio/virtio_ring.c",
                "function": "detach_buf_packed"
            },
            "id": "CVE-2024-27066-92284701",
            "digest": {
                "length": 942.0,
                "function_hash": "261567477688692479740052905378930828421"
            },
            "deprecated": false,
            "source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@51bacd9d29bf98c3ebc65e4a0477bb86306b4140"
        },
        {
            "signature_version": "v1",
            "signature_type": "Function",
            "target": {
                "file": "drivers/virtio/virtio_ring.c",
                "function": "detach_buf_packed"
            },
            "id": "CVE-2024-27066-9b149c63",
            "digest": {
                "length": 942.0,
                "function_hash": "261567477688692479740052905378930828421"
            },
            "deprecated": false,
            "source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@d5c0ed17fea60cca9bc3bf1278b49ba79242bbcd"
        },
        {
            "signature_version": "v1",
            "signature_type": "Line",
            "target": {
                "file": "drivers/virtio/virtio_ring.c"
            },
            "id": "CVE-2024-27066-bd13a0df",
            "digest": {
                "line_hashes": [
                    "339596633029749655932058025881675999130",
                    "17203958994190351722313077617563855415",
                    "285583612751536254068160691787444730861",
                    "334745877579348348367438895779716618478",
                    "268378609346611359885301091376258517436",
                    "277441548818140065125347502481147972544",
                    "223944282765193062518697613519352444945",
                    "150474774105695447911702629202024039428",
                    "329688931314770791425706417645133332093",
                    "329785554173428548153484240107863021655",
                    "263788721602803074223913631750859477605",
                    "52045156199426326465155419819530653745"
                ],
                "threshold": 0.9
            },
            "deprecated": false,
            "source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@e142169aca5546ae6619c39a575cda8105362100"
        },
        {
            "signature_version": "v1",
            "signature_type": "Function",
            "target": {
                "file": "drivers/virtio/virtio_ring.c",
                "function": "virtqueue_add_indirect_packed"
            },
            "id": "CVE-2024-27066-d4bbafd7",
            "digest": {
                "length": 2684.0,
                "function_hash": "71829946791448367090746279378187527795"
            },
            "deprecated": false,
            "source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@e142169aca5546ae6619c39a575cda8105362100"
        }
    ]
}

Linux / Kernel

Package

Name
Kernel

Affected ranges

Type
ECOSYSTEM
Events
Introduced
6.6.0
Fixed
6.6.23
Type
ECOSYSTEM
Events
Introduced
6.7.0
Fixed
6.7.11
Type
ECOSYSTEM
Events
Introduced
6.8.0
Fixed
6.8.2