# CVE-2024-42241: mm/shmem: disable PMD-sized page cache if needed

> Archived entry. Full-text search covers entries since 2026-11-10; exact IDs work for all years.

- **Severity:** MEDIUM 5.5
- **CVSS:** 5.5 (v3.1, NVD) `CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H`
- **CVSS metrics:** Attack vector: Local; Attack complexity: Low; Privileges required: Low; User interaction: None; Scope: Unchanged; Confidentiality impact: None; Integrity impact: None; Availability impact: High
- **Exploited in the wild:** Not in CISA KEV
- **Public exploit / PoC:** None known
- **Remote exploitation:** Not remotely exploitable (local or adjacent access needed)
- **EPSS:** 0.31% (percentile 16, 2026-11-26)
- **CWE:** CWE-770
- **Published:** 2024-08-07T15:14:28.547Z
- **Modified:** 2026-10-30T13:17:32.820Z

## Who should check

- Anyone running Linux \>= 6b24ca4a1a8d4ee3221d6d44ddbb99f542e4bda3, \< e991bfc6b69e3db6bdefde34f5d5c9686a192e8f; \>= 6b24ca4a1a8d4ee3221d6d44ddbb99f542e4bda3, \< 93893eacb372b0a4a30f7de6609b08c3ba6c4fd9; \>= 6b24ca4a1a8d4ee3221d6d44ddbb99f542e4bda3, \< cd25208ca9b0097f8e079d692fc678f36fdbc3f9; \>= 6b24ca4a1a8d4ee3221d6d44ddbb99f542e4bda3, \< 9fd154ba926b34c833b7bfc4c14ee2e931b3d743
- Anyone running Linux 5.17

## Description

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

mm/shmem: disable PMD-sized page cache if needed

For shmem files, it's possible that PMD-sized page cache can't be
supported by xarray.  For example, 512MB page cache on ARM64 when the base
page size is 64KB can't be supported by xarray.  It leads to errors as the
following messages indicate when this sort of xarray entry is split.

WARNING: CPU: 34 PID: 7578 at lib/xarray.c:1025 xas\_split\_alloc+0xf8/0x128
Modules linked in: binfmt\_misc nft\_fib\_inet nft\_fib\_ipv4 nft\_fib\_ipv6   \\
nft\_fib nft\_reject\_inet nf\_reject\_ipv4 nf\_reject\_ipv6 nft\_reject        \\
nft\_ct nft\_chain\_nat nf\_nat nf\_conntrack nf\_defrag\_ipv6 nf\_defrag\_ipv4  \\
ip\_set rfkill nf\_tables nfnetlink vfat fat virtio\_balloon drm fuse xfs  \\
libcrc32c crct10dif\_ce ghash\_ce sha2\_ce sha256\_arm64 sha1\_ce virtio\_net \\
net\_failover virtio\_console virtio\_blk failover dimlib virtio\_mmio
CPU: 34 PID: 7578 Comm: test Kdump: loaded Tainted: G W 6.10.0-rc5-gavin+ \#9
Hardware name: QEMU KVM Virtual Machine, BIOS edk2-20240524-1.el9 05/24/2024
pstate: 83400005 (Nzcv daif +PAN -UAO +TCO +DIT -SSBS BTYPE=--)
pc : xas\_split\_alloc+0xf8/0x128
lr : split\_huge\_page\_to\_list\_to\_order+0x1c4/0x720
sp : ffff8000882af5f0
x29: ffff8000882af5f0 x28: ffff8000882af650 x27: ffff8000882af768
x26: 0000000000000cc0 x25: 000000000000000d x24: ffff00010625b858
x23: ffff8000882af650 x22: ffffffdfc0900000 x21: 0000000000000000
x20: 0000000000000000 x19: ffffffdfc0900000 x18: 0000000000000000
x17: 0000000000000000 x16: 0000018000000000 x15: 52f8004000000000
x14: 0000e00000000000 x13: 0000000000002000 x12: 0000000000000020
x11: 52f8000000000000 x10: 52f8e1c0ffff6000 x9 : ffffbeb9619a681c
x8 : 0000000000000003 x7 : 0000000000000000 x6 : ffff00010b02ddb0
x5 : ffffbeb96395e378 x4 : 0000000000000000 x3 : 0000000000000cc0
x2 : 000000000000000d x1 : 000000000000000c x0 : 0000000000000000
Call trace:
 xas\_split\_alloc+0xf8/0x128
 split\_huge\_page\_to\_list\_to\_order+0x1c4/0x720
 truncate\_inode\_partial\_folio+0xdc/0x160
 shmem\_undo\_range+0x2bc/0x6a8
 shmem\_fallocate+0x134/0x430
 vfs\_fallocate+0x124/0x2e8
 ksys\_fallocate+0x4c/0xa0
 \_\_arm64\_sys\_fallocate+0x24/0x38
 invoke\_syscall.constprop.0+0x7c/0xd8
 do\_el0\_svc+0xb4/0xd0
 el0\_svc+0x44/0x1d8
 el0t\_64\_sync\_handler+0x134/0x150
 el0t\_64\_sync+0x17c/0x180

Fix it by disabling PMD-sized page cache when HPAGE\_PMD\_ORDER is larger
than MAX\_PAGECACHE\_ORDER.  As Matthew Wilcox pointed, the page cache in a
shmem file isn't represented by a multi-index entry and doesn't have this
limitation when the xarry entry is split until commit 6b24ca4a1a8d ("mm:
Use multi-index entries in the page cache").

## Affected and fixed versions

- Linux: \>= 6b24ca4a1a8d4ee3221d6d44ddbb99f542e4bda3, \< e991bfc6b69e3db6bdefde34f5d5c9686a192e8f; \>= 6b24ca4a1a8d4ee3221d6d44ddbb99f542e4bda3, \< 93893eacb372b0a4a30f7de6609b08c3ba6c4fd9; \>= 6b24ca4a1a8d4ee3221d6d44ddbb99f542e4bda3, \< cd25208ca9b0097f8e079d692fc678f36fdbc3f9; \>= 6b24ca4a1a8d4ee3221d6d44ddbb99f542e4bda3, \< 9fd154ba926b34c833b7bfc4c14ee2e931b3d743 (cvelist)
- Linux: 5.17 (cvelist)

## Mitigation

- Upgrade Linux to 9fd154ba926b34c833b7bfc4c14ee2e931b3d743 or later.

## Check your systems with an agent

Paste this into a coding agent:

```text
Check whether anything I run is affected by CVE-2024-42241. Work read-only: do not install, upgrade, delete or change anything.

Details: https://flawdb.com/CVE-2024-42241.md
Affected: Linux >= 6b24ca4a1a8d4ee3221d6d44ddbb99f542e4bda3, < e991bfc6b69e3db6bdefde34f5d5c9686a192e8f; >= 6b24ca4a1a8d4ee3221d6d44ddbb99f542e4bda3, < 93893eacb372b0a4a30f7de6609b08c3ba6c4fd9; >= 6b24ca4a1a8d4ee3221d6d44ddbb99f542e4bda3, < cd25208ca9b0097f8e079d692fc678f36fdbc3f9; >= 6b24ca4a1a8d4ee3221d6d4…
Fixed in: Linux 93893eacb372b0a4a30f7de6609b08c3ba6c4fd9, Linux 9fd154ba926b34c833b7bfc4c14ee2e931b3d743

Steps:
1. Search this machine and project for Linux: dependency manifests and lockfiles, installed packages, container images and running services.
2. For each match, note the installed version and whether it is inside the affected range.
3. Report a table: location, installed version, affected (yes / no / unsure), evidence. If affected, say which fixed version or mitigation from the details link applies, but don't apply it.
```

## FAQ

### Is CVE-2024-42241 being exploited?

There is no confirmed exploitation: CVE-2024-42241 is not in the CISA Known Exploited Vulnerabilities catalog. No public exploit code is known. EPSS estimates a 0.31% chance of exploitation in the next 30 days (as of 2026-11-26).

### How serious is CVE-2024-42241?

Medium: CVSS 5.5 (v3.1, scored by NVD). Not remotely exploitable (local or adjacent access needed).

### Which versions are affected by CVE-2024-42241?

Linux \>= 6b24ca4a1a8d4ee3221d6d44ddbb99f542e4bda3, \< e991bfc6b69e3db6bdefde34f5d5c9686a192e8f; \>= 6b24ca4a1a8d4ee3221d6d44ddbb99f542e4bda3, \< 93893eacb372b0a4a30f7de6609b08c3ba6c4fd9; \>= 6b24ca4a1a8d4ee3221d6d44ddbb99f542e4bda3, \< cd25208ca9b0097f8e079d692fc678f36fdbc3f9; \>= 6b24ca4a1a8d4ee3221d6d44ddbb99f542e4bda3, \< 9fd154ba926b34c833b7bfc4c14ee2e931b3d743; Linux 5.17.

### Is there a fix for CVE-2024-42241?

Yes. Fixed in Linux 93893eacb372b0a4a30f7de6609b08c3ba6c4fd9, Linux 9fd154ba926b34c833b7bfc4c14ee2e931b3d743. Upgrade Linux to 9fd154ba926b34c833b7bfc4c14ee2e931b3d743 or later.

### How do I check if I'm affected by CVE-2024-42241?

Find where you use the affected software (dependency lockfiles, installed packages, container images, servers) and compare the installed version with the affected range above. The agent prompt on this page does this read-only.

## References

- patch: <https://git.kernel.org/stable/c/93893eacb372b0a4a30f7de6609b08c3ba6c4fd9>
- patch: <https://git.kernel.org/stable/c/cd25208ca9b0097f8e079d692fc678f36fdbc3f9>
- patch: <https://git.kernel.org/stable/c/9fd154ba926b34c833b7bfc4c14ee2e931b3d743>
- other: <https://git.kernel.org/stable/c/e991bfc6b69e3db6bdefde34f5d5c9686a192e8f>

## Attribution

- CVE Program: CVE® is a registered trademark of The MITRE Corporation. CVE records © 1999–2026 The MITRE Corporation. <https://www.cve.org/Legal/TermsOfUse>
- NVD: This product uses data from the NVD API but is not endorsed or certified by the NVD. <https://nvd.nist.gov/vuln/detail/CVE-2024-42241>

HTML: <https://flawdb.com/CVE-2024-42241> · JSON: <https://flawdb.com/api/v1/entries/CVE-2024-42241>
