{"id":"CVE-2024-50222","state":"PUBLISHED","title":"iov_iter: fix copy_page_from_iter_atomic() if KMAP_LOCAL_FORCE_MAP","description":"In the Linux kernel, the following vulnerability has been resolved:\n\niov_iter: fix copy_page_from_iter_atomic() if KMAP_LOCAL_FORCE_MAP\n\ngeneric/077 on x86_32 CONFIG_DEBUG_KMAP_LOCAL_FORCE_MAP=y with highmem,\non huge=always tmpfs, issues a warning and then hangs (interruptibly):\n\nWARNING: CPU: 5 PID: 3517 at mm/highmem.c:622 kunmap_local_indexed+0x62/0xc9\nCPU: 5 UID: 0 PID: 3517 Comm: cp Not tainted 6.12.0-rc4 #2\n...\ncopy_page_from_iter_atomic+0xa6/0x5ec\ngeneric_perform_write+0xf6/0x1b4\nshmem_file_write_iter+0x54/0x67\n\nFix copy_page_from_iter_atomic() by limiting it in that case\n(include/linux/skbuff.h skb_frag_must_loop() does similar).\n\nBut going forward, perhaps CONFIG_DEBUG_KMAP_LOCAL_FORCE_MAP is too\nsurprising, has outlived its usefulness, and should just be removed?","publishedAt":"2024-11-09T10:14:33.266Z","updatedAt":"2026-08-05T11:42:36.871Z","severity":{"score":7,"label":"High","version":"3.1","vector":"CVSS:3.1/AV:L/AC:H/PR:L/UI:N/S:U/C:H/I:H/A:H","source":"Linux"},"assigner":"Linux","products":["Linux Linux"],"affected":[{"vendor":"Linux","product":"Linux","defaultStatus":"unaffected","versions":[{"version":"908a1ad89466c1febf20bfe0037b84fc66f8a3f8","status":"affected","lessThan":"4f7ffa83fa79dd52efbaef366c850aaaae06a469","versionType":"git"},{"version":"908a1ad89466c1febf20bfe0037b84fc66f8a3f8","status":"affected","lessThan":"3a303409f271dfe0987b8f79595138340497a32d","versionType":"git"},{"version":"908a1ad89466c1febf20bfe0037b84fc66f8a3f8","status":"affected","lessThan":"c749d9b7ebbc5716af7a95f7768634b30d9446ec","versionType":"git"}],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["lib/iov_iter.c"]},{"vendor":"Linux","product":"Linux","defaultStatus":"affected","versions":[{"version":"6.6","status":"affected"},{"version":"0","status":"unaffected","lessThan":"6.6","versionType":"semver"},{"version":"6.6.60","status":"unaffected","lessThanOrEqual":"6.6.*","versionType":"semver"},{"version":"6.11.7","status":"unaffected","lessThanOrEqual":"6.11.*","versionType":"semver"},{"version":"6.12","status":"unaffected","lessThanOrEqual":"*","versionType":"original_commit_for_fix"}],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["lib/iov_iter.c"]}],"references":["https://git.kernel.org/stable/c/4f7ffa83fa79dd52efbaef366c850aaaae06a469","https://git.kernel.org/stable/c/3a303409f271dfe0987b8f79595138340497a32d","https://git.kernel.org/stable/c/c749d9b7ebbc5716af7a95f7768634b30d9446ec"],"weaknesses":[],"ingestedAt":"2026-10-29T20:07:56.516Z","source":{"repository":"CVEProject/cvelistV5","path":"cves/2024/50xxx/CVE-2024-50222.json","commit":"556c9d3a8cd17e218bb8e452ba7cd619a384ff47"},"raw":{"dataType":"CVE_RECORD","dataVersion":"5.2","cveMetadata":{"cveId":"CVE-2024-50222","state":"PUBLISHED","datePublished":"2024-11-09T10:14:33.266Z","dateUpdated":"2026-08-05T11:42:36.871Z","assignerShortName":"Linux","assignerOrgId":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","dateReserved":"2024-10-21T19:36:19.973Z"},"containers":{"cna":{"title":"iov_iter: fix copy_page_from_iter_atomic() if KMAP_LOCAL_FORCE_MAP","descriptions":[{"lang":"en","value":"In the Linux kernel, the following vulnerability has been resolved:\n\niov_iter: fix copy_page_from_iter_atomic() if KMAP_LOCAL_FORCE_MAP\n\ngeneric/077 on x86_32 CONFIG_DEBUG_KMAP_LOCAL_FORCE_MAP=y with highmem,\non huge=always tmpfs, issues a warning and then hangs (interruptibly):\n\nWARNING: CPU: 5 PID: 3517 at mm/highmem.c:622 kunmap_local_indexed+0x62/0xc9\nCPU: 5 UID: 0 PID: 3517 Comm: cp Not tainted 6.12.0-rc4 #2\n...\ncopy_page_from_iter_atomic+0xa6/0x5ec\ngeneric_perform_write+0xf6/0x1b4\nshmem_file_write_iter+0x54/0x67\n\nFix copy_page_from_iter_atomic() by limiting it in that case\n(include/linux/skbuff.h skb_frag_must_loop() does similar).\n\nBut going forward, perhaps CONFIG_DEBUG_KMAP_LOCAL_FORCE_MAP is too\nsurprising, has outlived its usefulness, and should just be removed?"}],"affected":[{"vendor":"Linux","product":"Linux","defaultStatus":"unaffected","versions":[{"version":"908a1ad89466c1febf20bfe0037b84fc66f8a3f8","status":"affected","lessThan":"4f7ffa83fa79dd52efbaef366c850aaaae06a469","versionType":"git"},{"version":"908a1ad89466c1febf20bfe0037b84fc66f8a3f8","status":"affected","lessThan":"3a303409f271dfe0987b8f79595138340497a32d","versionType":"git"},{"version":"908a1ad89466c1febf20bfe0037b84fc66f8a3f8","status":"affected","lessThan":"c749d9b7ebbc5716af7a95f7768634b30d9446ec","versionType":"git"}],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["lib/iov_iter.c"]},{"vendor":"Linux","product":"Linux","defaultStatus":"affected","versions":[{"version":"6.6","status":"affected"},{"version":"0","status":"unaffected","lessThan":"6.6","versionType":"semver"},{"version":"6.6.60","status":"unaffected","lessThanOrEqual":"6.6.*","versionType":"semver"},{"version":"6.11.7","status":"unaffected","lessThanOrEqual":"6.11.*","versionType":"semver"},{"version":"6.12","status":"unaffected","lessThanOrEqual":"*","versionType":"original_commit_for_fix"}],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["lib/iov_iter.c"]}],"references":[{"url":"https://git.kernel.org/stable/c/4f7ffa83fa79dd52efbaef366c850aaaae06a469"},{"url":"https://git.kernel.org/stable/c/3a303409f271dfe0987b8f79595138340497a32d"},{"url":"https://git.kernel.org/stable/c/c749d9b7ebbc5716af7a95f7768634b30d9446ec"}],"metrics":[{"cvssV3_1":{"version":"3.1","vectorString":"CVSS:3.1/AV:L/AC:H/PR:L/UI:N/S:U/C:H/I:H/A:H","baseScore":7,"baseSeverity":"HIGH"},"scenarios":[{"lang":"en","value":"AV:L - The vulnerable code is reached through a local `write(2)` syscall on a regular file (`shmem_file_write_iter`/`generic_perform_write` → `copy_folio_from_iter_atomic`), not through any network-facing protocol handler. Exploitation requires the ability to issue write syscalls on the target system.\nAC:H - The defect exists only when the kernel is built with CONFIG_DEBUG_KMAP_LOCAL_FORCE_MAP=y — with that option off the pre-fix and post-fix code are identical — and it is a DEBUG_KERNEL-gated x86 debug option explicitly documented \"Disable this for production systems!\", absent from production and distro kernels. The build configuration of the target, plus the need for a large-folio-backed mapping, are conditions the attacker cannot influence.\nPR:L - Any unprivileged local user with write access to a file on a large-folio-capable filesystem (e.g. /dev/shm on huge tmpfs, XFS, bcachefs) can trigger it; no capabilities, namespaces, or mount privileges are required.\nUI:N - The attacker triggers the overrun entirely from its own write syscall with attacker-chosen file offset and length; no action by another user is needed.\nS:U - The out-of-bounds write and the resulting corruption are confined to kernel memory managed by the same kernel security authority, with no crossing of a VM, IOMMU, or sandbox boundary.\nC:H - Overrunning the single-page kmap slot corrupts adjacent live kmap_local mappings of arbitrary kernel pages, and the short-copy path leaves the folio marked uptodate over a range never written in place, exposing stale page-cache contents to a subsequent read — a memory-corruption primitive leveragable for kernel information disclosure.\nI:H - Attacker-controlled data is copied past the end of the one-page temporary mapping at an attacker-influenced offset (up to the full folio size), writing into other CPUs' and outer-nested kmap_local fixmap slots and thereby modifying unrelated kernel-mapped pages.\nA:H - The reported outcome is a WARN at mm/highmem.c:622 followed by an interruptible hang, as `generic_perform_write` retries indefinitely on the zero-length copy; unmapped neighbouring fixmap PTEs and the mismatched kunmap index leave stale mappings that can also oops the kernel."}]}],"providerMetadata":{"shortName":"Linux","orgId":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","dateUpdated":"2026-08-05T11:42:36.871Z"},"cpeApplicability":[{"nodes":[{"operator":"OR","negate":false,"cpeMatch":[{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"6.6","versionEndExcluding":"6.6.60"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"6.6","versionEndExcluding":"6.11.7"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"6.6","versionEndExcluding":"6.12"}]}]}],"x_generator":{"engine":"bippy-1.2.0"}},"adp":[{"title":"CISA ADP Vulnrichment","metrics":[{"cvssV3_1":{"scope":"UNCHANGED","version":"3.1","baseScore":7.8,"attackVector":"LOCAL","baseSeverity":"HIGH","vectorString":"CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H","integrityImpact":"HIGH","userInteraction":"NONE","attackComplexity":"LOW","availabilityImpact":"HIGH","privilegesRequired":"LOW","confidentialityImpact":"HIGH"}},{"other":{"type":"ssvc","content":{"id":"CVE-2024-50222","role":"CISA Coordinator","options":[{"Exploitation":"none"},{"Automatable":"no"},{"Technical Impact":"total"}],"version":"2.0.3","timestamp":"2025-10-01T20:17:05.945317Z"}}}],"problemTypes":[{"descriptions":[{"lang":"en","type":"CWE","description":"CWE-noinfo Not enough information"}]}],"providerMetadata":{"shortName":"CISA-ADP","orgId":"134c704f-9b21-4f2e-91b3-4a467353bcc0","dateUpdated":"2025-10-01T20:27:05.080Z"}}]}}}