CVE-2024-26846 nvme-fc: do not wait in vain when unloading module

Medium 4.4 Published Updated

A race condition in the Linux kernel NVMe FC module unload path can cause a system hang, leading to denial of service.

Exploited in the wild
Not known
Login needed
An administrator
Attackable
Local or same network only
Victim action needed
Not needed
Fix
Available

What is CVE-2024-26846?

CVE-2024-26846 is a medium-severity vulnerability in Debian Debian Linux, published on 17 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:

nvme-fc: do not wait in vain when unloading module

The module exit path has race between deleting all controllers and freeing 'left over IDs'. To prevent double free a synchronization between nvme_delete_ctrl and ida_destroy has been added by the initial commit.

There is some logic around trying to prevent from hanging forever in wait_for_completion, though it does not handling all cases. E.g. blktests is able to reproduce the situation where the module unload hangs forever.

If we completely rely on the cleanup code executed from the nvme_delete_ctrl path, all IDs will be freed eventually. This makes calling ida_destroy unnecessary. We only have to ensure that all nvme_delete_ctrl code has been executed before we leave nvme_fc_exit_module. This is done by flushing the nvme_delete_wq workqueue.

While at it, remove the unused nvme_fc_wq workqueue too.

Weakness: CWE-415

Which versions are affected by CVE-2024-26846?

It affects 2 products.

Products include Debian Debian Linux, Linux kernel.

How do I fix CVE-2024-26846?

Apply the vendor's patch.

Is CVE-2024-26846 being exploited?

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

All Debian Debian Linux vulnerabilities

Sources

Also known as BELL-CVE-2024-26846, DEBIAN-CVE-2024-26846, GHSA-mvgr-2rgh-283w, UBUNTU-CVE-2024-26846.

Is CVE-2024-26846 in your software?

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

Check your SBOMs for free