CVE-2024-36943 fs/proc/task_mmu: fix loss of young/dirty bits during pagemap scan

High 7.3 Published Updated

A race condition in the Linux kernel pagemap scan can cause loss of young/dirty bits, potentially leading to incorrect memory state tracking or information disclosure.

Exploited in the wild
Not known
Login needed
Any signed-in user
Attackable
Local or same network only
Victim action needed
Not needed
Fix
Available

What is CVE-2024-36943?

CVE-2024-36943 is a high-severity vulnerability in Linux kernel, published on 30 May 2024. It can only be exploited from the same machine or local network, with no action from the victim.

Official description

In the Linux kernel, the following vulnerability has been resolved:

fs/proc/task_mmu: fix loss of young/dirty bits during pagemap scan

make_uffd_wp_pte() was previously doing:

pte = ptep_get(ptep); ptep_modify_prot_start(ptep); pte = pte_mkuffd_wp(pte); ptep_modify_prot_commit(ptep, pte);

But if another thread accessed or dirtied the pte between the first 2 calls, this could lead to loss of that information. Since ptep_modify_prot_start() gets and clears atomically, the following is the correct pattern and prevents any possible race. Any access after the first call would see an invalid pte and cause a fault:

pte = ptep_modify_prot_start(ptep); pte = pte_mkuffd_wp(pte); ptep_modify_prot_commit(ptep, pte);

Which versions are affected by CVE-2024-36943?

It affects 1 product.

Products include Linux kernel.

How do I fix CVE-2024-36943?

Apply the vendor's patch.

Is CVE-2024-36943 being exploited?

There is no known exploitation of CVE-2024-36943 in the wild and no public exploit code.

All Linux kernel vulnerabilities

Sources

Also known as BELL-CVE-2024-36943, DEBIAN-CVE-2024-36943, UBUNTU-CVE-2024-36943.

Is CVE-2024-36943 in your software?

Upload an SBOM and sbomify checks it against every vulnerability here, every day.

Check your SBOMs for free