{"id":"CVE-2024-36943","summary":"fs/proc/task_mmu: fix loss of young/dirty bits during pagemap scan","details":"In the Linux kernel, the following vulnerability has been resolved:\n\nfs/proc/task_mmu: fix loss of young/dirty bits during pagemap scan\n\nmake_uffd_wp_pte() was previously doing:\n\n  pte = ptep_get(ptep);\n  ptep_modify_prot_start(ptep);\n  pte = pte_mkuffd_wp(pte);\n  ptep_modify_prot_commit(ptep, pte);\n\nBut if another thread accessed or dirtied the pte between the first 2\ncalls, this could lead to loss of that information.  Since\nptep_modify_prot_start() gets and clears atomically, the following is the\ncorrect pattern and prevents any possible race.  Any access after the\nfirst call would see an invalid pte and cause a fault:\n\n  pte = ptep_modify_prot_start(ptep);\n  pte = pte_mkuffd_wp(pte);\n  ptep_modify_prot_commit(ptep, pte);","modified":"2026-04-02T12:16:35.603600Z","published":"2024-05-30T15:35:42.119Z","database_specific":{"cna_assigner":"Linux","osv_generated_from":"https://github.com/CVEProject/cvelistV5/tree/main/cves/2024/36xxx/CVE-2024-36943.json"},"references":[{"type":"WEB","url":"https://git.kernel.org/stable/c/74b3d66f91d9f539f99faad74d796fa9a389a015"},{"type":"WEB","url":"https://git.kernel.org/stable/c/c70dce4982ce1718bf978a35f8e26160b82081f4"},{"type":"ADVISORY","url":"https://github.com/CVEProject/cvelistV5/tree/main/cves/2024/36xxx/CVE-2024-36943.json"},{"type":"ADVISORY","url":"https://nvd.nist.gov/vuln/detail/CVE-2024-36943"},{"type":"PACKAGE","url":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git"}],"affected":[{"ranges":[{"type":"GIT","repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","events":[{"introduced":"52526ca7fdb905a768a93f8faa418e9b988fc34b"},{"fixed":"74b3d66f91d9f539f99faad74d796fa9a389a015"},{"fixed":"c70dce4982ce1718bf978a35f8e26160b82081f4"}]}],"database_specific":{"source":"https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2024-36943.json"}}],"schema_version":"1.7.5"}