{"id":"CVE-2026-31590","aliases":["CVE-2026-31590"],"related":[],"kind":"vulnerability","state":"published","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:\n\nKVM: SEV: Drop WARN on large size for KVM_MEMORY_ENCRYPT_REG_REGION\n\nDrop the WARN in sev_pin_memory() on npages overflowing an int, as the\nWARN is comically trivially to trigger from userspace, e.g. by doing:\n\n  struct kvm_enc_region range = {\n          .addr = 0,\n          .size = -1ul,\n  };\n\n  __vm_ioctl(vm, KVM_MEMORY_ENCRYPT_REG_REGION, &range);\n\nNote, the checks in sev_mem_enc_register_region() that presumably exist to\nverify the incoming address+size are completely worthless, as both \"addr\"\nand \"size\" are u64s and SEV is 64-bit only, i.e. they _can't_ be greater\nthan ULONG_MAX.  That wart will be cleaned up in the near future.\n\n\tif (range->addr > ULONG_MAX || range->size > ULONG_MAX)\n\t\treturn -EINVAL;\n\nOpportunistically add a comment to explain why the code calculates the\nnumber of pages the \"hard\" way, e.g. instead of just shifting @ulen.","summarySource":"cvelist","descriptions":[{"lang":"en","text":"In the Linux kernel, the following vulnerability has been resolved:\n\nKVM: SEV: Drop WARN on large size for KVM_MEMORY_ENCRYPT_REG_REGION\n\nDrop the WARN in sev_pin_memory() on npages overflowing an int, as the\nWARN is comically trivially to trigger from userspace, e.g. by doing:\n\n  struct kvm_enc_region range = {\n          .addr = 0,\n          .size = -1ul,\n  };\n\n  __vm_ioctl(vm, KVM_MEMORY_ENCRYPT_REG_REGION, &range);\n\nNote, the checks in sev_mem_enc_register_region() that presumably exist to\nverify the incoming address+size are completely worthless, as both \"addr\"\nand \"size\" are u64s and SEV is 64-bit only, i.e. they _can't_ be greater\nthan ULONG_MAX.  That wart will be cleaned up in the near future.\n\n\tif (range->addr > ULONG_MAX || range->size > ULONG_MAX)\n\t\treturn -EINVAL;\n\nOpportunistically add a comment to explain why the code calculates the\nnumber of pages the \"hard\" way, e.g. instead of just shifting @ulen.","source":"cvelist"},{"lang":"es","text":"En el kernel de Linux, la siguiente vulnerabilidad ha sido resuelta:\n\nKVM: SEV: Eliminar WARN en tamaño grande para KVM_MEMORY_ENCRYPT_REG_REGION\n\nEliminar el WARN en sev_pin_memory() sobre npages desbordando un int, ya que el WARN es cómicamente trivial de activar desde el espacio de usuario, p. ej., haciendo:\n\n  struct kvm_enc_region range = {\n          .addr = 0,\n          .size = -1ul,\n  };\n\n  __vm_ioctl(vm, KVM_MEMORY_ENCRYPT_REG_REGION, ref:range);\n\nTenga en cuenta que las comprobaciones en sev_mem_enc_register_region() que presumiblemente existen para verificar la dirección+tamaño entrantes son completamente inútiles, ya que tanto ’addr’ como ’size’ son u64 y SEV es solo de 64 bits, es decir, _no pueden_ ser mayores que ULONG_MAX. Esa imperfección será corregida en un futuro cercano.\n\n\tif (range  ->  addr > ULONG_MAX || range  ->  size > ULONG_MAX)\n\t\treturn -EINVAL;\n\nSe añade oportunistamente un comentario para explicar por qué el código calcula el número de páginas de la manera ’difícil’, p. ej., en lugar de simplemente desplazar @ulen.","source":"nvd"}],"published":"2026-04-24T14:42:17.629Z","modified":"2026-11-11T23:10:00.263Z","severity":{"scorer":"NVD","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H","score":5.5,"rating":"MEDIUM"},"severities":[{"scorer":"NVD","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H","score":5.5,"rating":"MEDIUM"}],"cwes":[],"affected":[{"ranges":[{"type":"git","introduced":"78824fabc72e5e37d51e6e567fde70a4fc41a6d7","fixed":"6a8e3c82122737529b25ef2a048fbcc569d8c055","status":"affected"},{"type":"git","introduced":"78824fabc72e5e37d51e6e567fde70a4fc41a6d7","fixed":"a703933bcfa5cc76ca10e2048464600e74136099","status":"affected"},{"type":"git","introduced":"78824fabc72e5e37d51e6e567fde70a4fc41a6d7","fixed":"abcd43ff579abd0a654bb4636086e78819dd5f4c","status":"affected"},{"type":"git","introduced":"78824fabc72e5e37d51e6e567fde70a4fc41a6d7","fixed":"b670833749ffd8681361db2bb047c6f2e3075f3a","status":"affected"},{"type":"git","introduced":"78824fabc72e5e37d51e6e567fde70a4fc41a6d7","fixed":"ab423e5892826202a660b5ac85d1125b0e8301a5","status":"affected"},{"type":"git","introduced":"78824fabc72e5e37d51e6e567fde70a4fc41a6d7","fixed":"28cc13ca20431b127d42d84ba10898d03e2c8267","status":"affected"},{"type":"git","introduced":"78824fabc72e5e37d51e6e567fde70a4fc41a6d7","fixed":"c29ff288a2d97a6f4640a498a367cf0eb91312eb","status":"affected"},{"type":"git","introduced":"78824fabc72e5e37d51e6e567fde70a4fc41a6d7","fixed":"1cba4dcd795daf6d257122779fb6a349edf03914","status":"affected"},{"type":"git","introduced":"78824fabc72e5e37d51e6e567fde70a4fc41a6d7","fixed":"8acffeef5ef720c35e513e322ab08e32683f32f2","status":"affected"}],"vendor":"Linux","product":"Linux","repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","source":"cvelist"},{"ranges":[{"version":"5.9","status":"affected"},{"type":"semver","introduced":"0","fixed":"5.9","status":"unaffected"},{"type":"semver","introduced":"5.10.258","lastAffected":"5.10.*","status":"unaffected"},{"type":"semver","introduced":"5.15.209","lastAffected":"5.15.*","status":"unaffected"},{"type":"semver","introduced":"6.1.175","lastAffected":"6.1.*","status":"unaffected"},{"type":"semver","introduced":"6.6.136","lastAffected":"6.6.*","status":"unaffected"},{"type":"semver","introduced":"6.12.83","lastAffected":"6.12.*","status":"unaffected"},{"type":"semver","introduced":"6.18.24","lastAffected":"6.18.*","status":"unaffected"},{"type":"semver","introduced":"6.19.14","lastAffected":"6.19.*","status":"unaffected"},{"type":"semver","introduced":"7.0.1","lastAffected":"7.0.*","status":"unaffected"},{"type":"original_commit_for_fix","introduced":"7.1","lastAffected":"*","status":"unaffected"}],"vendor":"Linux","product":"Linux","repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","source":"cvelist"},{"ranges":[{"status":"affected","introduced":"5.9","fixed":"6.6.136"},{"status":"affected","introduced":"6.7","fixed":"6.12.83"},{"status":"affected","introduced":"6.13","fixed":"6.18.24"},{"status":"affected","introduced":"6.19","fixed":"6.19.14"},{"status":"affected","introduced":"7.0","fixed":"7.0.1"}],"vendor":"linux","product":"linux_kernel","cpe":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","source":"nvd"}],"references":[{"url":"https://git.kernel.org/stable/c/6a8e3c82122737529b25ef2a048fbcc569d8c055","tags":[],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/a703933bcfa5cc76ca10e2048464600e74136099","tags":[],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/abcd43ff579abd0a654bb4636086e78819dd5f4c","tags":[],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/b670833749ffd8681361db2bb047c6f2e3075f3a","tags":["patch"],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/ab423e5892826202a660b5ac85d1125b0e8301a5","tags":["patch"],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/28cc13ca20431b127d42d84ba10898d03e2c8267","tags":["patch"],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/c29ff288a2d97a6f4640a498a367cf0eb91312eb","tags":["patch"],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/1cba4dcd795daf6d257122779fb6a349edf03914","tags":["patch"],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/8acffeef5ef720c35e513e322ab08e32683f32f2","tags":["patch"],"sources":["cvelist","nvd"]}],"credits":[],"assigner":"Linux","ssvc":{"scorer":"CISA-ADP","exploitation":"none","automatable":"no","technicalImpact":"partial","date":"2026-11-06T15:22:14.418Z"},"sources":[{"source":"cvelist","name":"CVE List","id":"CVE-2026-31590","url":"https://www.cve.org/CVERecord?id=CVE-2026-31590","licence":"CVE Terms of Use","modified":"2026-11-06T15:32:18.788Z"},{"source":"nvd","name":"NVD","id":"CVE-2026-31590","url":"https://nvd.nist.gov/vuln/detail/CVE-2026-31590","licence":"Public domain","modified":"2026-11-11T23:10:00.263Z"}],"updatedAt":"2026-11-25T22:59:19.500Z","epss":{"score":0.00131,"percentile":0.02885,"date":"2026-12-01T12:00:22.000Z"}}