media: cobalt: Avoid freeing ALSA private data twice
Linux
Affected versions
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
|
Linux
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
|
≥ 85756a069c55e0315ac5990806899cfb607b987f · < cb1218da234ea15fa14d90e2d049d686874d7aa3| No fix yet |
| Linux Linux |
|
|
In the Linux kernel, the following vulnerability has been resolved:
media: cobalt: Avoid freeing ALSA private data twice
snd_cobalt_card_create() stores cobsc in sc->private_data and installs snd_cobalt_card_private_free() as sc->private_free. From that point, snd_card_free(sc) releases cobsc through the ALSA card cleanup path.
If cobalt_alsa_init() fails after snd_cobalt_card_create(), the err_exit_free path calls snd_card_free(sc) and then kfree(cobsc). That second free releases the same object again.
Remove the explicit kfree(cobsc) and leave ownership with the ALSA card.
This issue was found by a static analysis checker and confirmed by manual source review.
From the CVE record · Linux
The Linux kernel's cobalt ALSA initialization path can free the same private data twice if initialization fails after the sound card is created. The input does not establish whether an attacker can trigger this failure or specify network access, authentication, or user-interaction requirements.
Engineers running Linux kernels with the cobalt media driver should check their versions; affected versions were not provided.