[lvc-project] [PATCH] ALSA: cs46xx: Handle SCB creation failures before dereferencing

Takashi Iwai tiwai at suse.de
Sat Oct 31 19:10:36 MSK 2026


On Fri, 30 Oct 2026 15:25:27 +0100,
Alex Kazinsky wrote:
> 
> With CONFIG_PM_SLEEP enabled, cs46xx_dsp_create_scb() can return NULL
> if kmemdup() fails to allocate the SCB data saved for resume.
> cs46xx_dsp_scb_and_task_init() and _dsp_create_generic_scb() dereference
> the returned pointer without checking it, causing a NULL pointer
> dereference on allocation failure.
> 
> Check both return values before accessing the SCB descriptors.
> Return -ENOMEM when creating the null SCB fails and propagate NULL
> from _dsp_create_generic_scb().
> 
> Found by Linux Verification Center (linuxtesting.org) with SVACE
> static analysis tool.
> 
> Fixes: 41116e926cb9 ("ALSA: cs46xx - Fix suspend/resume with new DSP")
> Cc: stable at vger.kernel.org
> Signed-off-by: Alex Kazinsky <a.kazinsky at ideco.ru>

Applied now.  Thanks.


Takashi



More information about the lvc-project mailing list