# CVE-2021-47461: userfaultfd: fix a race between writeprotect and exit_mmap()

- Severity: High 7.8 (CVSS:3.1, scored by Linux) `CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H`
- Known to be exploited: not in CISA's catalogue, which lists only what CISA has confirmed
- Likelihood of exploitation in the next 30 days (EPSS): 0.17%, higher than 7% of CVEs (2026-12-01)
- Published: 2024-05-22T06:23:22.373Z
- Modified: 2026-08-05T08:47:57.329Z
- Weaknesses: CWE-362
- SSVC (CISA-ADP): exploitation none, automatable no, technical impact partial
- Assigned by: Linux

## Description

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

userfaultfd: fix a race between writeprotect and exit_mmap()

A race is possible when a process exits, its VMAs are removed by
exit_mmap() and at the same time userfaultfd_writeprotect() is called.

The race was detected by KASAN on a development kernel, but it appears
to be possible on vanilla kernels as well.

Use mmget_not_zero() to prevent the race as done in other userfaultfd
operations.

(As written by CVE List.)

## Affected

- Linux Linux: from 63b2d4174c4ad1f40b48d7138e71bcb564c1fe03 before 3cda4bfffd4f755645577aaa9e96a606657b4525; from 63b2d4174c4ad1f40b48d7138e71bcb564c1fe03 before 149958ecd0627a9f1e9c678c25c665400054cd6a; from 63b2d4174c4ad1f40b48d7138e71bcb564c1fe03 before cb185d5f1ebf900f4ae3bf84cee212e6dd035aca; 5.7 (not affected: before 5.7; from 5.10.76 up to 5.10.*; from 5.14.15 up to 5.14.*; from 5.15 up to *)
- linux linux_kernel: from 5.7 before 5.10.76; from 5.11 before 5.14.15; 5.15

## Every score

- Linux: CVSS:3.1 7.8 High `CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H`
- NVD: CVSS:3.1 4.7 Medium `CVSS:3.1/AV:L/AC:H/PR:L/UI:N/S:U/C:N/I:N/A:H`

## References

- <https://git.kernel.org/stable/c/3cda4bfffd4f755645577aaa9e96a606657b4525> (patch)
- <https://git.kernel.org/stable/c/149958ecd0627a9f1e9c678c25c665400054cd6a> (patch)
- <https://git.kernel.org/stable/c/cb185d5f1ebf900f4ae3bf84cee212e6dd035aca> (patch)

## Sources

- CVE List: [CVE-2021-47461](https://www.cve.org/CVERecord?id=CVE-2021-47461), CVE Terms of Use, modified 2026-08-05
- NVD: [CVE-2021-47461](https://nvd.nist.gov/vuln/detail/CVE-2021-47461), Public domain, modified 2026-08-04

---

Page: https://cve.day/CVE-2021-47461 · Whole record: https://cve.day/CVE-2021-47461.json · Rebuilt by cve.day 2026-11-25T22:58:08.870Z
