{"id":"CVE-2024-50199","aliases":["CVE-2024-50199"],"related":[],"kind":"vulnerability","state":"published","title":"mm/swapfile: skip HugeTLB pages for unuse_vma","summary":"In the Linux kernel, the following vulnerability has been resolved:\n\nmm/swapfile: skip HugeTLB pages for unuse_vma\n\nI got a bad pud error and lost a 1GB HugeTLB when calling swapoff.  The\nproblem can be reproduced by the following steps:\n\n 1. Allocate an anonymous 1GB HugeTLB and some other anonymous memory.\n 2. Swapout the above anonymous memory.\n 3. run swapoff and we will get a bad pud error in kernel message:\n\n  mm/pgtable-generic.c:42: bad pud 00000000743d215d(84000001400000e7)\n\nWe can tell that pud_clear_bad is called by pud_none_or_clear_bad in\nunuse_pud_range() by ftrace.  And therefore the HugeTLB pages will never\nbe freed because we lost it from page table.  We can skip HugeTLB pages\nfor unuse_vma to fix it.","summarySource":"cvelist","descriptions":[{"lang":"en","text":"In the Linux kernel, the following vulnerability has been resolved:\n\nmm/swapfile: skip HugeTLB pages for unuse_vma\n\nI got a bad pud error and lost a 1GB HugeTLB when calling swapoff.  The\nproblem can be reproduced by the following steps:\n\n 1. Allocate an anonymous 1GB HugeTLB and some other anonymous memory.\n 2. Swapout the above anonymous memory.\n 3. run swapoff and we will get a bad pud error in kernel message:\n\n  mm/pgtable-generic.c:42: bad pud 00000000743d215d(84000001400000e7)\n\nWe can tell that pud_clear_bad is called by pud_none_or_clear_bad in\nunuse_pud_range() by ftrace.  And therefore the HugeTLB pages will never\nbe freed because we lost it from page table.  We can skip HugeTLB pages\nfor unuse_vma to fix it.","source":"cvelist"},{"lang":"es","text":"En el kernel de Linux, se ha resuelto la siguiente vulnerabilidad: mm/swapfile: omitir páginas HugeTLB para unuse_vma Obtuve un error pud incorrecto y perdí un HugeTLB de 1 GB al llamar a swapoff. El problema se puede reproducir mediante los siguientes pasos: 1. Asignar un HugeTLB anónimo de 1 GB y otra memoria anónima. 2. Intercambiar la memoria anónima anterior. 3. Ejecutar swapoff y obtendremos un error pud incorrecto en el mensaje del kernel: mm/pgtable-generic.c:42: bad pud 00000000743d215d(84000001400000e7) Podemos decir que pud_clear_bad es llamado por pud_none_or_clear_bad en unuse_pud_range() por ftrace. Y por lo tanto, las páginas HugeTLB nunca se liberarán porque las perdimos de la tabla de páginas. Podemos omitir las páginas HugeTLB para unuse_vma para solucionarlo.","source":"nvd"}],"published":"2024-11-08T05:54:13.403Z","modified":"2026-06-17T08:03:51.290Z","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":"0fe6e20b9c4c53b3e97096ee73a0857f60aad43f","fixed":"ba7f982cdb37ff5a7739dec85d7325ea66fc1496","status":"affected"},{"type":"git","introduced":"0fe6e20b9c4c53b3e97096ee73a0857f60aad43f","fixed":"417d5838ca73c6331ae2fe692fab6c25c00d9a0b","status":"affected"},{"type":"git","introduced":"0fe6e20b9c4c53b3e97096ee73a0857f60aad43f","fixed":"e41710f5a61aca9d6baaa8f53908a927dd9e7aa7","status":"affected"},{"type":"git","introduced":"0fe6e20b9c4c53b3e97096ee73a0857f60aad43f","fixed":"6ec0fe3756f941f42f8c57156b8bdf2877b2ebaf","status":"affected"},{"type":"git","introduced":"0fe6e20b9c4c53b3e97096ee73a0857f60aad43f","fixed":"bed2b9037806c62166a0ef9a559a1e7e3e1275b8","status":"affected"},{"type":"git","introduced":"0fe6e20b9c4c53b3e97096ee73a0857f60aad43f","fixed":"eb66a833cdd2f7302ee05d05e0fa12a2ca32eb87","status":"affected"},{"type":"git","introduced":"0fe6e20b9c4c53b3e97096ee73a0857f60aad43f","fixed":"7528c4fb1237512ee18049f852f014eba80bbe8d","status":"affected"}],"vendor":"Linux","product":"Linux","repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","source":"cvelist"},{"ranges":[{"version":"2.6.36","status":"affected"},{"type":"semver","introduced":"0","fixed":"2.6.36","status":"unaffected"},{"type":"semver","introduced":"5.4.285","lastAffected":"5.4.*","status":"unaffected"},{"type":"semver","introduced":"5.10.228","lastAffected":"5.10.*","status":"unaffected"},{"type":"semver","introduced":"5.15.169","lastAffected":"5.15.*","status":"unaffected"},{"type":"semver","introduced":"6.1.114","lastAffected":"6.1.*","status":"unaffected"},{"type":"semver","introduced":"6.6.58","lastAffected":"6.6.*","status":"unaffected"},{"type":"semver","introduced":"6.11.5","lastAffected":"6.11.*","status":"unaffected"},{"type":"original_commit_for_fix","introduced":"6.12","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":"2.6.36","fixed":"5.4.285"},{"status":"affected","introduced":"5.5","fixed":"5.10.228"},{"status":"affected","introduced":"5.11","fixed":"5.15.169"},{"status":"affected","introduced":"5.16","fixed":"6.1.114"},{"status":"affected","introduced":"6.2","fixed":"6.6.58"},{"status":"affected","introduced":"6.7","fixed":"6.11.5"},{"status":"affected","version":"6.12"},{"status":"affected","version":"6.12"},{"status":"affected","version":"6.12"}],"vendor":"linux","product":"linux_kernel","cpe":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","source":"nvd"}],"references":[{"url":"https://git.kernel.org/stable/c/ba7f982cdb37ff5a7739dec85d7325ea66fc1496","tags":["patch"],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/417d5838ca73c6331ae2fe692fab6c25c00d9a0b","tags":["patch"],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/e41710f5a61aca9d6baaa8f53908a927dd9e7aa7","tags":["patch"],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/6ec0fe3756f941f42f8c57156b8bdf2877b2ebaf","tags":["patch"],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/bed2b9037806c62166a0ef9a559a1e7e3e1275b8","tags":["patch"],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/eb66a833cdd2f7302ee05d05e0fa12a2ca32eb87","tags":["patch"],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/7528c4fb1237512ee18049f852f014eba80bbe8d","tags":["patch"],"sources":["cvelist","nvd"]},{"url":"https://lists.debian.org/debian-lts-announce/2025/03/msg00002.html","tags":[],"sources":["cvelist","nvd"]},{"url":"https://lists.debian.org/debian-lts-announce/2025/01/msg00001.html","tags":[],"sources":["cvelist","nvd"]}],"credits":[],"assigner":"Linux","sources":[{"source":"cvelist","name":"CVE List","id":"CVE-2024-50199","url":"https://www.cve.org/CVERecord?id=CVE-2024-50199","licence":"CVE Terms of Use","modified":"2026-05-11T20:47:20.650Z"},{"source":"nvd","name":"NVD","id":"CVE-2024-50199","url":"https://nvd.nist.gov/vuln/detail/CVE-2024-50199","licence":"Public domain","modified":"2026-06-17T08:03:51.290Z"}],"updatedAt":"2026-11-25T22:58:47.911Z","epss":{"score":0.00225,"percentile":0.14095,"date":"2026-12-01T12:00:22.000Z"}}