From: Takashi Iwai <tiwai@suse.de>
To: Guangshuo Li <lgs201920130244@gmail.com>
Cc: David Rhodes <david.rhodes@cirrus.com>,
Richard Fitzgerald <rf@opensource.cirrus.com>,
Jaroslav Kysela <perex@perex.cz>, Takashi Iwai <tiwai@suse.com>,
Stefan Binding <sbinding@opensource.cirrus.com>,
linux-sound@vger.kernel.org, patches@opensource.cirrus.com,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH] ALSA: hda: cs35l41: validate and free ACPI mute object
Date: Wed, 15 Jul 2026 16:40:28 +0200 [thread overview]
Message-ID: <87o6g8wc2r.wl-tiwai@suse.de> (raw)
In-Reply-To: <20260708113625.752913-1-lgs201920130244@gmail.com>
On Wed, 08 Jul 2026 13:36:25 +0200,
Guangshuo Li wrote:
>
> cs35l41_get_acpi_mute_state() evaluates a _DSM method to get the ACPI
> mute state and reads the first byte from the returned object.
>
> However, the returned ACPI object is owned by the caller and is never
> freed after use, so each successful query leaks the _DSM result object.
>
> The code also assumes that the returned object is a buffer with at least
> one byte. A malformed firmware response can return a different object
> type or an empty buffer, and the direct ret->buffer.pointer dereference
> can then access an invalid pointer.
>
> Use the typed _DSM helper, validate that the returned buffer contains at
> least one byte, and free the ACPI object after reading it.
>
> Fixes: 447106e92a0c ("ALSA: hda: cs35l41: Support mute notifications for CS35L41 HDA")
> Signed-off-by: Guangshuo Li <lgs201920130244@gmail.com>
Applied now. Thanks.
Takashi
prev parent reply other threads:[~2026-07-15 14:40 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-07-08 11:36 [PATCH] ALSA: hda: cs35l41: validate and free ACPI mute object Guangshuo Li
2026-07-15 14:40 ` 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=87o6g8wc2r.wl-tiwai@suse.de \
--to=tiwai@suse.de \
--cc=david.rhodes@cirrus.com \
--cc=lgs201920130244@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-sound@vger.kernel.org \
--cc=patches@opensource.cirrus.com \
--cc=perex@perex.cz \
--cc=rf@opensource.cirrus.com \
--cc=sbinding@opensource.cirrus.com \
--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