CVE-2024-56531 ALSA: caiaq: Use snd_card_free_when_closed() at disconnection

High 7.8 Published Updated

A local attacker can cause a system soft lockup and denial of service by triggering a USB disconnect on a device using the ALSA caiaq driver.

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

CVE-2024-56531 is a high-severity denial of service vulnerability in Linux kernel, published on 27 Dec 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:

ALSA: caiaq: Use snd_card_free_when_closed() at disconnection

The USB disconnect callback is supposed to be short and not too-long waiting. OTOH, the current code uses snd_card_free() at disconnection, but this waits for the close of all used fds, hence it can take long. It eventually blocks the upper layer USB ioctls, which may trigger a soft lockup.

An easy workaround is to replace snd_card_free() with snd_card_free_when_closed(). This variant returns immediately while the release of resources is done asynchronously by the card device release at the last close.

This patch also splits the code to the disconnect and the free phases; the former is called immediately at the USB disconnect callback while the latter is called from the card destructor.

Weakness: CWE-667

Which versions are affected by CVE-2024-56531?

It affects 1 product.

Products include Linux kernel.

How do I fix CVE-2024-56531?

Apply the vendor's patch.

Upgrade, then put limits on request size, rate and nesting depth so one client cannot exhaust the service. More about Denial of service.

Is CVE-2024-56531 being exploited?

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

All Linux kernel vulnerabilities

Sources

Also known as BELL-CVE-2024-56531, DEBIAN-CVE-2024-56531, GHSA-gr8x-8q27-r5gg, UBUNTU-CVE-2024-56531.

Is CVE-2024-56531 in your software?

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

Check your SBOMs for free