CVE-2024-50199
mm/swapfile: skip HugeTLB pages for unuse_vma
Reported by linux · Published November 8, 2024
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.
Fixed versions
Upgrade to a fixed version or later. Language registries are listed first, then Linux distributions, then vendor products.
| Package | Ecosystem | Fixed in |
|---|---|---|
| kernel-devel | Amazon Linux | 6.1.115-126.197.amzn2023 |
| kernel-modules-extra | Amazon Linux | 6.1.115-126.197.amzn2023 |
| kernel-tools | Amazon Linux | 6.1.115-126.197.amzn2023 |
| linux_kernel | linux | 6.11.5, 6.6.58, 6.1.114, 5.15.169, 5.10.228, 5.4.285 |
Affected products
| Vendor | Product | Versions |
|---|---|---|
| Linux | Linux | 0fe6e20b9c4c53b3e97096ee73a0857f60aad43f, 0fe6e20b9c4c53b3e97096ee73a0857f60aad43f, 0fe6e20b9c4c53b3e97096ee73a0857f60aad43f |
| Linux | Linux | 2.6.36, 0, 5.4.285 |
| amazon:2023 | kernel-devel | 0 |
| amazon:2023 | kernel-modules-extra | 0 |
| amazon:2023 | kernel-tools | 0 |
| linux | linux_kernel | 2.6.36, 2.6.36, 2.6.36 |
| amazon:2023 | kernel-headers | 0 |
| amazon:2023 | kernel-libbpf | 0 |
| amazon:2023 | perf | 0 |
| amazon:2023 | kernel-tools-devel | 0 |
| amazon:2023 | bpftool | 0 |
| amazon:2023 | kernel-livepatch-6.1.115-126.197 | 0 |
| amazon:2023 | kernel-modules-extra-common | 0 |
| amazon:2023 | kernel-libbpf-devel | 0 |
| amazon:2023 | kernel-libbpf-static | 0 |
| amazon:2023 | python3-perf | 0 |
| amazon:2023 | kernel | 0 |
| Linux | Linux | 0fe6e20b9c4c53b3e97096ee73a0857f60aad43f, 0fe6e20b9c4c53b3e97096ee73a0857f60aad43f, 0fe6e20b9c4c53b3e97096ee73a0857f60aad43f |
Timeline
- Nov 7, 2024 CVE Published
- Nov 8, 2024 Coalition ESS Score (9 in total, the first dated here)
- Nov 9, 2024 EPSS Score (30 in total, the first dated here)
- Dec 16, 2025 PoC Published
- Jan 2, 2026 Security Advisory (159 in total, the first dated here)
- Jan 2, 2026 CVE Updated
- Apr 29, 2026 Distribution Patch (130 in total, the first dated here)
Query this with the API
The same record, from the CLI:
vulnetix vdb vuln CVE-2024-50199
vulnetix vdb fixes CVE-2024-50199
Or with curl, using the org id and key from your account page:
curl -s -H "Authorization: ApiKey ${VULNETIX_ORG_ID}:${VULNETIX_API_KEY}" \
"https://api.vdb.vulnetix.com/v2/vuln/CVE-2024-50199/fixes/registry"
The Community plan is free and allows 50 queries a day. Get a free API key · API quickstart