CVE-2024-39491 ALSA: hda: cs35l56: Fix lifetime of cs_dsp instance

Medium 5.5 Published Updated

A use-after-free vulnerability in the Linux kernel's cs35l56 audio driver allows attackers to cause denial of service or execute arbitrary code via improper memory management during driver unbinding.

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

CVE-2024-39491 is a medium-severity use after free vulnerability in Linux kernel, published on 10 Jul 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: hda: cs35l56: Fix lifetime of cs_dsp instance

The cs_dsp instance is initialized in the driver probe() so it should be freed in the driver remove(). Also fix a missing call to cs_dsp_remove() in the error path of cs35l56_hda_common_probe().

The call to cs_dsp_remove() was being done in the component unbind callback cs35l56_hda_unbind(). This meant that if the driver was unbound and then re-bound it would be using an uninitialized cs_dsp instance.

It is best to initialize the cs_dsp instance in probe() so that it can return an error if it fails. The component binding API doesn't have any error handling so there's no way to handle a failure if cs_dsp was initialized in the bind.

Weakness: CWE-908

Which versions are affected by CVE-2024-39491?

It affects 1 product.

Products include Linux kernel.

How do I fix CVE-2024-39491?

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-39491 being exploited?

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

All Linux kernel vulnerabilities

Sources

Also known as BELL-CVE-2024-39491, DEBIAN-CVE-2024-39491, GHSA-wvx8-cjrx-23xg, UBUNTU-CVE-2024-39491.

Is CVE-2024-39491 in your software?

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

Check your SBOMs for free