CVE-2024-26775 aoe: avoid potential deadlock at set_capacity

Medium 5.5 Published Updated

A race condition in the Linux kernel AOE driver can cause a deadlock, leading to a 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-26775?

CVE-2024-26775 is a medium-severity 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:

aoe: avoid potential deadlock at set_capacity

Move set_capacity() outside of the section procected by (&d->lock). To avoid possible interrupt unsafe locking scenario:

CPU0 CPU1 ---- ---- [1] lock(&bdev->bd_size_lock); local_irq_disable(); [2] lock(&d->lock); [3] lock(&bdev->bd_size_lock); <Interrupt> [4] lock(&d->lock);

*** DEADLOCK ***

Where [1](&bdev->bd_size_lock) hold by zram_add()->set_capacity(). [2]lock(&d->lock) hold by aoeblk_gdalloc(). And aoeblk_gdalloc() is trying to acquire [3](&bdev->bd_size_lock) at set_capacity() call. In this situation an attempt to acquire [4]lock(&d->lock) from aoecmd_cfg_rsp() will lead to deadlock.

So the simplest solution is breaking lock dependency [2](&d->lock) -> [3](&bdev->bd_size_lock) by moving set_capacity() outside.

Weakness: CWE-667

Which versions are affected by CVE-2024-26775?

It affects 1 product.

Products include Linux kernel.

How do I fix CVE-2024-26775?

Apply the vendor's patch.

Is CVE-2024-26775 being exploited?

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

All Linux kernel vulnerabilities

Sources

Also known as AZL-54978, BELL-CVE-2024-26775, DEBIAN-CVE-2024-26775, GHSA-86m3-4q38-6prj, ROOT-OS-DEBIAN-11-CVE-2024-26775, ROOT-OS-UBUNTU-2204-CVE-2024-26775 and 1 more.

Is CVE-2024-26775 in your software?

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

Check your SBOMs for free