CVE-2022-49744: mm/uffd: fix pte marker when fork() without fork event
In the Linux kernel, the following vulnerability has been resolved:
mm/uffd: fix pte marker when fork() without fork event
Patch series "mm: Fixes on pte markers".
Patch 1 resolves the syzkiller report from Pengfei.
Patch 2 further harden pte markers when used with the recent swapin error markers. The major case is we should persist a swapin error marker after fork(), so child shouldn't read a corrupted page.
This patch (of 2):
When fork(), dstvma is not guaranteed to have VMUFFDWP even if src may have it and has pte marker installed. The warning is improper along with the comment. The right thing is to inherit the pte marker when needed, or keep the dst pte empty.
A vague guess is this happened by an accident when there's the prior patch to introduce src/dst vma into this helper during the uffd-wp feature got developed and I probably messed up in the rebase, since if we replace dstvma with srcvma the warning & comment it all makes sense too.
Hugetlb did exactly the right here (copyhugetlbpagerange()). Fix the general path.
Reproducer:
https://github.com/xupengfe/syzkallerlogs/blob/main/221208115556copypagerange/repro.c
Bugzilla report: https://bugzilla.kernel.org/showbug.cgi?id=216808
Affected Software
Remediation
Recommended actions to resolve this vulnerability, in priority order.
- Upgrade
Upgrade
debian/linuxto a version that resolves this vulnerability.Fixed in 6.1.11-1
Event History
Frequently Asked Questions
What is the severity of CVE-2022-49744?
CVE-2022-49744 has a medium severity rating due to its impact on process management in the Linux kernel.
How do I fix CVE-2022-49744?
To fix CVE-2022-49744, you should update to the latest version of the Linux kernel where the vulnerability has been patched.
What systems are affected by CVE-2022-49744?
CVE-2022-49744 affects all versions of the Linux kernel prior to the patched versions that include the fix.
What are the potential risks of not addressing CVE-2022-49744?
Not addressing CVE-2022-49744 may lead to exploitation that could compromise system stability and security.
Is CVE-2022-49744 related to any specific Linux distributions?
CVE-2022-49744 is related to the Linux kernel and may affect any Linux distribution using vulnerable kernel versions.