From: Stefan Ghetu <stefan.ghetu@nxp.com>
To: Shengjiu Wang <shengjiu.wang@gmail.com>,
Mark Brown <broonie@kernel.org>,
linux-sound@vger.kernel.org
Cc: daniel.baluta@nxp.com, Stefan Ghetu <stefan.ghetu@nxp.com>,
Xiubo Li <Xiubo.Lee@gmail.com>,
Fabio Estevam <festevam@gmail.com>,
Nicolin Chen <nicoleotsuka@gmail.com>,
Liam Girdwood <lgirdwood@gmail.com>,
Jaroslav Kysela <perex@perex.cz>, Takashi Iwai <tiwai@suse.com>,
linuxppc-dev@lists.ozlabs.org, linux-kernel@vger.kernel.org
Subject: [PATCH 0/5] ASoC: fsl_asrc/fsl_easrc: fix memory safety issues
Date: Tue, 10 Nov 2026 14:07:38 +0200 [thread overview]
Message-ID: <20261110120743.6301-1-stefan.ghetu@nxp.com> (raw)
This series fixes memory safety issues in the ASRC and EASRC drivers
that can be triggered by a user with access to their PCM or compress
devices:
1. fsl_asrc_m2m: the output FIFO drain can write past the end of the
output buffer.
2. fsl_asrc: a repeated hw_params() leaves a stale asrc->pair[] entry
that points to freed memory after close, and hw_free() after a
failed hw_params() can release the pair of another stream.
3. fsl_asrc_dma: DMA channels are leaked on a repeated hw_params(), and
released twice after a Back-End configuration error.
4. fsl_easrc: the same repeated hw_params() issue for EASRC contexts.
5. fsl_asrc_m2m: more than one task per compress stream leads to double
DMA channel release and a stale pair entry.
Patches 2 and 4 make the pair/context release ownership-checked; patch
5 relies on them. Please apply in order.
Validated on i.MX8MP (EASRC) and i.MX8QM (ASRC).
Stefan Ghetu (5):
ASoC: fsl_asrc_m2m: fix out-of-bounds write when draining the output
FIFO
ASoC: fsl_asrc: fix pair ownership on repeated or failed hw_params
ASoC: fsl_asrc_dma: release DMA channels on repeated hw_params
ASoC: fsl_easrc: fix context ownership on repeated hw_params
ASoC: fsl_asrc_m2m: allow only one task at a time per stream
sound/soc/fsl/fsl_asrc.c | 22 ++++++++++++++++++++++
sound/soc/fsl/fsl_asrc_dma.c | 27 ++++++++++++++++++---------
sound/soc/fsl/fsl_asrc_m2m.c | 25 +++++++++++++++++--------
sound/soc/fsl/fsl_easrc.c | 10 ++++++++++
4 files changed, 67 insertions(+), 17 deletions(-)
base-commit: b810335a0699d1810683796b0e3ffe8827ddfe6c
--
2.53.0
next reply other threads:[~2026-11-10 12:07 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-10 12:07 Stefan Ghetu [this message]
2026-11-10 12:07 ` [PATCH 1/5] ASoC: fsl_asrc_m2m: fix out-of-bounds write when draining Stefan Ghetu
2026-11-10 12:07 ` [PATCH 2/5] ASoC: fsl_asrc: fix pair ownership on repeated or failed Stefan Ghetu
2026-11-10 12:07 ` [PATCH 3/5] ASoC: fsl_asrc_dma: release DMA channels on repeated Stefan Ghetu
2026-11-10 12:07 ` [PATCH 4/5] ASoC: fsl_easrc: fix context ownership " Stefan Ghetu
2026-11-10 12:07 ` [PATCH 5/5] ASoC: fsl_asrc_m2m: allow only one task at a time per Stefan Ghetu
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=20261110120743.6301-1-stefan.ghetu@nxp.com \
--to=stefan.ghetu@nxp.com \
--cc=Xiubo.Lee@gmail.com \
--cc=broonie@kernel.org \
--cc=daniel.baluta@nxp.com \
--cc=festevam@gmail.com \
--cc=lgirdwood@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-sound@vger.kernel.org \
--cc=linuxppc-dev@lists.ozlabs.org \
--cc=nicoleotsuka@gmail.com \
--cc=perex@perex.cz \
--cc=shengjiu.wang@gmail.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®