Vulnerability · Published May 22, 2024 · Assigned by Linux
CVE-2021-47491mm: khugepaged: skip huge page collapse for special files
Medium 5.5
In plain English
A medium-severity security flaw in Linux from Linux. There are no confirmed reports of exploitation so far. The chance it is exploited in the next 30 days is estimated at 0.2% (higher than 11% of all known vulnerabilities). Fixed versions are available - upgrade the affected package.
Official description
In the Linux kernel, the following vulnerability has been resolved: mm: khugepaged: skip huge page collapse for special files The read-only THP for filesystems will collapse THP for files opened readonly and mapped with VM_EXEC. The intended usecase is to avoid TLB misses for large text segments. But it doesn't restrict the file types so a THP could be collapsed for a non-regular file, for example, block device, if it is opened readonly and mapped with EXEC permission. This may cause bugs, like [1] and [2]. This is definitely not the intended usecase, so just collapse THP for regular files in order to close the attack surface. [shy828301@gmail.com: fix vm_file check [3]]
Affected packages & fixed versions
| Ecosystem | Package | Fixed in | Advisory |
|---|---|---|---|
| AlmaLinux:8 | bpftool | 4.18.0-553.16.1.el8_10 | ALSA-2024:5101 |
| AlmaLinux:8 | kernel | 4.18.0-553.16.1.el8_10 | ALSA-2024:5101 |
| AlmaLinux:8 | kernel-abi-stablelists | 4.18.0-553.16.1.el8_10 | ALSA-2024:5101 |
| AlmaLinux:8 | kernel-core | 4.18.0-553.16.1.el8_10 | ALSA-2024:5101 |
| AlmaLinux:8 | kernel-cross-headers | 4.18.0-553.16.1.el8_10 | ALSA-2024:5101 |
| AlmaLinux:8 | kernel-debug | 4.18.0-553.16.1.el8_10 | ALSA-2024:5101 |
| AlmaLinux:8 | kernel-debug-core | 4.18.0-553.16.1.el8_10 | ALSA-2024:5101 |
| AlmaLinux:8 | kernel-debug-devel | 4.18.0-553.16.1.el8_10 | ALSA-2024:5101 |
| AlmaLinux:8 | kernel-debug-modules | 4.18.0-553.16.1.el8_10 | ALSA-2024:5101 |
| AlmaLinux:8 | kernel-debug-modules-extra | 4.18.0-553.16.1.el8_10 | ALSA-2024:5101 |
| AlmaLinux:8 | kernel-devel | 4.18.0-553.16.1.el8_10 | ALSA-2024:5101 |
| AlmaLinux:8 | kernel-doc | 4.18.0-553.16.1.el8_10 | ALSA-2024:5101 |
| AlmaLinux:8 | kernel-headers | 4.18.0-553.16.1.el8_10 | ALSA-2024:5101 |
| AlmaLinux:8 | kernel-modules | 4.18.0-553.16.1.el8_10 | ALSA-2024:5101 |
| AlmaLinux:8 | kernel-modules-extra | 4.18.0-553.16.1.el8_10 | ALSA-2024:5101 |
| AlmaLinux:8 | kernel-rt | 4.18.0-553.16.1.rt7.357.el8_10 | ALSA-2024:5102 |
| AlmaLinux:8 | kernel-rt-core | 4.18.0-553.16.1.rt7.357.el8_10 | ALSA-2024:5102 |
| AlmaLinux:8 | kernel-rt-debug | 4.18.0-553.16.1.rt7.357.el8_10 | ALSA-2024:5102 |
| AlmaLinux:8 | kernel-rt-debug-core | 4.18.0-553.16.1.rt7.357.el8_10 | ALSA-2024:5102 |
| AlmaLinux:8 | kernel-rt-debug-devel | 4.18.0-553.16.1.rt7.357.el8_10 | ALSA-2024:5102 |
| AlmaLinux:8 | kernel-rt-debug-kvm | 4.18.0-553.16.1.rt7.357.el8_10 | ALSA-2024:5102 |
| AlmaLinux:8 | kernel-rt-debug-modules | 4.18.0-553.16.1.rt7.357.el8_10 | ALSA-2024:5102 |
| AlmaLinux:8 | kernel-rt-debug-modules-extra | 4.18.0-553.16.1.rt7.357.el8_10 | ALSA-2024:5102 |
| AlmaLinux:8 | kernel-rt-devel | 4.18.0-553.16.1.rt7.357.el8_10 | ALSA-2024:5102 |
| AlmaLinux:8 | kernel-rt-kvm | 4.18.0-553.16.1.rt7.357.el8_10 | ALSA-2024:5102 |
| AlmaLinux:8 | kernel-rt-modules | 4.18.0-553.16.1.rt7.357.el8_10 | ALSA-2024:5102 |
| AlmaLinux:8 | kernel-rt-modules-extra | 4.18.0-553.16.1.rt7.357.el8_10 | ALSA-2024:5102 |
| AlmaLinux:8 | kernel-tools | 4.18.0-553.16.1.el8_10 | ALSA-2024:5101 |
| AlmaLinux:8 | kernel-tools-libs | 4.18.0-553.16.1.el8_10 | ALSA-2024:5101 |
| AlmaLinux:8 | kernel-tools-libs-devel | 4.18.0-553.16.1.el8_10 | ALSA-2024:5101 |
| AlmaLinux:8 | kernel-zfcpdump | 4.18.0-553.16.1.el8_10 | ALSA-2024:5101 |
| AlmaLinux:8 | kernel-zfcpdump-core | 4.18.0-553.16.1.el8_10 | ALSA-2024:5101 |
| AlmaLinux:8 | kernel-zfcpdump-devel | 4.18.0-553.16.1.el8_10 | ALSA-2024:5101 |
| AlmaLinux:8 | kernel-zfcpdump-modules | 4.18.0-553.16.1.el8_10 | ALSA-2024:5101 |
| AlmaLinux:8 | kernel-zfcpdump-modules-extra | 4.18.0-553.16.1.el8_10 | ALSA-2024:5101 |
| AlmaLinux:8 | perf | 4.18.0-553.16.1.el8_10 | ALSA-2024:5101 |
| AlmaLinux:8 | python3-perf | 4.18.0-553.16.1.el8_10 | ALSA-2024:5101 |
| Debian:12 | linux | 5.15.3-1 | DEBIAN-CVE-2021-47491 |
| Debian:13 | linux | 5.15.3-1 | DEBIAN-CVE-2021-47491 |
| Debian:14 | linux | 5.15.3-1 | DEBIAN-CVE-2021-47491 |
| Rocky Linux:8 | kernel | 0:4.18.0-553.16.1.el8_10 | RLSA-2024:5101 |
| Rocky Linux:8 | kernel | 0:4.18.0-553.16.1.el8_10.cloud.0.1 | RXSA-2024:5101 |
| Rocky Linux:8 | kernel-rt | 0:4.18.0-553.16.1.rt7.357.el8_10 | RLSA-2024:5102 |
| Ubuntu:22.04:LTS | linux-allwinner-5.19 | no fix listed | UBUNTU-CVE-2021-47491 |
| Ubuntu:22.04:LTS | linux-aws-5.19 | no fix listed | UBUNTU-CVE-2021-47491 |
| Ubuntu:22.04:LTS | linux-aws-6.2 | no fix listed | UBUNTU-CVE-2021-47491 |
| Ubuntu:22.04:LTS | linux-azure-5.19 | no fix listed | UBUNTU-CVE-2021-47491 |
| Ubuntu:22.04:LTS | linux-azure-6.2 | no fix listed | UBUNTU-CVE-2021-47491 |
| Ubuntu:22.04:LTS | linux-azure-fde-5.19 | no fix listed | UBUNTU-CVE-2021-47491 |
| Ubuntu:22.04:LTS | linux-azure-fde-6.2 | no fix listed | UBUNTU-CVE-2021-47491 |
| Ubuntu:22.04:LTS | linux-gcp-5.19 | no fix listed | UBUNTU-CVE-2021-47491 |
| Ubuntu:22.04:LTS | linux-gcp-6.2 | no fix listed | UBUNTU-CVE-2021-47491 |
| Ubuntu:22.04:LTS | linux-hwe-5.19 | no fix listed | UBUNTU-CVE-2021-47491 |
| Ubuntu:22.04:LTS | linux-hwe-6.2 | no fix listed | UBUNTU-CVE-2021-47491 |
| Ubuntu:22.04:LTS | linux-intel-iot-realtime | no fix listed | UBUNTU-CVE-2021-47491 |
| Ubuntu:22.04:LTS | linux-lowlatency-hwe-5.19 | no fix listed | UBUNTU-CVE-2021-47491 |
| Ubuntu:22.04:LTS | linux-lowlatency-hwe-6.2 | no fix listed | UBUNTU-CVE-2021-47491 |
| Ubuntu:22.04:LTS | linux-nvidia-6.2 | no fix listed | UBUNTU-CVE-2021-47491 |
| Ubuntu:22.04:LTS | linux-oem-5.17 | no fix listed | UBUNTU-CVE-2021-47491 |
| Ubuntu:22.04:LTS | linux-oem-6.0 | no fix listed | UBUNTU-CVE-2021-47491 |
| Ubuntu:22.04:LTS | linux-oem-6.1 | no fix listed | UBUNTU-CVE-2021-47491 |
| Ubuntu:24.04:LTS | linux-raspi-realtime | no fix listed | UBUNTU-CVE-2021-47491 |
| Ubuntu:22.04:LTS | linux-realtime | no fix listed | UBUNTU-CVE-2021-47491 |
| Ubuntu:22.04:LTS | linux-riscv | no fix listed | UBUNTU-CVE-2021-47491 |
| Ubuntu:22.04:LTS | linux-riscv-5.19 | no fix listed | UBUNTU-CVE-2021-47491 |
| Ubuntu:22.04:LTS | linux-starfive-5.19 | no fix listed | UBUNTU-CVE-2021-47491 |
| Ubuntu:22.04:LTS | linux-starfive-6.2 | no fix listed | UBUNTU-CVE-2021-47491 |
Affected products (as reported)
| Vendor | Product | Versions |
|---|---|---|
| Linux | Linux | 99cb0dbd47a15d395bf3faa78dc122bc5efe3fc0 – before 6d67b2a73b8e3a079c355bab3c1aef7d85a044b899cb0dbd47a15d395bf3faa78dc122bc5efe3fc0 – before 5fcb6fce74ffa614d964667110cf1a516c48c6d999cb0dbd47a15d395bf3faa78dc122bc5efe3fc0 – before a4aeaa06d45e90f9b279f0b09de84bd00006e733 |
| Linux | Linux | 5.4 |