{
    "dataType": "CVE_RECORD",
    "dataVersion": "5.2",
    "cveMetadata": {
        "cveId": "CVE-2025-40266",
        "assignerOrgId": "416baaa9-dc9f-4396-8d5f-8c081fb06d67",
        "state": "PUBLISHED",
        "assignerShortName": "Linux",
        "dateReserved": "2025-04-16T07:20:57.183Z",
        "datePublished": "2025-12-04T16:08:25.392Z",
        "dateUpdated": "2026-08-05T12:09:01.305Z"
    },
    "containers": {
        "cna": {
            "providerMetadata": {
                "orgId": "416baaa9-dc9f-4396-8d5f-8c081fb06d67",
                "shortName": "Linux",
                "dateUpdated": "2026-08-05T12:09:01.305Z"
            },
            "descriptions": [
                {
                    "lang": "en",
                    "value": "In the Linux kernel, the following vulnerability has been resolved:\n\nKVM: arm64: Check the untrusted offset in FF-A memory share\n\nVerify the offset to prevent OOB access in the hypervisor\nFF-A buffer in case an untrusted large enough value\n[U32_MAX - sizeof(struct ffa_composite_mem_region) + 1, U32_MAX]\nis set from the host kernel."
                }
            ],
            "metrics": [
                {
                    "cvssV3_1": {
                        "version": "3.1",
                        "vectorString": "CVSS:3.1/AV:L/AC:L/PR:H/UI:N/S:C/C:H/I:H/A:H",
                        "baseScore": 8.2,
                        "baseSeverity": "HIGH"
                    },
                    "scenarios": [
                        {
                            "lang": "en",
                            "value": "AV:L - The vulnerable code is the EL2 FF-A proxy, reached only via an SMC trapped from host EL1 with a host-supplied TX mailbox; this requires local execution on the machine, with no network or physical vector.\nAC:L - The host kernel fully controls the SMC registers (len/fraglen) and every byte of the TX buffer including composite_off, so the condition is set deterministically with no race or memory-layout dependency.\nPR:H - SMC is undefined at EL0 and no userspace FF-A interface exists, so the attacker must already execute code in the host kernel at EL1 — real root plus kernel-level access, not reachable through user namespaces.\nUI:N - The attacker issues the FFA_MEM_SHARE/FFA_MEM_LEND SMC itself; no victim action or interaction of any kind is needed.\nS:C - The vulnerable component is the pKVM EL2 hypervisor, a distinct security authority whose purpose is isolating protected guest VMs and the secure world from the untrusted host; corrupting it impacts resources beyond the host kernel's own authority.\nC:H - The out-of-bounds read extends far past the single-page hyp TX buffer with attacker-chosen displacement and unbounded length, and the OOB contents drive observable host-page sharing decisions, forming a disclosure oracle over hypervisor-private memory.\nI:H - Out-of-bounds constituent data is passed to __pkvm_host_share_ffa(), corrupting the hypervisor's page-ownership state and defeating the FF-A filter that prevents host-mediated exposure of protected guest memory to the secure world.\nA:H - Walking hundreds of millions of constituents past a one-page EL2 mapping faults in the hypervisor, causing hyp_panic and taking down the host and every guest on the system."
                        }
                    ]
                }
            ],
            "affected": [
                {
                    "product": "Linux",
                    "vendor": "Linux",
                    "defaultStatus": "unaffected",
                    "repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git",
                    "programFiles": [
                        "arch/arm64/kvm/hyp/nvhe/ffa.c"
                    ],
                    "versions": [
                        {
                            "version": "6211753fdfd05af9e08f54c8d0ba3ee516034878",
                            "lessThan": "fc3139d9f4c1fe1c7d5f25f99676bd8e9c6a1041",
                            "status": "affected",
                            "versionType": "git"
                        },
                        {
                            "version": "6211753fdfd05af9e08f54c8d0ba3ee516034878",
                            "lessThan": "bc1909ef38788f2ee3d8011d70bf029948433051",
                            "status": "affected",
                            "versionType": "git"
                        },
                        {
                            "version": "6211753fdfd05af9e08f54c8d0ba3ee516034878",
                            "lessThan": "f9f1aed6c8a3427900da3121e1868124854569c3",
                            "status": "affected",
                            "versionType": "git"
                        },
                        {
                            "version": "6211753fdfd05af9e08f54c8d0ba3ee516034878",
                            "lessThan": "103e17aac09cdd358133f9e00998b75d6c1f1518",
                            "status": "affected",
                            "versionType": "git"
                        }
                    ]
                },
                {
                    "product": "Linux",
                    "vendor": "Linux",
                    "defaultStatus": "affected",
                    "repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git",
                    "programFiles": [
                        "arch/arm64/kvm/hyp/nvhe/ffa.c"
                    ],
                    "versions": [
                        {
                            "version": "3.11",
                            "status": "affected"
                        },
                        {
                            "version": "0",
                            "lessThan": "3.11",
                            "status": "unaffected",
                            "versionType": "semver"
                        },
                        {
                            "version": "6.6.118",
                            "lessThanOrEqual": "6.6.*",
                            "status": "unaffected",
                            "versionType": "semver"
                        },
                        {
                            "version": "6.12.60",
                            "lessThanOrEqual": "6.12.*",
                            "status": "unaffected",
                            "versionType": "semver"
                        },
                        {
                            "version": "6.17.10",
                            "lessThanOrEqual": "6.17.*",
                            "status": "unaffected",
                            "versionType": "semver"
                        },
                        {
                            "version": "6.18",
                            "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": "3.11",
                                    "versionEndExcluding": "6.6.118"
                                },
                                {
                                    "vulnerable": true,
                                    "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
                                    "versionStartIncluding": "3.11",
                                    "versionEndExcluding": "6.12.60"
                                },
                                {
                                    "vulnerable": true,
                                    "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
                                    "versionStartIncluding": "3.11",
                                    "versionEndExcluding": "6.17.10"
                                },
                                {
                                    "vulnerable": true,
                                    "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
                                    "versionStartIncluding": "3.11",
                                    "versionEndExcluding": "6.18"
                                }
                            ]
                        }
                    ]
                }
            ],
            "references": [
                {
                    "url": "https://git.kernel.org/stable/c/fc3139d9f4c1fe1c7d5f25f99676bd8e9c6a1041"
                },
                {
                    "url": "https://git.kernel.org/stable/c/bc1909ef38788f2ee3d8011d70bf029948433051"
                },
                {
                    "url": "https://git.kernel.org/stable/c/f9f1aed6c8a3427900da3121e1868124854569c3"
                },
                {
                    "url": "https://git.kernel.org/stable/c/103e17aac09cdd358133f9e00998b75d6c1f1518"
                }
            ],
            "title": "KVM: arm64: Check the untrusted offset in FF-A memory share",
            "x_generator": {
                "engine": "bippy-1.2.0"
            }
        },
        "adp": [
            {
                "metrics": [
                    {
                        "other": {
                            "type": "ssvc",
                            "content": {
                                "timestamp": "2026-06-16T19:59:35.285244Z",
                                "id": "CVE-2025-40266",
                                "options": [
                                    {
                                        "Exploitation": "none"
                                    },
                                    {
                                        "Automatable": "no"
                                    },
                                    {
                                        "Technical Impact": "partial"
                                    }
                                ],
                                "role": "CISA Coordinator",
                                "version": "2.0.3"
                            }
                        }
                    }
                ],
                "title": "CISA ADP Vulnrichment",
                "providerMetadata": {
                    "orgId": "134c704f-9b21-4f2e-91b3-4a467353bcc0",
                    "shortName": "CISA-ADP",
                    "dateUpdated": "2026-06-16T19:59:44.078Z"
                }
            }
        ]
    }
}