fork: do not invoke uffd on fork if error occurs
Key facts
- Attack vector
- Local
- Privileges required
- Low
- User interaction
- None
- Attack complexity
- High
- Impact type
- —
- Confidentiality · integrity · availability
- None · None · High
- Fix status
- Partial Red Hat: 2 without a fix
Attack profile from CVSS 3.1 · NVD. Fix status from CNA and Red Hat.
Summary
In the Linux kernel, the following vulnerability has been resolved: fork: do not invoke uffd on fork if error occurs Patch series "fork: do not expose incomplete mm on fork". During fork we may place the virtual memory address space into an inconsistent state before the fork operation is complete. In addition, we may encounter an error during the fork operation that indicates that the virtual memory address space is invalidated. As a result, we should not be exposing it in any way to external machinery that might interact with the mm or VMAs, machinery that is not designed to deal with incomplete state. We specifically update the fork logic to defer khugepaged and ksm to the end of the operation and only to be invoked if no error arose, and disallow uffd from observing fork events should an error have occurred. This patch (of 2): Currently on fork we expose the virtual address space of a process to userland unconditionally if uffd is registered in VMAs, regardless of whether an error arose in the fork. This is performed in dup_userfaultfd_complete() which is invoked unconditionally, and performs two duties - invoking registered handlers for the UFFD_EVENT_FORK event via dup_fctx(), and clearing down userfaultfd_fork_ctx objects established in dup_userfaultfd(). This is problematic, because the virtual address space may not yet be correctly initialised if an error arose. The change in commit d24062914837 ("fork: use __mt_dup() to duplicate maple tree in dup_mmap()") makes this more pertinent as we may be in a state where entries in the maple tree are not yet consistent. We address this by, on fork error, ensuring that we roll back state that we would otherwise expect to clean up through the event being handled by userland and perform the memory freeing duty otherwise performed by dup_userfaultfd_complete(). We do this by implementing a new function, dup_userfaultfd_fail(), which performs the same loop, only decrementing reference counts. Note that we perform mmgrab() on the parent and child mm's, however userfaultfd_ctx_put() will mmdrop() this once the reference count drops to zero, so we will avoid memory leaks correctly here.
Why it matters now
SSVC decision points
Not available: CISA has not published SSVC decision points for this record.
Affected products
| Vendor | Product | Affected versions | Fixed in | Status | Source |
|---|---|---|---|---|---|
| Linux | Linux | 6.8 and later | 6.11.7, 6.12 | Patch available | CNA |
- Linux VendorLinux Affected 6.8 and later Fixed in 6.11.7, 6.12 Patch available CNA
CPE configurations NVD · 6
| CPE | Versions | Role | Vendor |
|---|---|---|---|
| cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:* | 6.8 to before 6.11.7 | Vulnerable | Linux |
| cpe:2.3:o:linux:linux_kernel:6.12:rc1:*:*:*:*:*:* | 6.12 rc1 | Vulnerable | Linux |
| cpe:2.3:o:linux:linux_kernel:6.12:rc2:*:*:*:*:*:* | 6.12 rc2 | Vulnerable | Linux |
| cpe:2.3:o:linux:linux_kernel:6.12:rc3:*:*:*:*:*:* | 6.12 rc3 | Vulnerable | Linux |
| cpe:2.3:o:linux:linux_kernel:6.12:rc4:*:*:*:*:*:* | 6.12 rc4 | Vulnerable | Linux |
| cpe:2.3:o:linux:linux_kernel:6.12:rc5:*:*:*:*:*:* | 6.12 rc5 | Vulnerable | Linux |
- cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:* Versions 6.8 to before 6.11.7 Vulnerable ·Linux
- cpe:2.3:o:linux:linux_kernel:6.12:rc1:*:*:*:*:*:* Versions 6.12 rc1 Vulnerable ·Linux
- cpe:2.3:o:linux:linux_kernel:6.12:rc2:*:*:*:*:*:* Versions 6.12 rc2 Vulnerable ·Linux
- cpe:2.3:o:linux:linux_kernel:6.12:rc3:*:*:*:*:*:* Versions 6.12 rc3 Vulnerable ·Linux
- cpe:2.3:o:linux:linux_kernel:6.12:rc4:*:*:*:*:*:* Versions 6.12 rc4 Vulnerable ·Linux
- cpe:2.3:o:linux:linux_kernel:6.12:rc5:*:*:*:*:*:* Versions 6.12 rc5 Vulnerable ·Linux
Remediation
- Fix · CNA Linux (Linux) Fixed in 6.11.7, 6.12
Vendor assessments
Red Hat
Red Hat rating: Moderate. Red Hat's page for this CVE →
| Product | Status | Plan or fix |
|---|---|---|
| Red Hat Enterprise Linux 6 | Affected | No fix planned: Out of support scope |
| Red Hat Enterprise Linux 7 | Affected | No fix planned: Out of support scope |
Not affected: 2 products
- Red Hat Enterprise Linux 8
- Red Hat Enterprise Linux 9
Timeline
- 2026-10-02 Threatist record created from CVE-2024-50220
- 2026-10-03 Alias added: GHSA-cx44-8c8j-5rr2
References
More Linux Kernel vulnerabilities
- TI-2025-26358 tls: fix handling of zero-length records on the rx_list KEVCVSS 3.1CRITICAL 9.8
- TI-2026-38352 netfilter: bridge: make ebt_snat ARP rewrite writable KEVCVSS 3.1HIGH 8.8
- TI-2013-05264 The (1) get_user and (2) put_user API functions in the Linux kernel before 3.5.5 on the… KEVCVSS 3.1HIGH 8.8
- TI-2022-00125 Integer overflow in kernel KEVCVSS 3.1HIGH 8.4
- TI-2013-01864 The perf_swevent_init function in kernel/events/core.c in the Linux kernel before 3.8.9… KEVCVSS 3.1HIGH 8.4
- TI-2021-05514 Heap Out-Of-Bounds Write in Netfilter IP6T_SO_SET_REPLACE KEVCVSS 3.1HIGH 8.3
Sources
- CVE-2024-50220 · CVE Program
- CVE-2024-50220 · NVD
- FIRST EPSS
- GHSA-cx44-8c8j-5rr2 · GitHub Advisory Database · CC BY 4.0
- CVE-2024-50220 · Red Hat security data · CC BY 4.0
This product uses the NVD API but is not endorsed or certified by the NVD. Sources and licences