mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Takashi Iwai <tiwai@suse.de>
To: Alex Kazinsky <a.kazinsky@ideco.ru>
Cc: Jaroslav Kysela <perex@perex.cz>, Takashi Iwai <tiwai@suse.com>,
	Denis Arefev <arefev@swemel.ru>,
	Hemanth Selam <hemanth.selam@gmail.com>,
	linux-sound@vger.kernel.org, linux-kernel@vger.kernel.org,
	lvc-project@linuxtesting.org, stable@vger.kernel.org
Subject: Re: [PATCH] ALSA: cs46xx: Handle SCB creation failures before dereferencing
Date: Sat, 31 Oct 2026 17:10:36 +0100	[thread overview]
Message-ID: <87o6c9rgub.wl-tiwai@suse.de> (raw)
In-Reply-To: <20261030142529.415697-1-a.kazinsky@ideco.ru>

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@vger.kernel.org
> Signed-off-by: Alex Kazinsky <a.kazinsky@ideco.ru>

Applied now.  Thanks.


Takashi

      reply	other threads:[~2026-10-31 16:10 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-10-30 14:25 Alex Kazinsky
2026-10-31 16:10 ` Takashi Iwai [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87o6c9rgub.wl-tiwai@suse.de \
    --to=tiwai@suse.de \
    --cc=a.kazinsky@ideco.ru \
    --cc=arefev@swemel.ru \
    --cc=hemanth.selam@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-sound@vger.kernel.org \
    --cc=lvc-project@linuxtesting.org \
    --cc=perex@perex.cz \
    --cc=stable@vger.kernel.org \
    --cc=tiwai@suse.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®