{"id":"CVE-2026-43348","aliases":["CVE-2026-43348"],"related":[],"kind":"vulnerability","state":"published","title":"mshv_vtl: Fix vmemmap_shift exceeding MAX_FOLIO_ORDER","summary":"In the Linux kernel, the following vulnerability has been resolved:\n\nmshv_vtl: Fix vmemmap_shift exceeding MAX_FOLIO_ORDER\n\nWhen registering VTL0 memory via MSHV_ADD_VTL0_MEMORY, the kernel\ncomputes pgmap->vmemmap_shift as the number of trailing zeros in the\nOR of start_pfn and last_pfn, intending to use the largest compound\npage order both endpoints are aligned to.\n\nHowever, this value is not clamped to MAX_FOLIO_ORDER, so a\nsufficiently aligned range (e.g. physical range\n[0x800000000000, 0x800080000000), corresponding to start_pfn=0x800000000\nwith 35 trailing zeros) can produce a shift larger than what\nmemremap_pages() accepts, triggering a WARN and returning -EINVAL:\n\n  WARNING: ... memremap_pages+0x512/0x650\n  requested folio size unsupported\n\nThe MAX_FOLIO_ORDER check was added by\ncommit 646b67d57589 (\"mm/memremap: reject unreasonable folio/compound\npage sizes in memremap_pages()\").\n\nFix this by clamping vmemmap_shift to MAX_FOLIO_ORDER so we always\nrequest the largest order the kernel supports, in those cases, rather\nthan an out-of-range value.\n\nAlso fix the error path to propagate the actual error code from\ndevm_memremap_pages() instead of hard-coding -EFAULT, which was\nmasking the real -EINVAL return.","summarySource":"cvelist","descriptions":[{"lang":"en","text":"In the Linux kernel, the following vulnerability has been resolved:\n\nmshv_vtl: Fix vmemmap_shift exceeding MAX_FOLIO_ORDER\n\nWhen registering VTL0 memory via MSHV_ADD_VTL0_MEMORY, the kernel\ncomputes pgmap->vmemmap_shift as the number of trailing zeros in the\nOR of start_pfn and last_pfn, intending to use the largest compound\npage order both endpoints are aligned to.\n\nHowever, this value is not clamped to MAX_FOLIO_ORDER, so a\nsufficiently aligned range (e.g. physical range\n[0x800000000000, 0x800080000000), corresponding to start_pfn=0x800000000\nwith 35 trailing zeros) can produce a shift larger than what\nmemremap_pages() accepts, triggering a WARN and returning -EINVAL:\n\n  WARNING: ... memremap_pages+0x512/0x650\n  requested folio size unsupported\n\nThe MAX_FOLIO_ORDER check was added by\ncommit 646b67d57589 (\"mm/memremap: reject unreasonable folio/compound\npage sizes in memremap_pages()\").\n\nFix this by clamping vmemmap_shift to MAX_FOLIO_ORDER so we always\nrequest the largest order the kernel supports, in those cases, rather\nthan an out-of-range value.\n\nAlso fix the error path to propagate the actual error code from\ndevm_memremap_pages() instead of hard-coding -EFAULT, which was\nmasking the real -EINVAL return.","source":"cvelist"},{"lang":"es","text":"En el kernel de Linux, la siguiente vulnerabilidad ha sido resuelta:\n\nmshv_vtl: Solución para vmemmap_shift excediendo MAX_FOLIO_ORDER\n\nAl registrar memoria VTL0 a través de MSHV_ADD_VTL0_MEMORY, el kernel calcula pgmap  ->  vmemmap_shift como el número de ceros finales en el OR de start_pfn y last_pfn, con la intención de usar el orden de página compuesto más grande al que ambos puntos finales están alineados.\n\nSin embargo, este valor no está limitado a MAX_FOLIO_ORDER, por lo que un rango suficientemente alineado (por ejemplo, rango físico [0x 800000000000, 0x 800080000000), correspondiente a start_pfn=0x 800000000 con 35 ceros finales) puede producir un desplazamiento mayor de lo que acepta memremap_pages(), lo que activa una ADVERTENCIA y devuelve -EINVAL:\n\n  ADVERTENCIA: ... memremap_pages+0x512/0x650\n  tamaño de folio solicitado no compatible\n\nLa verificación de MAX_FOLIO_ORDER fue añadida por el commit 646b67d57589 (’mm/memremap: rechazar tamaños de folio/página compuesta irrazonables en memremap_pages()’).\n\nSolucione esto limitando vmemmap_shift a MAX_FOLIO_ORDER para que siempre solicitemos el orden más grande que el kernel soporta, en esos casos, en lugar de un valor fuera de rango.\n\nTambién corrija la ruta de error para propagar el código de error real de devm_memremap_pages() en lugar de codificar -EFAULT, lo que estaba enmascarando el retorno real de -EINVAL.","source":"nvd"}],"published":"2026-05-08T13:41:51.909Z","modified":"2026-11-11T20:10:00.273Z","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":"7bfe3b8ea6e30437e01fcb8e4f56ef6e4d986d0f","fixed":"a142ca4b6481e71498712800b20e0c0fcf02843b","status":"affected"},{"type":"git","introduced":"7bfe3b8ea6e30437e01fcb8e4f56ef6e4d986d0f","fixed":"404cd6bffe17e25e0f94ed2775ffdd6cd10ac3fd","status":"affected"}],"vendor":"Linux","product":"Linux","repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","source":"cvelist"},{"ranges":[{"version":"6.19","status":"affected"},{"type":"semver","introduced":"0","fixed":"6.19","status":"unaffected"},{"type":"semver","introduced":"7.0.2","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":"6.19","fixed":"7.0.2"}],"vendor":"linux","product":"linux_kernel","cpe":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","source":"nvd"}],"references":[{"url":"https://git.kernel.org/stable/c/a142ca4b6481e71498712800b20e0c0fcf02843b","tags":["patch"],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/404cd6bffe17e25e0f94ed2775ffdd6cd10ac3fd","tags":["patch"],"sources":["cvelist","nvd"]}],"credits":[],"assigner":"Linux","sources":[{"source":"cvelist","name":"CVE List","id":"CVE-2026-43348","url":"https://www.cve.org/CVERecord?id=CVE-2026-43348","licence":"CVE Terms of Use","modified":"2026-06-14T17:44:59.767Z"},{"source":"nvd","name":"NVD","id":"CVE-2026-43348","url":"https://nvd.nist.gov/vuln/detail/CVE-2026-43348","licence":"Public domain","modified":"2026-11-11T20:10:00.273Z"}],"updatedAt":"2026-11-25T22:59:21.007Z","epss":{"score":0.001,"percentile":0.00897,"date":"2026-12-02T12:00:21.000Z"}}