CVE-2022-50229 ALSA: bcd2000: Fix a UAF bug on the error path of probing

High 7.8 Published Updated

A use-after-free bug in the ALSA bcd2000 driver allows attackers to cause a denial of service or potentially execute code via a crafted USB device.

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-2022-50229?

CVE-2022-50229 is a high-severity use after free vulnerability in Linux kernel, published on 18 Jun 2025. 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: bcd2000: Fix a UAF bug on the error path of probing

When the driver fails in snd_card_register() at probe time, it will free the 'bcd2k->midi_out_urb' before killing it, which may cause a UAF bug.

The following log can reveal it:

[ 50.727020] BUG: KASAN: use-after-free in bcd2000_input_complete+0x1f1/0x2e0 [snd_bcd2000] [ 50.727623] Read of size 8 at addr ffff88810fab0e88 by task swapper/4/0 [ 50.729530] Call Trace: [ 50.732899] bcd2000_input_complete+0x1f1/0x2e0 [snd_bcd2000]

Fix this by adding usb_kill_urb() before usb_free_urb().

Weakness: CWE-416

Which versions are affected by CVE-2022-50229?

It affects 1 product.

Products include Linux kernel.

How do I fix CVE-2022-50229?

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-2022-50229 being exploited?

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

All Linux kernel vulnerabilities

Sources

Also known as DEBIAN-CVE-2022-50229, GHSA-74gq-xq9h-vp3g, UBUNTU-CVE-2022-50229.

Is CVE-2022-50229 in your software?

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

Check your SBOMs for free