KVM: SEV: Drop WARN on large size for KVM_MEMORY_ENCRYPT_REG_REGION
In the Linux kernel, the following vulnerability has been resolved: KVM: SEV: Drop WARN on large size for KVM_MEMORY_ENCRYPT_REG_REGION Drop the WARN in sev_pin_memory() on npages overflowing an int, as the WARN is comically trivially to trigger from userspace, e.g. by doing: struct kvm_enc_region range = { .addr = 0, .size = -1ul, }; __vm_ioctl(vm, KVM_MEMORY_ENCRYPT_REG_REGION, &range); Note, the checks in sev_mem_enc_register_region() that presumably exist to verify the incoming address+size are completely worthless, as both "addr" and "size" are u64s and SEV is 64-bit only, i.e. they _can't_ be greater than ULONG_MAX. That wart will be cleaned up in the near future. if (range->addr > ULONG_MAX || range->size > ULONG_MAX) return -EINVAL; Opportunistically add a comment to explain why the code calculates the number of pages the "hard" way, e.g. instead of just shifting @ulen.
- Products
- Kernel
- Affected versions
- Not specified
- Fixed versions
- 5.10.258, 5.15.209, 6.1.175, 6.12.83, 6.18.24, 6.19.14, 6.6.136, 7.0.1
- CVEs
- CVE-2026-31590
- Confirmed fixed CVEs
- Not specified
- Updated in this feed
- 8 Nov 2026, 01:59 UTC · Revision 1
Source evidence
KVM: SEV: Drop WARN on large size for KVM_MEMORY_ENCRYPT_REG_REGION
core-osv · Original sourcePublished 24 Apr 2026, 14:42 UTC
In the Linux kernel, the following vulnerability has been resolved: KVM: SEV: Drop WARN on large size for KVM_MEMORY_ENCRYPT_REG_REGION Drop the WARN in sev_pin_memory() on npages overflowing an int, as the WARN is comically trivially to trigger from userspace, e.g. by doing: struct kvm_enc_region range = { .addr = 0, .size = -1ul, }; __vm_ioctl(vm, KVM_MEMORY_ENCRYPT_REG_REGION, &range); Note, the checks in sev_mem_enc_register_region() that presumably exist to verify the incoming address+size are completely worthless, as both "addr" and "size" are u64s and SEV is 64-bit only, i.e. they _can't_ be greater than ULONG_MAX. That wart will be cleaned up in the near future. if (range->addr > ULONG_MAX || range->size > ULONG_MAX) return -EINVAL; Opportunistically add a comment to explain why the code calculates the number of pages the "hard" way, e.g. instead of just shifting @ulen.
osv:CVE-2026-31590
Kernel
Fixed versions: 5.10.258, 5.15.209, 6.1.175, 6.6.136, 6.12.83, 6.18.24, 6.19.14, 7.0.1
Complete source record
{
"id": "b1e4864579bf7b6e82b5d9b4d87633a6103fd5969996f4125803b1e1b981a528",
"url": "https://osv.dev/vulnerability/CVE-2026-31590",
"method": "structured",
"payload": {
"kind": "advisory",
"title": "KVM: SEV: Drop WARN on large size for KVM_MEMORY_ENCRYPT_REG_REGION",
"summary": "In the Linux kernel, the following vulnerability has been resolved: KVM: SEV: Drop WARN on large size for KVM_MEMORY_ENCRYPT_REG_REGION Drop the WARN in sev_pin_memory() on npages overflowing an int, as the WARN is comically trivially to trigger from userspace, e.g. by doing: struct kvm_enc_region range = { .addr = 0, .size = -1ul, }; __vm_ioctl(vm, KVM_MEMORY_ENCRYPT_REG_REGION, &range); Note, the checks in sev_mem_enc_register_region() that presumably exist to verify the incoming address+size are completely worthless, as both \"addr\" and \"size\" are u64s and SEV is 64-bit only, i.e. they _can't_ be greater than ULONG_MAX. That wart will be cleaned up in the near future. if (range->addr > ULONG_MAX || range->size > ULONG_MAX) return -EINVAL; Opportunistically add a comment to explain why the code calculates the number of pages the \"hard\" way, e.g. instead of just shifting @ulen.",
"evidence": "osv:CVE-2026-31590",
"products": [
{
"name": {
"value": "Kernel",
"evidence": "/affected/1/package/name"
},
"prerequisites": [],
"fixed_versions": [
{
"value": "5.10.258",
"evidence": "/affected/1/ranges"
},
{
"value": "5.15.209",
"evidence": "/affected/1/ranges"
},
{
"value": "6.1.175",
"evidence": "/affected/1/ranges"
},
{
"value": "6.6.136",
"evidence": "/affected/1/ranges"
},
{
"value": "6.12.83",
"evidence": "/affected/1/ranges"
},
{
"value": "6.18.24",
"evidence": "/affected/1/ranges"
},
{
"value": "6.19.14",
"evidence": "/affected/1/ranges"
},
{
"value": "7.0.1",
"evidence": "/affected/1/ranges"
}
],
"affected_versions": []
}
],
"severity": "unknown",
"structured": {
"id": "CVE-2026-31590",
"aliases": [
"CVE-2026-31590"
],
"affected": [
{
"ranges": [
{
"repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git",
"type": "GIT",
"events": [
{
"introduced": "78824fabc72e5e37d51e6e567fde70a4fc41a6d7"
},
{
"fixed": "6a8e3c82122737529b25ef2a048fbcc569d8c055"
},
{
"fixed": "a703933bcfa5cc76ca10e2048464600e74136099"
},
{
"fixed": "abcd43ff579abd0a654bb4636086e78819dd5f4c"
},
{
"fixed": "b670833749ffd8681361db2bb047c6f2e3075f3a"
},
{
"fixed": "ab423e5892826202a660b5ac85d1125b0e8301a5"
},
{
"fixed": "28cc13ca20431b127d42d84ba10898d03e2c8267"
},
{
"fixed": "c29ff288a2d97a6f4640a498a367cf0eb91312eb"
},
{
"fixed": "1cba4dcd795daf6d257122779fb6a349edf03914"
},
{
"fixed": "8acffeef5ef720c35e513e322ab08e32683f32f2"
}
]
}
],
"database_specific": {
"source": "https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2026-31590.json"
}
},
{
"ranges": [
{
"type": "ECOSYSTEM",
"events": [
{
"introduced": "5.9.0"
},
{
"fixed": "5.10.258"
}
]
},
{
"type": "ECOSYSTEM",
"events": [
{
"introduced": "5.11.0"
},
{
"fixed": "5.15.209"
}
]
},
{
"type": "ECOSYSTEM",
"events": [
{
"introduced": "5.16.0"
},
{
"fixed": "6.1.175"
}
]
},
{
"type": "ECOSYSTEM",
"events": [
{
"introduced": "6.2.0"
},
{
"fixed": "6.6.136"
}
]
},
{
"type": "ECOSYSTEM",
"events": [
{
"introduced": "6.7.0"
},
{
"fixed": "6.12.83"
}
]
},
{
"type": "ECOSYSTEM",
"events": [
{
"introduced": "6.13.0"
},
{
"fixed": "6.18.24"
}
]
},
{
"type": "ECOSYSTEM",
"events": [
{
"introduced": "6.19.0"
},
{
"fixed": "6.19.14"
}
]
},
{
"type": "ECOSYSTEM",
"events": [
{
"introduced": "6.20.0"
},
{
"fixed": "7.0.1"
}
]
}
],
"package": {
"name": "Kernel",
"ecosystem": "Linux"
},
"database_specific": {
"source": "https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2026-31590.json"
}
}
],
"modified": "2026-10-28T02:30:52.757670605Z",
"provider": "osv",
"references": [
"https://git.kernel.org/stable/c/1cba4dcd795daf6d257122779fb6a349edf03914",
"https://git.kernel.org/stable/c/28cc13ca20431b127d42d84ba10898d03e2c8267",
"https://git.kernel.org/stable/c/6a8e3c82122737529b25ef2a048fbcc569d8c055",
"https://git.kernel.org/stable/c/8acffeef5ef720c35e513e322ab08e32683f32f2",
"https://git.kernel.org/stable/c/a703933bcfa5cc76ca10e2048464600e74136099",
"https://git.kernel.org/stable/c/ab423e5892826202a660b5ac85d1125b0e8301a5",
"https://git.kernel.org/stable/c/abcd43ff579abd0a654bb4636086e78819dd5f4c",
"https://git.kernel.org/stable/c/b670833749ffd8681361db2bb047c6f2e3075f3a",
"https://git.kernel.org/stable/c/c29ff288a2d97a6f4640a498a367cf0eb91312eb",
"https://github.com/CVEProject/cvelistV5/tree/main/cves/2026/31xxx/CVE-2026-31590.json",
"https://nvd.nist.gov/vuln/detail/CVE-2026-31590",
"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git"
],
"provider_metadata": {
"cna_assigner": "Linux",
"osv_generated_from": "https://github.com/CVEProject/cvelistV5/tree/main/cves/2026/31xxx/CVE-2026-31590.json"
}
},
"related_cves": [
{
"value": "CVE-2026-31590",
"evidence": "/id"
}
],
"security_relevant": true,
"severity_evidence": null
},
"source_id": "core-osv",
"document_id": 521574,
"published_at": "2026-04-24T14:42:17.629+00:00"
}