From: "Cássio Gabriel" <cassiogabrielcontato@gmail.com>
To: David Rhodes <david.rhodes@cirrus.com>,
Richard Fitzgerald <rf@opensource.cirrus.com>,
Takashi Iwai <tiwai@suse.com>, Jaroslav Kysela <perex@perex.cz>,
Simon Trimmer <simont@opensource.cirrus.com>,
Mark Brown <broonie@kernel.org>
Cc: linux-sound@vger.kernel.org, patches@opensource.cirrus.com,
linux-kernel@vger.kernel.org,
"Cássio Gabriel" <cassiogabrielcontato@gmail.com>
Subject: [PATCH v2 0/2] ALSA: hda: cs35l56: fix system name leaks
Date: Wed, 20 May 2026 11:50:54 -0300 [thread overview]
Message-ID: <20260520-alsa-cs35l56-system-name-leak-v2-0-60f26c159023@gmail.com> (raw)
cs35l56_hda_read_acpi() reads an allocated ACPI _SUB string to build
the firmware system name. Current error paths can return after _SUB has
been allocated, or after it has been transferred to cs35l56->system_name,
without releasing that memory.
Fix the local read_acpi() unwind paths first, then release the stored
system name from the common probe error path.
Signed-off-by: Cássio Gabriel <cassiogabrielcontato@gmail.com>
---
Changes in v2:
- Use __free(kfree) for the temporary ACPI _SUB string.
- Keep the derived system name local until read_acpi() succeeds.
- Transfer ownership with no_free_ptr() only on successful paths.
- Link to v1: https://patch.msgid.link/20260520-alsa-cs35l56-system-name-leak-v1-0-d13b54423198@gmail.com
---
Cássio Gabriel (2):
ALSA: hda: cs35l56: Free ACPI _SUB string on errors
ALSA: hda: cs35l56: Free system name on probe errors
sound/hda/codecs/side-codecs/cs35l56_hda.c | 19 ++++++++++++-------
1 file changed, 12 insertions(+), 7 deletions(-)
---
base-commit: 38c607c673155d6335591cdbd9c785fb2b7550e5
change-id: 20260501-alsa-cs35l56-system-name-leak-7fd779eac391
Best regards,
--
Cássio Gabriel <cassiogabrielcontato@gmail.com>
next reply other threads:[~2026-05-20 14:51 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-05-20 14:50 Cássio Gabriel [this message]
2026-05-20 14:50 ` [PATCH v2 1/2] ALSA: hda: cs35l56: Free ACPI _SUB string on errors Cássio Gabriel
2026-05-21 12:14 ` Richard Fitzgerald
2026-05-21 12:48 ` Cássio Gabriel Monteiro Pires
2026-05-20 14:50 ` [PATCH v2 2/2] ALSA: hda: cs35l56: Free system name on probe errors Cássio Gabriel
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=20260520-alsa-cs35l56-system-name-leak-v2-0-60f26c159023@gmail.com \
--to=cassiogabrielcontato@gmail.com \
--cc=broonie@kernel.org \
--cc=david.rhodes@cirrus.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=simont@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
all inboxes | Powered by JetHome®