CVE-2024-26718 dm-crypt, dm-verity: disable tasklets

High 7.8 Published Updated

A memory corruption vulnerability in Linux kernel dm-crypt and dm-verity allows attackers to write to freed memory, potentially leading to code execution or system crashes.

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-26718?

CVE-2024-26718 is a high-severity memory corruption vulnerability in Linux kernel, published on 3 Apr 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:

dm-crypt, dm-verity: disable tasklets

Tasklets have an inherent problem with memory corruption. The function tasklet_action_common calls tasklet_trylock, then it calls the tasklet callback and then it calls tasklet_unlock. If the tasklet callback frees the structure that contains the tasklet or if it calls some code that may free it, tasklet_unlock will write into free memory.

The commits 8e14f610159d and d9a02e016aaf try to fix it for dm-crypt, but it is not a sufficient fix and the data corruption can still happen [1]. There is no fix for dm-verity and dm-verity will write into free memory with every tasklet-processed bio.

There will be atomic workqueues implemented in the kernel 6.9 [2]. They will have better interface and they will not suffer from the memory corruption problem.

But we need something that stops the memory corruption now and that can be backported to the stable kernels. So, I'm proposing this commit that disables tasklets in both dm-crypt and dm-verity. This commit doesn't remove the tasklet support, because the tasklet code will be reused when atomic workqueues will be implemented.

[1] https://lore.kernel.org/all/[email protected]/T/ [2] https://lore.kernel.org/lkml/[email protected]/

Weakness: CWE-787

Which versions are affected by CVE-2024-26718?

It affects 1 product.

Products include Linux kernel.

How do I fix CVE-2024-26718?

Apply the vendor's patch.

Upgrade to the fixed version. Memory-safe languages, compiler hardening and fuzzing prevent most new cases. More about Memory corruption.

Is CVE-2024-26718 being exploited?

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

All Linux kernel vulnerabilities

Sources

Also known as AZL-58746, BELL-CVE-2024-26718, DEBIAN-CVE-2024-26718, GHSA-5qvv-jjxx-82r8, ROOT-OS-DEBIAN-11-CVE-2024-26718, UBUNTU-CVE-2024-26718.

Is CVE-2024-26718 in your software?

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

Check your SBOMs for free