{"id":"CVE-2021-47491","published":"2024-05-22T08:19:40Z","modified":"2026-05-11T13:55:40Z","title":"mm: khugepaged: skip huge page collapse for special files","vendor":"Linux","product":"Linux","tier":"tail","description":{"text":"In the Linux kernel, the following vulnerability has been resolved:\n\nmm: khugepaged: skip huge page collapse for special files\n\nThe read-only THP for filesystems will collapse THP for files opened\nreadonly and mapped with VM_EXEC.  The intended usecase is to avoid TLB\nmisses for large text segments.  But it doesn't restrict the file types\nso a THP could be collapsed for a non-regular file, for example, block\ndevice, if it is opened readonly and mapped with EXEC permission.  This\nmay cause bugs, like [1] and [2].\n\nThis is definitely not the intended usecase, so just collapse THP for\nregular files in order to close the attack surface.\n\n[shy828301@gmail.com: fix vm_file check [3]]","provenance":"source","from":"CVE.org"},"cvss":null,"epss":{"score":0.0021,"percentile":0.11365,"provenance":"source"},"cwes":[],"references":[{"url":"https://git.kernel.org/stable/c/6d67b2a73b8e3a079c355bab3c1aef7d85a044b8","tags":[]},{"url":"https://git.kernel.org/stable/c/5fcb6fce74ffa614d964667110cf1a516c48c6d9","tags":[]},{"url":"https://git.kernel.org/stable/c/a4aeaa06d45e90f9b279f0b09de84bd00006e733","tags":[]}],"priority":{"score":2.3,"factors":[{"name":"EPSS percentile","points":2.27}]},"vendorSlug":"linux","affectedVersions":[{"vendor":"Linux","product":"Linux","versions":[">= 99cb0dbd47a15d395bf3faa78dc122bc5efe3fc0, < 6d67b2a73b8e3a079c355bab3c1aef7d85a044b8",">= 99cb0dbd47a15d395bf3faa78dc122bc5efe3fc0, < 5fcb6fce74ffa614d964667110cf1a516c48c6d9",">= 99cb0dbd47a15d395bf3faa78dc122bc5efe3fc0, < a4aeaa06d45e90f9b279f0b09de84bd00006e733"]},{"vendor":"Linux","product":"Linux","versions":["5.4"]}],"ssvc":{"exploitation":"none","automatable":"no","technicalImpact":"partial","timestamp":"2024-05-22T18:42:55.199651Z","from":"CISA ADP","provenance":"source"},"euvd":{"id":"EUVD-2021-34495","exploited":false,"provenance":"source"}}