CVE-2024-50199

mm/swapfile: skip HugeTLB pages for unuse_vma

No CVSS score yet EPSS 0.22%

Published 8 Nov 2024 Updated 11 May 2026 CNA: Linux

Check your servers for CVE-2024-50199

The Vulnpocalypse collector sends the package list of each Linux server and of its container images once a day. Vulnpocalypse shows every server where CVE-2024-50199 affects the running kernel, with the command that installs the fix. The free plan covers one server and one domain and does not need a credit card.

Check my servers

Description

In the Linux kernel, the following vulnerability has been resolved:

mm/swapfile: skip HugeTLB pages for unuse_vma

I got a bad pud error and lost a 1GB HugeTLB when calling swapoff. The problem can be reproduced by the following steps:

1. Allocate an anonymous 1GB HugeTLB and some other anonymous memory. 2. Swapout the above anonymous memory. 3. run swapoff and we will get a bad pud error in kernel message:

mm/pgtable-generic.c:42: bad pud 00000000743d215d(84000001400000e7)

We can tell that pud_clear_bad is called by pud_none_or_clear_bad in unuse_pud_range() by ftrace. And therefore the HugeTLB pages will never be freed because we lost it from page table. We can skip HugeTLB pages for unuse_vma to fix it.

Exploitation

EPSS 0.22%: the probability of exploitation activity in the next 30 days, from the EPSS model of FIRST. The score is higher than 14.0% of all scored CVEs. Scores of 1 Dec 2026.

Affected products

As the CNA lists them.

ProductVersions
Linux
affected from 0fe6e20b9c4c53b3e97096ee73a0857f60aad43f, before ba7f982cdb37ff5a7739dec85d7325ea66fc1496
affected from 0fe6e20b9c4c53b3e97096ee73a0857f60aad43f, before 417d5838ca73c6331ae2fe692fab6c25c00d9a0b
affected from 0fe6e20b9c4c53b3e97096ee73a0857f60aad43f, before e41710f5a61aca9d6baaa8f53908a927dd9e7aa7
affected from 0fe6e20b9c4c53b3e97096ee73a0857f60aad43f, before 6ec0fe3756f941f42f8c57156b8bdf2877b2ebaf
affected from 0fe6e20b9c4c53b3e97096ee73a0857f60aad43f, before bed2b9037806c62166a0ef9a559a1e7e3e1275b8
affected from 0fe6e20b9c4c53b3e97096ee73a0857f60aad43f, before eb66a833cdd2f7302ee05d05e0fa12a2ca32eb87
affected from 0fe6e20b9c4c53b3e97096ee73a0857f60aad43f, before 7528c4fb1237512ee18049f852f014eba80bbe8d
Other versions: unaffected
Linux
affected 2.6.36
unaffected before 2.6.36
unaffected from 5.4.285 up to and including 5.4.*
unaffected from 5.10.228 up to and including 5.10.*
unaffected from 5.15.169 up to and including 5.15.*
unaffected from 6.1.114 up to and including 6.1.*
unaffected from 6.6.58 up to and including 6.6.*
unaffected from 6.11.5 up to and including 6.11.*
unaffected 6.12 and later
Other versions: affected

Is my server affected?

This CVE is in the Linux kernel. Compare the running kernel with the fixed kernel version of your distribution, and reboot after a kernel update:

uname -r
# Debian, Ubuntu: does the changelog of the running kernel name the CVE?
zgrep -l CVE-2024-50199 /usr/share/doc/linux-image-$(uname -r)/changelog.Debian.gz
# RHEL, Rocky, Alma
rpm -q --changelog kernel | grep CVE-2024-50199

With Trivy, on the host and for a container image. When a package is affected, it prints the installed and the fixed version:

trivy rootfs --scanners vuln / | grep CVE-2024-50199
trivy image --scanners vuln IMAGE | grep CVE-2024-50199

Vulnpocalypse makes this comparison every day for the package lists of your servers and container images, including language packages (npm, PyPI, Go, Maven and others), and sends the command that installs the fix. Start free with one server and one domain or read how to install the collector.

References

Other references

Source: the record CVE-2024-50199 of the CVE List (CVE Program), CVE Terms of Use; EPSS of FIRST. The text of the record is shown as published. Data sources and licences.