CVE-2024-50222: iov_iter: fix copy_page_from_iter_atomic() if KMAP_LOCAL_FORCE_MAP
In the Linux kernel, the following vulnerability has been resolved:
ioviter: fix copypagefromiteratomic() if KMAPLOCALFORCEMAP
generic/077 on x8632 CONFIGDEBUGKMAPLOCALFORCEMAP=y with highmem, on huge=always tmpfs, issues a warning and then hangs (interruptibly):
WARNING: CPU: 5 PID: 3517 at mm/highmem.c:622 kunmaplocalindexed+0x62/0xc9 CPU: 5 UID: 0 PID: 3517 Comm: cp Not tainted 6.12.0-rc4 #2 ... copypagefromiteratomic+0xa6/0x5ec genericperformwrite+0xf6/0x1b4 shmemfilewriteiter+0x54/0x67
Fix copypagefromiteratomic() by limiting it in that case (include/linux/skbuff.h skbfragmustloop() does similar).
But going forward, perhaps CONFIGDEBUGKMAPLOCALFORCEMAP is too surprising, has outlived its usefulness, and should just be removed?
Other sources
This CVE was automatically created from a reference found in an email or other text. If you are reading this, then this CVE entry is probably erroneous, since this text should be replaced by the official CVE description automatically.
— Launchpad
Affected Software
Remediation
Recommended actions to resolve this vulnerability, in priority order.
- Upgrade
Upgrade
debian/linuxto a version that resolves this vulnerability.Fixed in 5.10.223-1Fixed in 5.10.234-1Fixed in 6.1.129-1Fixed in 6.1.135-1Fixed in 6.12.22-1Fixed in 6.12.25-1 - Configuration
Fix the issue by limiting copy_page_from_iter_atomic() in the case where CONFIG_DEBUG_KMAP_LOCAL_FORCE_MAP=y on x86_32 with highmem and generic/077, to prevent WARNING at mm/highmem.c:622 (kunmap_local_indexed) and hanging on huge=always tmpfs.
Linux kernel iov_iter / highmem (x86_32) KMAP_LOCAL_FORCE_MAP (CONFIG_DEBUG_KMAP_LOCAL_FORCE_MAP) = if CONFIG_DEBUG_KMAP_LOCAL_FORCE_MAP=y with highmem (generic/077)
Event History
Frequently Asked Questions
What is the severity of CVE-2024-50222?
CVE-2024-50222 is considered a high severity vulnerability due to its potential to cause system hangs and warnings in affected Linux kernels.
How do I fix CVE-2024-50222?
To fix CVE-2024-50222, ensure your system is updated to Linux kernel versions 5.10.223-1, 5.10.226-1, 6.1.123-1, 6.1.128-1, 6.12.12-1, or 6.12.16-1 or later.
Which systems are affected by CVE-2024-50222?
CVE-2024-50222 affects Linux kernel versions between 6.7 and 6.6.60, along with specific configurations like CONFIG_DEBUG_KMAP_LOCAL_FORCE_MAP.
Is there a workaround for CVE-2024-50222?
Currently, the most effective mitigation for CVE-2024-50222 is to update to the latest fixed kernel version.
What can happen if CVE-2024-50222 is exploited?
Exploitation of CVE-2024-50222 can lead to system instability, causing hangs and interruptions during operations on affected systems.