ASoC: xilinx: formatter_pcm: fix stream_data leak on open error
Linux
Affected versions
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
|
Linux
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
|
≥ 6f6c3c36f0917be24587eeba818ab4fdfcb5465a · < 8b30628dfc2b2fad3b55a9441776a226035045fa| No fix yet |
| Linux Linux |
|
|
In the Linux kernel, the following vulnerability has been resolved:
ASoC: xilinx: formatter_pcm: fix stream_data leak on open error
In xlnx_formatter_pcm_open(), stream_data is allocated and adata->play_stream or adata->capture_stream is assigned early. If a later step, such as snd_pcm_hw_constraint_step() or snd_pcm_hw_constraint_integer(), fails, the function returns the error immediately. ALSA does not call the close callback when open fails, so stream_data is leaked and the stream pointer is left dangling, pointing to a substream that ALSA frees. A later interrupt would then call snd_pcm_period_elapsed() on the freed substream.
Free stream_data and clear the stream pointer on the error paths.
From the CVE record · Linux
The Xilinx ASoC formatter PCM driver leaks stream data and leaves a dangling pointer if a PCM open operation fails. A later interrupt can use the freed substream; the input does not establish whether an attacker can trigger this or what access they would need.
Engineers running Linux kernels with the Xilinx ASoC formatter PCM driver should check their exposure; affected versions were not specified.