* [PATCH] ASoC: intel: atom: SST: log the byte-stream message header before handing it to the dispatch queue (uaf read of struct ipc_post)
@ 2026-12-01 18:18 Hanxiang Xu
2026-12-02 2:49 ` sashiko-bot
0 siblings, 1 reply; 2+ messages in thread
From: Hanxiang Xu @ 2026-12-01 18:18 UTC (permalink / raw)
To: Cezary Rojewski, Liam Girdwood, Pierre-Louis Bossart
Cc: Mark Brown, Jaroslav Kysela, Takashi Iwai, linux-sound,
linux-kernel
sst_send_byte_stream_mrfld() hands its struct ipc_post to the
dispatch queue with sst_add_to_dispatch_list_and_post() and then keeps
dereferencing the local msg pointer in a dev_dbg(). Ownership was
transferred at hand-off: sst_post_message_mrfld() kfree()s the message
it dequeues before returning, so with dynamic debug enabled for this
callsite every byte-control/mixer parameter write to the SST DSP is a
use-after-free read of the freed header; with the IPCX register busy
the free happens from the done-interrupt workqueue instead, racing
the read. sst_prepare_and_post_msg() logs the same header before
posting - this callsite is the odd one out.
Log the header before the hand-off and never touch msg after
sst_add_to_dispatch_list_and_post().
Cc: <stable@vger.kernel.org>
Signed-off-by: Hanxiang Xu <xuhx@hust.edu.cn>
---
1 file changed, 1 insertions(+), 1 deletions(-)
diff --git a/sound/soc/intel/atom/sst/sst_stream.c b/sound/soc/intel/atom/sst/sst_stream.c
index 288221d..1bc0147 100644
--- a/sound/soc/intel/atom/sst/sst_stream.c
+++ b/sound/soc/intel/atom/sst/sst_stream.c
@@ -200,9 +200,9 @@
}
}
- sst_add_to_dispatch_list_and_post(sst_drv_ctx, msg);
dev_dbg(sst_drv_ctx->dev, "msg->mrfld_header.p.header_low_payload:%d",
msg->mrfld_header.p.header_low_payload);
+ sst_add_to_dispatch_list_and_post(sst_drv_ctx, msg);
if (bytes_block) {
ret = sst_wait_timeout(sst_drv_ctx, block);
--
2.43.0
^ permalink raw reply related [flat|nested] 2+ messages in thread* Re: [PATCH] ASoC: intel: atom: SST: log the byte-stream message header before handing it to the dispatch queue (uaf read of struct ipc_post)
2026-12-01 18:18 [PATCH] ASoC: intel: atom: SST: log the byte-stream message header before handing it to the dispatch queue (uaf read of struct ipc_post) Hanxiang Xu
@ 2026-12-02 2:49 ` sashiko-bot
0 siblings, 0 replies; 2+ messages in thread
From: sashiko-bot @ 2026-12-02 2:49 UTC (permalink / raw)
To: Hanxiang Xu; +Cc: linux-sound
Thank you for your contribution! Sashiko AI review found 1 potential
issue to consider:
- [Low] ASoC: intel: atom: missing Fixes trailer for commit 3d9ff34622ba
--
commit f398b69655e68249bdc3b3cc93a5c1f5b263b34b
Author: Hanxiang Xu <xuhx@hust.edu.cn>
> ASoC: intel: atom: SST: log the byte-stream message header before handing it to the dispatch queue (uaf read of struct ipc_post)
>
> sst_send_byte_stream_mrfld() hands its struct ipc_post to the
> dispatch queue with sst_add_to_dispatch_list_and_post() and then keeps
> dereferencing the local msg pointer in a dev_dbg(). Ownership was
> transferred at hand-off: sst_post_message_mrfld() kfree()s the message
> it dequeues before returning, so with dynamic debug enabled for this
> callsite every byte-control/mixer parameter write to the SST DSP is a
> use-after-free read of the freed header; with the IPCX register busy
> the free happens from the done-interrupt workqueue instead, racing
> the read. sst_prepare_and_post_msg() logs the same header before
> posting - this callsite is the odd one out.
>
> Log the header before the hand-off and never touch msg after
> sst_add_to_dispatch_list_and_post().
>
> Cc: <stable@vger.kernel.org>
> Signed-off-by: Hanxiang Xu <xuhx@hust.edu.cn>
[Severity: Low]
Should this bug fix include a Fixes: tag for the commit that introduced
sst_send_byte_stream_mrfld()?
Fixes: 3d9ff34622ba ("ASoC: Intel: sst: add stream operations")
--
Sashiko AI review · https://sashiko.dev/#/patchset/20261202021839.1-1-xuhx@hust.edu.cn?part=1
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2026-12-02 2:49 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-12-01 18:18 [PATCH] ASoC: intel: atom: SST: log the byte-stream message header before handing it to the dispatch queue (uaf read of struct ipc_post) Hanxiang Xu
2026-12-02 2:49 ` sashiko-bot
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox