{"id":"CVE-2024-42258","state":"PUBLISHED","title":"mm: huge_memory: use !CONFIG_64BIT to relax huge page alignment on 32 bit machines","description":"In the Linux kernel, the following vulnerability has been resolved:\n\nmm: huge_memory: use !CONFIG_64BIT to relax huge page alignment on 32 bit machines\n\nYves-Alexis Perez reported commit 4ef9ad19e176 (\"mm: huge_memory: don't\nforce huge page alignment on 32 bit\") didn't work for x86_32 [1].  It is\nbecause x86_32 uses CONFIG_X86_32 instead of CONFIG_32BIT.\n\n!CONFIG_64BIT should cover all 32 bit machines.\n\n[1] https://lore.kernel.org/linux-mm/CAHbLzkr1LwH3pcTgM+aGQ31ip2bKqiqEQ8=FQB+t2c3dhNKNHA@mail.gmail.com/","publishedAt":"2024-08-12T14:16:13.227Z","updatedAt":"2026-08-05T11:36:07.867Z","severity":{"score":7.1,"label":"High","version":"3.1","vector":"CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:N/A:H","source":"Linux"},"assigner":"Linux","products":["Linux Linux"],"affected":[{"vendor":"Linux","product":"Linux","defaultStatus":"unaffected","versions":[{"version":"87632bc9ecff5ded93433bc0fca428019bdd1cfe","status":"affected","lessThan":"89f2914dd4b47d2fad3deef0d700f9526d98d11f","versionType":"git"},{"version":"6ea9aa8d97e6563676094cb35755884173269555","status":"affected","lessThan":"a5c399fe433a115e9d3693169b5f357f3194af0a","versionType":"git"},{"version":"4ef9ad19e17676b9ef071309bc62020e2373705d","status":"affected","lessThan":"7e1f4efb8d6140b2ec79bf760c43e1fc186e8dfc","versionType":"git"},{"version":"4ef9ad19e17676b9ef071309bc62020e2373705d","status":"affected","lessThan":"d9592025000b3cf26c742f3505da7b83aedc26d5","versionType":"git"},{"version":"7432376c913381c5f24d373a87ff629bbde94b47","status":"affected","versionType":"git"},{"version":"6.1.81","status":"affected","lessThan":"6.1.105","versionType":"semver"},{"version":"6.7.6","status":"affected","lessThan":"6.8","versionType":"semver"}],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["mm/huge_memory.c"]},{"vendor":"Linux","product":"Linux","defaultStatus":"affected","versions":[{"version":"6.8","status":"affected"},{"version":"0","status":"unaffected","lessThan":"6.8","versionType":"semver"},{"version":"6.1.105","status":"unaffected","lessThanOrEqual":"6.1.*","versionType":"semver"},{"version":"6.10.3","status":"unaffected","lessThanOrEqual":"6.10.*","versionType":"semver"},{"version":"6.11","status":"unaffected","lessThanOrEqual":"*","versionType":"original_commit_for_fix"}],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["mm/huge_memory.c"]}],"references":["https://git.kernel.org/stable/c/89f2914dd4b47d2fad3deef0d700f9526d98d11f","https://git.kernel.org/stable/c/a5c399fe433a115e9d3693169b5f357f3194af0a","https://git.kernel.org/stable/c/7e1f4efb8d6140b2ec79bf760c43e1fc186e8dfc","https://git.kernel.org/stable/c/d9592025000b3cf26c742f3505da7b83aedc26d5","https://lists.debian.org/debian-lts-announce/2025/01/msg00001.html"],"weaknesses":[],"ingestedAt":"2026-10-29T20:07:47.831Z","source":{"repository":"CVEProject/cvelistV5","path":"cves/2024/42xxx/CVE-2024-42258.json","commit":"556c9d3a8cd17e218bb8e452ba7cd619a384ff47"},"raw":{"dataType":"CVE_RECORD","dataVersion":"5.2","cveMetadata":{"cveId":"CVE-2024-42258","state":"PUBLISHED","datePublished":"2024-08-12T14:16:13.227Z","dateUpdated":"2026-08-05T11:36:07.867Z","assignerShortName":"Linux","assignerOrgId":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","dateReserved":"2024-07-30T07:40:12.257Z"},"containers":{"cna":{"title":"mm: huge_memory: use !CONFIG_64BIT to relax huge page alignment on 32 bit machines","descriptions":[{"lang":"en","value":"In the Linux kernel, the following vulnerability has been resolved:\n\nmm: huge_memory: use !CONFIG_64BIT to relax huge page alignment on 32 bit machines\n\nYves-Alexis Perez reported commit 4ef9ad19e176 (\"mm: huge_memory: don't\nforce huge page alignment on 32 bit\") didn't work for x86_32 [1].  It is\nbecause x86_32 uses CONFIG_X86_32 instead of CONFIG_32BIT.\n\n!CONFIG_64BIT should cover all 32 bit machines.\n\n[1] https://lore.kernel.org/linux-mm/CAHbLzkr1LwH3pcTgM+aGQ31ip2bKqiqEQ8=FQB+t2c3dhNKNHA@mail.gmail.com/"}],"affected":[{"vendor":"Linux","product":"Linux","defaultStatus":"unaffected","versions":[{"version":"87632bc9ecff5ded93433bc0fca428019bdd1cfe","status":"affected","lessThan":"89f2914dd4b47d2fad3deef0d700f9526d98d11f","versionType":"git"},{"version":"6ea9aa8d97e6563676094cb35755884173269555","status":"affected","lessThan":"a5c399fe433a115e9d3693169b5f357f3194af0a","versionType":"git"},{"version":"4ef9ad19e17676b9ef071309bc62020e2373705d","status":"affected","lessThan":"7e1f4efb8d6140b2ec79bf760c43e1fc186e8dfc","versionType":"git"},{"version":"4ef9ad19e17676b9ef071309bc62020e2373705d","status":"affected","lessThan":"d9592025000b3cf26c742f3505da7b83aedc26d5","versionType":"git"},{"version":"7432376c913381c5f24d373a87ff629bbde94b47","status":"affected","versionType":"git"},{"version":"6.1.81","status":"affected","lessThan":"6.1.105","versionType":"semver"},{"version":"6.7.6","status":"affected","lessThan":"6.8","versionType":"semver"}],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["mm/huge_memory.c"]},{"vendor":"Linux","product":"Linux","defaultStatus":"affected","versions":[{"version":"6.8","status":"affected"},{"version":"0","status":"unaffected","lessThan":"6.8","versionType":"semver"},{"version":"6.1.105","status":"unaffected","lessThanOrEqual":"6.1.*","versionType":"semver"},{"version":"6.10.3","status":"unaffected","lessThanOrEqual":"6.10.*","versionType":"semver"},{"version":"6.11","status":"unaffected","lessThanOrEqual":"*","versionType":"original_commit_for_fix"}],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["mm/huge_memory.c"]}],"references":[{"url":"https://git.kernel.org/stable/c/89f2914dd4b47d2fad3deef0d700f9526d98d11f"},{"url":"https://git.kernel.org/stable/c/a5c399fe433a115e9d3693169b5f357f3194af0a"},{"url":"https://git.kernel.org/stable/c/7e1f4efb8d6140b2ec79bf760c43e1fc186e8dfc"},{"url":"https://git.kernel.org/stable/c/d9592025000b3cf26c742f3505da7b83aedc26d5"}],"metrics":[{"cvssV3_1":{"version":"3.1","vectorString":"CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:N/A:H","baseScore":7.1,"baseSeverity":"HIGH"},"scenarios":[{"lang":"en","value":"AV:L - The flawed placement logic is reached only through local process address-space operations — `mmap(2)` for anonymous mappings ≥2MB and `execve(2)`/`ld.so` library loads on ext4/xfs/btrfs/fuse — with no network-facing input processing involved. An attacker needs local execution on the 32-bit target (i386 desktop/server, or ARM32-LPAE embedded/IoT/automotive controller).\nAC:L - The behaviour is fully deterministic with no race or memory-layout precondition: on any x86_32/ARM32 kernel with THP enabled (the Debian/Ubuntu i386 PAE default and common on ARM LPAE), every mapping ≥2MB is unconditionally rounded to a 2MB boundary, yielding a fixed, precomputable address. The attacker simply issues a large mmap or reads the predictable base of a large library.\nPR:L - Any ordinary unprivileged local user can allocate ≥2MB mappings and observe the zero-entropy 2MB-aligned placement, and can equally derive the now-deterministic library base addresses of other, more privileged processes. No capability, namespace, or administrative access is required.\nUI:N - No victim action is needed — the kernel applies the alignment automatically to every qualifying mapping in every process on the system, including long-running root daemons that are already mapped. The attacker acts entirely on their own.\nS:U - The weakened randomization and the address-space exhaustion are both confined to the same operating-system security authority; no VM, IOMMU, or sandbox boundary is crossed.\nC:H - With `mmap_rnd_bits` at the 32-bit default of 8, PMD alignment consumes every randomization bit, so ASLR is completely — not partially — defeated for all large mappings, exposing the exact address-space layout of arbitrary processes including setuid binaries and network daemons. This total loss of a core memory-confidentiality protection makes the contents of victim memory reliably locatable and disclosable, as the reporter demonstrated in the regreSSHion (CVE-2024-6387) context on i386.\nI:N - The defect only influences where mappings are placed; the padding arithmetic retains its overflow guards and the returned address stays inside the reserved region, so no out-of-bounds write, use-after-free, or other data-modification primitive arises from the flaw itself.\nA:H - Forcing 2MB alignment on the 2–3GB 32-bit user address space leaves multi-megabyte holes between mappings, and the resulting fragmentation was reported in practice as mmap failures and premature OOM on openSUSE i586 and Android compat workloads. On a 32-bit embedded or industrial controller this causes the primary workload to fail allocations and be OOM-killed, denying service."}]}],"providerMetadata":{"shortName":"Linux","orgId":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","dateUpdated":"2026-08-05T11:36:07.867Z"},"cpeApplicability":[{"nodes":[{"operator":"OR","negate":false,"cpeMatch":[{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"6.1.81","versionEndExcluding":"6.1.105"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"6.8","versionEndExcluding":"6.10.3"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"6.8","versionEndExcluding":"6.11"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"6.7.6"}]}]}],"x_generator":{"engine":"bippy-1.2.0"}},"adp":[{"title":"CISA ADP Vulnrichment","metrics":[{"other":{"type":"ssvc","content":{"id":"CVE-2024-42258","role":"CISA Coordinator","options":[{"Exploitation":"none"},{"Automatable":"no"},{"Technical Impact":"partial"}],"version":"2.0.3","timestamp":"2024-09-10T16:12:53.509414Z"}}}],"providerMetadata":{"shortName":"CISA-ADP","orgId":"134c704f-9b21-4f2e-91b3-4a467353bcc0","dateUpdated":"2024-09-12T17:33:33.852Z"}},{"title":"CVE Program Container","references":[{"url":"https://lists.debian.org/debian-lts-announce/2025/01/msg00001.html"}],"providerMetadata":{"shortName":"CVE","orgId":"af854a3a-2127-422b-91ae-364da2661108","dateUpdated":"2025-11-03T22:02:53.962Z"}}]}}}