CVE-2024-38629 dmaengine: idxd: Avoid unnecessary destruction of file_ida

High 7.8 Published Updated

A use-after-free bug in the Linux kernel's idxd driver can cause a kernel panic, leading to denial of service.

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

CVE-2024-38629 is a high-severity use after free vulnerability in Linux kernel, published on 21 Jun 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:

dmaengine: idxd: Avoid unnecessary destruction of file_ida

file_ida is allocated during cdev open and is freed accordingly during cdev release. This sequence is guaranteed by driver file operations. Therefore, there is no need to destroy an already empty file_ida when the WQ cdev is removed.

Worse, ida_free() in cdev release may happen after destruction of file_ida per WQ cdev. This can lead to accessing an id in file_ida after it has been destroyed, resulting in a kernel panic.

Remove ida_destroy(&file_ida) to address these issues.

Weakness: CWE-416

Which versions are affected by CVE-2024-38629?

It affects 1 product.

Products include Linux kernel.

How do I fix CVE-2024-38629?

Apply the vendor's patch.

Upgrade to the fixed version. These bugs are found with fuzzing and sanitisers and avoided by memory-safe languages. More about Use after free.

Is CVE-2024-38629 being exploited?

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

All Linux kernel vulnerabilities

Sources

Also known as BELL-CVE-2024-38629, DEBIAN-CVE-2024-38629, GHSA-7qq6-jg2h-8g2j, UBUNTU-CVE-2024-38629.

Is CVE-2024-38629 in your software?

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

Check your SBOMs for free