{"id":"CVE-2025-38681","aliases":["CVE-2025-38681"],"related":[],"kind":"vulnerability","state":"published","title":"mm/ptdump: take the memory hotplug lock inside ptdump_walk_pgd()","summary":"In the Linux kernel, the following vulnerability has been resolved:\n\nmm/ptdump: take the memory hotplug lock inside ptdump_walk_pgd()\n\nMemory hot remove unmaps and tears down various kernel page table regions\nas required.  The ptdump code can race with concurrent modifications of\nthe kernel page tables.  When leaf entries are modified concurrently, the\ndump code may log stale or inconsistent information for a VA range, but\nthis is otherwise not harmful.\n\nBut when intermediate levels of kernel page table are freed, the dump code\nwill continue to use memory that has been freed and potentially\nreallocated for another purpose.  In such cases, the ptdump code may\ndereference bogus addresses, leading to a number of potential problems.\n\nTo avoid the above mentioned race condition, platforms such as arm64,\nriscv and s390 take memory hotplug lock, while dumping kernel page table\nvia the sysfs interface /sys/kernel/debug/kernel_page_tables.\n\nSimilar race condition exists while checking for pages that might have\nbeen marked W+X via /sys/kernel/debug/kernel_page_tables/check_wx_pages\nwhich in turn calls ptdump_check_wx().  Instead of solving this race\ncondition again, let's just move the memory hotplug lock inside generic\nptdump_check_wx() which will benefit both the scenarios.\n\nDrop get_online_mems() and put_online_mems() combination from all existing\nplatform ptdump code paths.","summarySource":"cvelist","descriptions":[{"lang":"en","text":"In the Linux kernel, the following vulnerability has been resolved:\n\nmm/ptdump: take the memory hotplug lock inside ptdump_walk_pgd()\n\nMemory hot remove unmaps and tears down various kernel page table regions\nas required.  The ptdump code can race with concurrent modifications of\nthe kernel page tables.  When leaf entries are modified concurrently, the\ndump code may log stale or inconsistent information for a VA range, but\nthis is otherwise not harmful.\n\nBut when intermediate levels of kernel page table are freed, the dump code\nwill continue to use memory that has been freed and potentially\nreallocated for another purpose.  In such cases, the ptdump code may\ndereference bogus addresses, leading to a number of potential problems.\n\nTo avoid the above mentioned race condition, platforms such as arm64,\nriscv and s390 take memory hotplug lock, while dumping kernel page table\nvia the sysfs interface /sys/kernel/debug/kernel_page_tables.\n\nSimilar race condition exists while checking for pages that might have\nbeen marked W+X via /sys/kernel/debug/kernel_page_tables/check_wx_pages\nwhich in turn calls ptdump_check_wx().  Instead of solving this race\ncondition again, let's just move the memory hotplug lock inside generic\nptdump_check_wx() which will benefit both the scenarios.\n\nDrop get_online_mems() and put_online_mems() combination from all existing\nplatform ptdump code paths.","source":"cvelist"},{"lang":"es","text":"En el kernel de Linux, la siguiente vulnerabilidad ha sido resuelta:\n\nmm/ptdump: tomar el bloqueo de hotplug de memoria dentro de ptdump_walk_pgd()\n\nLa eliminación en caliente de memoria desmapea y desmantela varias regiones de la tabla de páginas del kernel según sea necesario. El código ptdump puede entrar en condición de carrera con modificaciones concurrentes de las tablas de páginas del kernel. Cuando las entradas hoja se modifican concurrentemente, el código de volcado puede registrar información obsoleta o inconsistente para un rango de VA, pero esto no es perjudicial de otra manera.\n\nPero cuando se liberan niveles intermedios de la tabla de páginas del kernel, el código de volcado continuará usando memoria que ha sido liberada y potencialmente reasignada para otro propósito. En tales casos, el código ptdump puede desreferenciar direcciones erróneas, lo que lleva a una serie de problemas potenciales.\n\nPara evitar la condición de carrera mencionada anteriormente, plataformas como arm64, riscv y s390 toman el bloqueo de hotplug de memoria, mientras vuelcan la tabla de páginas del kernel a través de la interfaz sysfs /sys/kernel/debug/kernel_page_tables.\n\nExiste una condición de carrera similar al verificar páginas que podrían haber sido marcadas como W+X a través de /sys/kernel/debug/kernel_page_tables/check_wx_pages, que a su vez llama a ptdump_check_wx(). En lugar de resolver esta condición de carrera de nuevo, simplemente movamos el bloqueo de hotplug de memoria dentro de ptdump_check_wx() genérico, lo que beneficiará a ambos escenarios.\n\nEliminar la combinación de get_online_mems() y put_online_mems() de todas las rutas de código ptdump de plataforma existentes.","source":"nvd"}],"published":"2025-09-04T15:32:36.681Z","modified":"2026-11-10T13:17:47.597Z","severity":{"scorer":"NVD","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:L/AC:H/PR:L/UI:N/S:U/C:N/I:N/A:H","score":4.7,"rating":"MEDIUM"},"severities":[{"scorer":"NVD","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:L/AC:H/PR:L/UI:N/S:U/C:N/I:N/A:H","score":4.7,"rating":"MEDIUM"}],"cwes":["CWE-362"],"affected":[{"ranges":[{"type":"git","introduced":"bbd6ec605c0fc286c3f8ce60b4ed44635361d58b","fixed":"3ee9a8c27bfd72c3f465004fa8455785d61be5e8","status":"affected"},{"type":"git","introduced":"bbd6ec605c0fc286c3f8ce60b4ed44635361d58b","fixed":"69bea84b06b5e779627e7afdbf4b60a7d231c76f","status":"affected"},{"type":"git","introduced":"bbd6ec605c0fc286c3f8ce60b4ed44635361d58b","fixed":"ac25ec5fa2bf6e606dc7954488e4dded272fa9cd","status":"affected"},{"type":"git","introduced":"bbd6ec605c0fc286c3f8ce60b4ed44635361d58b","fixed":"1636b5e9c3543b87d673e32a47e7c18698882425","status":"affected"},{"type":"git","introduced":"bbd6ec605c0fc286c3f8ce60b4ed44635361d58b","fixed":"ff40839e018b82c4d756d035f34a63aa2d93be83","status":"affected"},{"type":"git","introduced":"bbd6ec605c0fc286c3f8ce60b4ed44635361d58b","fixed":"67995d4244694928ce701928e530b5b4adeb17b4","status":"affected"},{"type":"git","introduced":"bbd6ec605c0fc286c3f8ce60b4ed44635361d58b","fixed":"ca8c414499f2e5337a95a76be0d21b728ee31c6b","status":"affected"},{"type":"git","introduced":"bbd6ec605c0fc286c3f8ce60b4ed44635361d58b","fixed":"59305202c67fea50378dcad0cc199dbc13a0e99a","status":"affected"}],"vendor":"Linux","product":"Linux","repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","source":"cvelist"},{"ranges":[{"version":"5.7","status":"affected"},{"type":"semver","introduced":"0","fixed":"5.7","status":"unaffected"},{"type":"semver","introduced":"5.10.241","lastAffected":"5.10.*","status":"unaffected"},{"type":"semver","introduced":"5.15.190","lastAffected":"5.15.*","status":"unaffected"},{"type":"semver","introduced":"6.1.149","lastAffected":"6.1.*","status":"unaffected"},{"type":"semver","introduced":"6.6.103","lastAffected":"6.6.*","status":"unaffected"},{"type":"semver","introduced":"6.12.43","lastAffected":"6.12.*","status":"unaffected"},{"type":"semver","introduced":"6.15.11","lastAffected":"6.15.*","status":"unaffected"},{"type":"semver","introduced":"6.16.2","lastAffected":"6.16.*","status":"unaffected"},{"type":"original_commit_for_fix","introduced":"6.17","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.7","fixed":"5.10.241"},{"status":"affected","introduced":"5.11","fixed":"5.15.190"},{"status":"affected","introduced":"5.16","fixed":"6.1.149"},{"status":"affected","introduced":"6.2","fixed":"6.6.103"},{"status":"affected","introduced":"6.7","fixed":"6.12.43"},{"status":"affected","introduced":"6.13","fixed":"6.15.11"},{"status":"affected","introduced":"6.16","fixed":"6.16.2"}],"vendor":"linux","product":"linux_kernel","cpe":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","source":"nvd"},{"ranges":[{"status":"affected","version":"11.0"}],"vendor":"debian","product":"debian_linux","cpe":"cpe:2.3:o:debian:debian_linux:11.0:*:*:*:*:*:*:*","source":"nvd"}],"references":[{"url":"https://git.kernel.org/stable/c/3ee9a8c27bfd72c3f465004fa8455785d61be5e8","tags":["patch"],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/69bea84b06b5e779627e7afdbf4b60a7d231c76f","tags":["patch"],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/ac25ec5fa2bf6e606dc7954488e4dded272fa9cd","tags":["patch"],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/1636b5e9c3543b87d673e32a47e7c18698882425","tags":["patch"],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/ff40839e018b82c4d756d035f34a63aa2d93be83","tags":["patch"],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/67995d4244694928ce701928e530b5b4adeb17b4","tags":["patch"],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/ca8c414499f2e5337a95a76be0d21b728ee31c6b","tags":["patch"],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/59305202c67fea50378dcad0cc199dbc13a0e99a","tags":["patch"],"sources":["cvelist","nvd"]},{"url":"https://lists.debian.org/debian-lts-announce/2025/10/msg00008.html","tags":["third-party-advisory"],"sources":["cvelist","nvd"]},{"url":"https://lists.debian.org/debian-lts-announce/2025/10/msg00007.html","tags":["third-party-advisory"],"sources":["cvelist","nvd"]},{"url":"https://cert-portal.siemens.com/productcert/html/ssa-032379.html","tags":[],"sources":["cvelist","nvd"]},{"url":"https://cert-portal.siemens.com/productcert/html/ssa-019113.html","tags":[],"sources":["cvelist","nvd"]},{"url":"https://cert-portal.siemens.com/productcert/html/ssa-457936.html","tags":[],"sources":["cvelist","nvd"]}],"credits":[],"assigner":"Linux","ssvc":{"scorer":"CISA-ADP","exploitation":"none","automatable":"no","technicalImpact":"partial","date":"2026-11-05T21:06:59.722Z"},"sources":[{"source":"cvelist","name":"CVE List","id":"CVE-2025-38681","url":"https://www.cve.org/CVERecord?id=CVE-2025-38681","licence":"CVE Terms of Use","modified":"2026-11-10T12:36:31.053Z"},{"source":"nvd","name":"NVD","id":"CVE-2025-38681","url":"https://nvd.nist.gov/vuln/detail/CVE-2025-38681","licence":"Public domain","modified":"2026-11-10T13:17:47.597Z"}],"updatedAt":"2026-11-25T22:59:04.130Z","epss":{"score":0.00171,"percentile":0.06777,"date":"2026-12-01T12:00:22.000Z"}}