{ "dataType": "CVE_RECORD", "dataVersion": "5.2", "cveMetadata": { "cveId": "CVE-2025-21687", "assignerOrgId": "416baaa9-dc9f-4396-8d5f-8c081fb06d67", "state": "PUBLISHED", "assignerShortName": "Linux", "dateReserved": "2024-12-29T08:45:45.741Z", "datePublished": "2025-02-10T15:58:43.944Z", "dateUpdated": "2026-08-05T11:53:37.668Z" }, "containers": { "cna": { "providerMetadata": { "orgId": "416baaa9-dc9f-4396-8d5f-8c081fb06d67", "shortName": "Linux", "dateUpdated": "2026-08-05T11:53:37.668Z" }, "descriptions": [ { "lang": "en", "value": "In the Linux kernel, the following vulnerability has been resolved:\n\nvfio/platform: check the bounds of read/write syscalls\n\ncount and offset are passed from user space and not checked, only\noffset is capped to 40 bits, which can be used to read/write out of\nbounds of the device." } ], "metrics": [ { "cvssV3_1": { "version": "3.1", "vectorString": "CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H", "baseScore": 7.8, "baseSeverity": "HIGH" }, "scenarios": [ { "lang": "en", "value": "AV:L - The vulnerability is triggered via read()/write()/pread()/pwrite() syscalls on a VFIO device file descriptor (/dev/vfio/ or /dev/vfio/devices/vfioN), requiring local access to the system. There is no network-facing path to vfio_platform_read/write.\nAC:L - The attacker directly and deterministically controls both the file offset (40 bits, unchecked against reg->size) and the byte count, so a single pwrite()/pread() reliably performs an out-of-bounds MMIO access at any chosen offset with no race, timing, or uncontrolled precondition.\nPR:L - Only an open fd on the VFIO device is needed; the IOMMU-backed VFIO path enforces no capability check (CAP_SYS_RAWIO is required only for the no-iommu mode), and VFIO is expressly designed to grant unprivileged users device access via file permissions. Handing the device node to a non-root user (QEMU, userspace drivers) is the normal deployment.\nUI:N - The attacker performs the entire attack by issuing syscalls on a descriptor it opens itself; no victim action, configuration change, or interaction with another user is required.\nS:U - The vulnerable component and the impacted component are both the Linux kernel — the out-of-bounds accesses land in kernel virtual address space managed by the same security authority. This is standard local kernel compromise, not a guest-to-host or IOMMU-crossing escape.\nC:H - ioread8/16/32 at an attacker-chosen offset up to 1 TiB past the ioremapped device window, with the value copied directly to userspace via copy_to_user, yields arbitrary kernel memory disclosure across the entire vmalloc/ioremap range (kernel stacks, vmalloc'd structures, other devices' MMIO).\nI:H - iowrite8/16/32 writes fully attacker-controlled data at an attacker-chosen kernel virtual address in the same 1 TiB window, giving an arbitrary kernel write that can corrupt VMAP_STACK kernel stacks, BPF JIT pages, and other drivers' registers (including SMMU control registers) — a direct path to code execution and privilege escalation.\nA:H - Accessing an unmapped virtual address in the out-of-bounds window causes a kernel data abort/oops or panic, and writes into unrelated devices' MMIO registers can wedge or hang the machine; this is trivially and repeatedly triggerable." } ] } ], "affected": [ { "product": "Linux", "vendor": "Linux", "defaultStatus": "unaffected", "repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git", "programFiles": [ "drivers/vfio/platform/vfio_platform_common.c" ], "versions": [ { "version": "6e3f264560099869f68830cb14b3b3e71e5ac76a", "lessThan": "f21636f24b6786c8b13f1af4319fa75ffcf17f38", "status": "affected", "versionType": "git" }, { "version": "6e3f264560099869f68830cb14b3b3e71e5ac76a", "lessThan": "9377cdc118cf327248f1a9dde7b87de067681dc9", "status": "affected", "versionType": "git" }, { "version": "6e3f264560099869f68830cb14b3b3e71e5ac76a", "lessThan": "d19a8650fd3d7aed8d1af1d9a77f979a8430eba1", "status": "affected", "versionType": "git" }, { "version": "6e3f264560099869f68830cb14b3b3e71e5ac76a", "lessThan": "ed81d82bb6e9df3a137f2c343ed689e6c68268ef", "status": "affected", "versionType": "git" }, { "version": "6e3f264560099869f68830cb14b3b3e71e5ac76a", "lessThan": "92340e6c5122d823ad064984ef7513eba9204048", "status": "affected", "versionType": "git" }, { "version": "6e3f264560099869f68830cb14b3b3e71e5ac76a", "lessThan": "f65ce06387f8c1fb54bd59e18a8428248ec68eaf", "status": "affected", "versionType": "git" }, { "version": "6e3f264560099869f68830cb14b3b3e71e5ac76a", "lessThan": "6bcb8a5b70b80143db9bf12dfa7d53636f824d53", "status": "affected", "versionType": "git" }, { "version": "6e3f264560099869f68830cb14b3b3e71e5ac76a", "lessThan": "1485932496a1b025235af8aa1e21988d6b7ccd54", "status": "affected", "versionType": "git" }, { "version": "6e3f264560099869f68830cb14b3b3e71e5ac76a", "lessThan": "c981c32c38af80737a2fedc16e270546d139ccdd", "status": "affected", "versionType": "git" }, { "version": "6e3f264560099869f68830cb14b3b3e71e5ac76a", "lessThan": "a20fcaa230f7472456d12cf761ed13938e320ac3", "status": "affected", "versionType": "git" }, { "version": "6e3f264560099869f68830cb14b3b3e71e5ac76a", "lessThan": "665cfd1083866f87301bbd232cb8ba48dcf4acce", "status": "affected", "versionType": "git" }, { "version": "6e3f264560099869f68830cb14b3b3e71e5ac76a", "lessThan": "ce9ff21ea89d191e477a02ad7eabf4f996b80a69", "status": "affected", "versionType": "git" } ] }, { "product": "Linux", "vendor": "Linux", "defaultStatus": "affected", "repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git", "programFiles": [ "drivers/vfio/platform/vfio_platform_common.c" ], "versions": [ { "version": "4.1", "status": "affected" }, { "version": "0", "lessThan": "4.1", "status": "unaffected", "versionType": "semver" }, { "version": "5.4.290", "lessThanOrEqual": "5.4.*", "status": "unaffected", "versionType": "semver" }, { "version": "5.4.291", "lessThanOrEqual": "5.4.*", "status": "unaffected", "versionType": "semver" }, { "version": "5.10.234", "lessThanOrEqual": "5.10.*", "status": "unaffected", "versionType": "semver" }, { "version": "5.10.235", "lessThanOrEqual": "5.10.*", "status": "unaffected", "versionType": "semver" }, { "version": "5.15.178", "lessThanOrEqual": "5.15.*", "status": "unaffected", "versionType": "semver" }, { "version": "5.15.179", "lessThanOrEqual": "5.15.*", "status": "unaffected", "versionType": "semver" }, { "version": "6.1.128", "lessThanOrEqual": "6.1.*", "status": "unaffected", "versionType": "semver" }, { "version": "6.1.129", "lessThanOrEqual": "6.1.*", "status": "unaffected", "versionType": "semver" }, { "version": "6.6.75", "lessThanOrEqual": "6.6.*", "status": "unaffected", "versionType": "semver" }, { "version": "6.12.12", "lessThanOrEqual": "6.12.*", "status": "unaffected", "versionType": "semver" }, { "version": "6.13.1", "lessThanOrEqual": "6.13.*", "status": "unaffected", "versionType": "semver" }, { "version": "6.14", "lessThanOrEqual": "*", "status": "unaffected", "versionType": "original_commit_for_fix" } ] } ], "cpeApplicability": [ { "nodes": [ { "operator": "OR", "negate": false, "cpeMatch": [ { "vulnerable": true, "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*", "versionStartIncluding": "4.1", "versionEndExcluding": "5.4.290" }, { "vulnerable": true, "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*", "versionStartIncluding": "4.1", "versionEndExcluding": "5.4.291" }, { "vulnerable": true, "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*", "versionStartIncluding": "4.1", "versionEndExcluding": "5.10.234" }, { "vulnerable": true, "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*", "versionStartIncluding": "4.1", "versionEndExcluding": "5.10.235" }, { "vulnerable": true, "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*", "versionStartIncluding": "4.1", "versionEndExcluding": "5.15.178" }, { "vulnerable": true, "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*", "versionStartIncluding": "4.1", "versionEndExcluding": "5.15.179" }, { "vulnerable": true, "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*", "versionStartIncluding": "4.1", "versionEndExcluding": "6.1.128" }, { "vulnerable": true, "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*", "versionStartIncluding": "4.1", "versionEndExcluding": "6.1.129" }, { "vulnerable": true, "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*", "versionStartIncluding": "4.1", "versionEndExcluding": "6.6.75" }, { "vulnerable": true, "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*", "versionStartIncluding": "4.1", "versionEndExcluding": "6.12.12" }, { "vulnerable": true, "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*", "versionStartIncluding": "4.1", "versionEndExcluding": "6.13.1" }, { "vulnerable": true, "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*", "versionStartIncluding": "4.1", "versionEndExcluding": "6.14" } ] } ] } ], "references": [ { "url": "https://git.kernel.org/stable/c/f21636f24b6786c8b13f1af4319fa75ffcf17f38" }, { "url": "https://git.kernel.org/stable/c/9377cdc118cf327248f1a9dde7b87de067681dc9" }, { "url": "https://git.kernel.org/stable/c/d19a8650fd3d7aed8d1af1d9a77f979a8430eba1" }, { "url": "https://git.kernel.org/stable/c/ed81d82bb6e9df3a137f2c343ed689e6c68268ef" }, { "url": "https://git.kernel.org/stable/c/92340e6c5122d823ad064984ef7513eba9204048" }, { "url": "https://git.kernel.org/stable/c/f65ce06387f8c1fb54bd59e18a8428248ec68eaf" }, { "url": "https://git.kernel.org/stable/c/6bcb8a5b70b80143db9bf12dfa7d53636f824d53" }, { "url": "https://git.kernel.org/stable/c/1485932496a1b025235af8aa1e21988d6b7ccd54" }, { "url": "https://git.kernel.org/stable/c/c981c32c38af80737a2fedc16e270546d139ccdd" }, { "url": "https://git.kernel.org/stable/c/a20fcaa230f7472456d12cf761ed13938e320ac3" }, { "url": "https://git.kernel.org/stable/c/665cfd1083866f87301bbd232cb8ba48dcf4acce" }, { "url": "https://git.kernel.org/stable/c/ce9ff21ea89d191e477a02ad7eabf4f996b80a69" } ], "title": "vfio/platform: check the bounds of read/write syscalls", "x_generator": { "engine": "bippy-1.2.0" } }, "adp": [ { "title": "CVE Program Container", "references": [ { "url": "https://lists.debian.org/debian-lts-announce/2025/03/msg00001.html" }, { "url": "https://lists.debian.org/debian-lts-announce/2025/03/msg00002.html" } ], "providerMetadata": { "orgId": "af854a3a-2127-422b-91ae-364da2661108", "shortName": "CVE", "dateUpdated": "2025-11-03T20:59:05.163Z" } } ] } }