# CVE-2024-53219: virtiofs: use pages instead of pointer for kernel direct IO

> 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, CNA) `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.30% (percentile 15, 2026-11-28)
- **Published:** 2024-12-27T13:50:04.550Z
- **Modified:** 2026-10-21T13:17:51.497Z

## Who should check

- Anyone running Linux \>= a62a8ef9d97da23762a588592c8b8eb50a8deb6a, \< 0015d54a47995867781224450525e60a1a0077ab; \>= a62a8ef9d97da23762a588592c8b8eb50a8deb6a, \< 9a8fde56d4b6d51930936ed50f6370a9097328d1; \>= a62a8ef9d97da23762a588592c8b8eb50a8deb6a, \< 2bc07714dc955a91d2923a440ea02c3cb3376b10; \>= a62a8ef9d97da23762a588592c8b8eb50a8deb6a, \< 41748675c0bf252b3c5f600a95830f0936d366c1
- Anyone running Linux 5.4

## Description

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

virtiofs: use pages instead of pointer for kernel direct IO

When trying to insert a 10MB kernel module kept in a virtio-fs with cache
disabled, the following warning was reported:

  ------------\[ cut here \]------------
  WARNING: CPU: 1 PID: 404 at mm/page\_alloc.c:4551 ......
  Modules linked in:
  CPU: 1 PID: 404 Comm: insmod Not tainted 6.9.0-rc5+ \#123
  Hardware name: QEMU Standard PC (i440FX + PIIX, 1996) ......
  RIP: 0010:\_\_alloc\_pages+0x2bf/0x380
  ......
  Call Trace:
   \<TASK\>
   ? \_\_warn+0x8e/0x150
   ? \_\_alloc\_pages+0x2bf/0x380
   \_\_kmalloc\_large\_node+0x86/0x160
   \_\_kmalloc+0x33c/0x480
   virtio\_fs\_enqueue\_req+0x240/0x6d0
   virtio\_fs\_wake\_pending\_and\_unlock+0x7f/0x190
   queue\_request\_and\_unlock+0x55/0x60
   fuse\_simple\_request+0x152/0x2b0
   fuse\_direct\_io+0x5d2/0x8c0
   fuse\_file\_read\_iter+0x121/0x160
   \_\_kernel\_read+0x151/0x2d0
   kernel\_read+0x45/0x50
   kernel\_read\_file+0x1a9/0x2a0
   init\_module\_from\_file+0x6a/0xe0
   idempotent\_init\_module+0x175/0x230
   \_\_x64\_sys\_finit\_module+0x5d/0xb0
   x64\_sys\_call+0x1c3/0x9e0
   do\_syscall\_64+0x3d/0xc0
   entry\_SYSCALL\_64\_after\_hwframe+0x4b/0x53
   ......
   \</TASK\>
  ---\[ end trace 0000000000000000 \]---

The warning is triggered as follows:

1) syscall finit\_module() handles the module insertion and it invokes
kernel\_read\_file() to read the content of the module first.

2) kernel\_read\_file() allocates a 10MB buffer by using vmalloc() and
passes it to kernel\_read(). kernel\_read() constructs a kvec iter by
using iov\_iter\_kvec() and passes it to fuse\_file\_read\_iter().

3) virtio-fs disables the cache, so fuse\_file\_read\_iter() invokes
fuse\_direct\_io(). As for now, the maximal read size for kvec iter is
only limited by fc-\>max\_read. For virtio-fs, max\_read is UINT\_MAX, so
fuse\_direct\_io() doesn't split the 10MB buffer. It saves the address and
the size of the 10MB-sized buffer in out\_args\[0\] of a fuse request and
passes the fuse request to virtio\_fs\_wake\_pending\_and\_unlock().

4) virtio\_fs\_wake\_pending\_and\_unlock() uses virtio\_fs\_enqueue\_req() to
queue the request. Because virtiofs need DMA-able address, so
virtio\_fs\_enqueue\_req() uses kmalloc() to allocate a bounce buffer for
all fuse args, copies these args into the bounce buffer and passed the
physical address of the bounce buffer to virtiofsd. The total length of
these fuse args for the passed fuse request is about 10MB, so
copy\_args\_to\_argbuf() invokes kmalloc() with a 10MB size parameter and
it triggers the warning in \_\_alloc\_pages():

	if (WARN\_ON\_ONCE\_GFP(order \> MAX\_PAGE\_ORDER, gfp))
		return NULL;

5) virtio\_fs\_enqueue\_req() will retry the memory allocation in a
kworker, but it won't help, because kmalloc() will always return NULL
due to the abnormal size and finit\_module() will hang forever.

A feasible solution is to limit the value of max\_read for virtio-fs, so
the length passed to kmalloc() will be limited. However it will affect
the maximal read size for normal read. And for virtio-fs write initiated
from kernel, it has the similar problem but now there is no way to limit
fc-\>max\_write in kernel.

So instead of limiting both the values of max\_read and max\_write in
kernel, introducing use\_pages\_for\_kvec\_io in fuse\_conn and setting it as
true in virtiofs. When use\_pages\_for\_kvec\_io is enabled, fuse will use
pages instead of pointer to pass the KVEC\_IO data.

After switching to pages for KVEC\_IO data, these pages will be used for
DMA through virtio-fs. If these pages are backed by vmalloc(),
{flush\|invalidate}\_kernel\_vmap\_range() are necessary to flush or
invalidate the cache before the DMA operation. So add two new fields in
fuse\_args\_pages to record the base address of vmalloc area and the
condition indicating whether invalidation is needed. Perform the flush
in fuse\_get\_user\_pages() for write operations and the invalidation in
fuse\_release\_user\_pages() for read operations.

It may seem necessary to introduce another fie
---truncated---

## Affected and fixed versions

- Linux: \>= a62a8ef9d97da23762a588592c8b8eb50a8deb6a, \< 0015d54a47995867781224450525e60a1a0077ab; \>= a62a8ef9d97da23762a588592c8b8eb50a8deb6a, \< 9a8fde56d4b6d51930936ed50f6370a9097328d1; \>= a62a8ef9d97da23762a588592c8b8eb50a8deb6a, \< 2bc07714dc955a91d2923a440ea02c3cb3376b10; \>= a62a8ef9d97da23762a588592c8b8eb50a8deb6a, \< 41748675c0bf252b3c5f600a95830f0936d366c1 (cvelist)
- Linux: 5.4 (cvelist)

## Mitigation

- Upgrade Linux to 41748675c0bf252b3c5f600a95830f0936d366c1 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-53219. Work read-only: do not install, upgrade, delete or change anything.

Details: https://flawdb.com/CVE-2024-53219.md
Affected: Linux >= a62a8ef9d97da23762a588592c8b8eb50a8deb6a, < 0015d54a47995867781224450525e60a1a0077ab; >= a62a8ef9d97da23762a588592c8b8eb50a8deb6a, < 9a8fde56d4b6d51930936ed50f6370a9097328d1; >= a62a8ef9d97da23762a588592c8b8eb50a8deb6a, < 2bc07714dc955a91d2923a440ea02c3cb3376b10; >= a62a8ef9d97da23762a5885…
Fixed in: Linux 0015d54a47995867781224450525e60a1a0077ab, Linux 9a8fde56d4b6d51930936ed50f6370a9097328d1, Linux 2bc07714dc955a91d2923a440ea02c3cb3376b10, Linux 41748675c0bf252b3c5f600a95830f0936d366c1

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-53219 being exploited?

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

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

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

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

Linux \>= a62a8ef9d97da23762a588592c8b8eb50a8deb6a, \< 0015d54a47995867781224450525e60a1a0077ab; \>= a62a8ef9d97da23762a588592c8b8eb50a8deb6a, \< 9a8fde56d4b6d51930936ed50f6370a9097328d1; \>= a62a8ef9d97da23762a588592c8b8eb50a8deb6a, \< 2bc07714dc955a91d2923a440ea02c3cb3376b10; \>= a62a8ef9d97da23762a588592c8b8eb50a8deb6a, \< 41748675c0bf252b3c5f600a95830f0936d366c1; Linux 5.4.

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

Yes. Fixed in Linux 0015d54a47995867781224450525e60a1a0077ab, Linux 9a8fde56d4b6d51930936ed50f6370a9097328d1, Linux 2bc07714dc955a91d2923a440ea02c3cb3376b10, Linux 41748675c0bf252b3c5f600a95830f0936d366c1. Upgrade Linux to 41748675c0bf252b3c5f600a95830f0936d366c1 or later.

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

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/9a8fde56d4b6d51930936ed50f6370a9097328d1>
- patch: <https://git.kernel.org/stable/c/2bc07714dc955a91d2923a440ea02c3cb3376b10>
- patch: <https://git.kernel.org/stable/c/41748675c0bf252b3c5f600a95830f0936d366c1>
- other: <https://git.kernel.org/stable/c/0015d54a47995867781224450525e60a1a0077ab>

## 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-53219>

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