# CVE-2024-44943: mm: gup: stop abusing try\_grab\_folio

> 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.27% (percentile 12, 2026-11-26)
- **Published:** 2024-08-28T07:11:49.623Z
- **Modified:** 2026-06-17T07:53:16.557Z

## Who should check

- Anyone running Linux \>= 57edfcfd3419b4799353d8cbd6ce49da075cfdbd, \< 26273f5f4cf68b29414e403837093408a9c98e1f; \>= 57edfcfd3419b4799353d8cbd6ce49da075cfdbd, \< f442fa6141379a20b48ae3efabee827a3d260787
- Anyone running Linux 6.6

## Description

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

mm: gup: stop abusing try\_grab\_folio

A kernel warning was reported when pinning folio in CMA memory when
launching SEV virtual machine.  The splat looks like:

\[  464.325306\] WARNING: CPU: 13 PID: 6734 at mm/gup.c:1313 \_\_get\_user\_pages+0x423/0x520
\[  464.325464\] CPU: 13 PID: 6734 Comm: qemu-kvm Kdump: loaded Not tainted 6.6.33+ \#6
\[  464.325477\] RIP: 0010:\_\_get\_user\_pages+0x423/0x520
\[  464.325515\] Call Trace:
\[  464.325520\]  \<TASK\>
\[  464.325523\]  ? \_\_get\_user\_pages+0x423/0x520
\[  464.325528\]  ? \_\_warn+0x81/0x130
\[  464.325536\]  ? \_\_get\_user\_pages+0x423/0x520
\[  464.325541\]  ? report\_bug+0x171/0x1a0
\[  464.325549\]  ? handle\_bug+0x3c/0x70
\[  464.325554\]  ? exc\_invalid\_op+0x17/0x70
\[  464.325558\]  ? asm\_exc\_invalid\_op+0x1a/0x20
\[  464.325567\]  ? \_\_get\_user\_pages+0x423/0x520
\[  464.325575\]  \_\_gup\_longterm\_locked+0x212/0x7a0
\[  464.325583\]  internal\_get\_user\_pages\_fast+0xfb/0x190
\[  464.325590\]  pin\_user\_pages\_fast+0x47/0x60
\[  464.325598\]  sev\_pin\_memory+0xca/0x170 \[kvm\_amd\]
\[  464.325616\]  sev\_mem\_enc\_register\_region+0x81/0x130 \[kvm\_amd\]

Per the analysis done by yangge, when starting the SEV virtual machine, it
will call pin\_user\_pages\_fast(..., FOLL\_LONGTERM, ...) to pin the memory. 
But the page is in CMA area, so fast GUP will fail then fallback to the
slow path due to the longterm pinnalbe check in try\_grab\_folio().

The slow path will try to pin the pages then migrate them out of CMA area.
But the slow path also uses try\_grab\_folio() to pin the page, it will
also fail due to the same check then the above warning is triggered.

In addition, the try\_grab\_folio() is supposed to be used in fast path and
it elevates folio refcount by using add ref unless zero.  We are guaranteed
to have at least one stable reference in slow path, so the simple atomic add
could be used.  The performance difference should be trivial, but the
misuse may be confusing and misleading.

Redefined try\_grab\_folio() to try\_grab\_folio\_fast(), and try\_grab\_page()
to try\_grab\_folio(), and use them in the proper paths.  This solves both
the abuse and the kernel warning.

The proper naming makes their usecase more clear and should prevent from
abusing in the future.

peterx said:

: The user will see the pin fails, for gpu-slow it further triggers the WARN
: right below that failure (as in the original report):
: 
:         folio = try\_grab\_folio(page, page\_increm - 1,
:                                 foll\_flags);
:         if (WARN\_ON\_ONCE(!folio)) { \<------------------------ here
:                 /\*
:                         \* Release the 1st page ref if the
:                         \* folio is problematic, fail hard.
:                         \*/
:                 gup\_put\_folio(page\_folio(page), 1,
:                                 foll\_flags);
:                 ret = -EFAULT;
:                 goto out;
:         }

\[1\] https://lore.kernel.org/linux-mm/1719478388-31917-1-git-send-email-yangge1116@126.com/

\[shy828301@gmail.com: fix implicit declaration of function try\_grab\_folio\_fast\]

## Affected and fixed versions

- Linux: \>= 57edfcfd3419b4799353d8cbd6ce49da075cfdbd, \< 26273f5f4cf68b29414e403837093408a9c98e1f; \>= 57edfcfd3419b4799353d8cbd6ce49da075cfdbd, \< f442fa6141379a20b48ae3efabee827a3d260787 (cvelist)
- Linux: 6.6 (cvelist)

## Mitigation

- No fix listed yet: follow the vendor advisory.

## Check your systems with an agent

Paste this into a coding agent:

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

Details: https://flawdb.com/CVE-2024-44943.md
Affected: Linux >= 57edfcfd3419b4799353d8cbd6ce49da075cfdbd, < 26273f5f4cf68b29414e403837093408a9c98e1f; >= 57edfcfd3419b4799353d8cbd6ce49da075cfdbd, < f442fa6141379a20b48ae3efabee827a3d260787; Linux 6.6
Fixed in: Linux 26273f5f4cf68b29414e403837093408a9c98e1f

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

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

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

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

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

Linux \>= 57edfcfd3419b4799353d8cbd6ce49da075cfdbd, \< 26273f5f4cf68b29414e403837093408a9c98e1f; \>= 57edfcfd3419b4799353d8cbd6ce49da075cfdbd, \< f442fa6141379a20b48ae3efabee827a3d260787; Linux 6.6.

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

Yes. Fixed in Linux 26273f5f4cf68b29414e403837093408a9c98e1f. No fix listed yet: follow the vendor advisory.

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

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/26273f5f4cf68b29414e403837093408a9c98e1f>
- patch: <https://git.kernel.org/stable/c/f442fa6141379a20b48ae3efabee827a3d260787>

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

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