NVD Vulnerability Detail
Search Exploit, PoC
CVE-2024-50220
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.

Publication Date Nov. 9, 2024, 8:15 p.m.
Registration Date Nov. 10, 2024, 5:01 a.m.
Last Update Nov. 12, 2024, 10:56 p.m.
Related information, measures and tools
Common Vulnerabilities List

JVN Vulnerability Information
Linux の Linux Kernel における Time-of-check Time-of-use (TOCTOU) 競合状態の脆弱性
Title Linux の Linux Kernel における Time-of-check Time-of-use (TOCTOU) 競合状態の脆弱性
Summary

Linux の Linux Kernel には、Time-of-check Time-of-use (TOCTOU) 競合状態の脆弱性が存在します。

Possible impacts サービス運用妨害 (DoS) 状態にされる可能性があります。 
Solution

ベンダより正式な対策が公開されています。ベンダ情報を参照して適切な対策を実施してください。

Publication Date Oct. 28, 2024, midnight
Registration Date Oct. 16, 2025, 6:10 p.m.
Last Update Oct. 16, 2025, 6:10 p.m.
Affected System
Linux
Linux Kernel 6.12
Linux Kernel 6.8 以上 6.11.7 未満
CVE (情報セキュリティ 共通脆弱性識別子)
CWE (共通脆弱性タイプ一覧)
ベンダー情報
その他
Change Log
No Changed Details Date of change
1 [2025年10月16日]
  掲載
Oct. 16, 2025, 6:09 p.m.