CVE-2023-52736 ALSA: hda: Do not unset preset when cleaning up codec

Medium 5.5 Published Updated

A null pointer dereference in the Linux kernel ALSA HDA driver can cause a system crash during module reload scenarios.

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-2023-52736?

CVE-2023-52736 is a medium-severity vulnerability in Linux kernel, published on 21 May 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: Do not unset preset when cleaning up codec

Several functions that take part in codec's initialization and removal are re-used by ASoC codec drivers implementations. Drivers mimic the behavior of hda_codec_driver_probe/remove() found in sound/pci/hda/hda_bind.c with their component->probe/remove() instead.

One of the reasons for that is the expectation of snd_hda_codec_device_new() to receive a valid pointer to an instance of struct snd_card. This expectation can be met only once sound card components probing commences.

As ASoC sound card may be unbound without codec device being actually removed from the system, unsetting ->preset in snd_hda_codec_cleanup_for_unbind() interferes with module unload -> load scenario causing null-ptr-deref. Preset is assigned only once, during device/driver matching whereas ASoC codec driver's module reloading may occur several times throughout the lifetime of an audio stack.

Weakness: CWE-476

Which versions are affected by CVE-2023-52736?

It affects 1 product.

Products include Linux kernel.

How do I fix CVE-2023-52736?

Apply the vendor's patch.

Is CVE-2023-52736 being exploited?

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

All Linux kernel vulnerabilities

Sources

Also known as BELL-CVE-2023-52736, DEBIAN-CVE-2023-52736, GHSA-gpvh-jcjq-x69v, UBUNTU-CVE-2023-52736.

Is CVE-2023-52736 in your software?

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

Check your SBOMs for free