mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH 0/2] ASoC: qcom: qdsp6: bound the compress ring by the DMA buffer
@ 2026-11-11  8:06 Julius Bairaktaris
  2026-11-11  8:06 ` [PATCH 1/2] ASoC: qcom: q6apm-dai: reject compress rings larger than " Julius Bairaktaris
  2026-11-11  8:06 ` [PATCH 2/2] ASoC: qcom: q6asm-dai: " Julius Bairaktaris
  0 siblings, 2 replies; 4+ messages in thread
From: Julius Bairaktaris @ 2026-11-11  8:06 UTC (permalink / raw)
  To: Srinivas Kandagatla, Mark Brown
  Cc: Liam Girdwood, Jaroslav Kysela, Takashi Iwai, Vinod Koul,
	Mohammad Rafi Shaik, Pierre-Louis Bossart, linux-sound,
	linux-arm-msm, linux-kernel

q6apm-dai and q6asm-dai allocate a fixed 8 MiB DMA buffer when a
compress stream opens and take the ring geometry from
SNDRV_COMPRESS_SET_PARAMS without comparing it to that buffer. Their
copy callbacks place each write() at the stream position modulo the
ring size, so a user who can open the compress node and asks for a
larger ring makes write() copy data of their choice past the buffer.
Each patch rejects such a ring in set_params.

I used Claude (Anthropic) to help write these patches.

Julius Bairaktaris (2):
  ASoC: qcom: q6apm-dai: reject compress rings larger than the DMA
    buffer
  ASoC: qcom: q6asm-dai: reject compress rings larger than the DMA
    buffer

 sound/soc/qcom/qdsp6/q6apm-dai.c | 3 +++
 sound/soc/qcom/qdsp6/q6asm-dai.c | 3 +++
 2 files changed, 6 insertions(+)


base-commit: 20f1752b9241d300b42cd45a07e22d063bccba45
-- 
2.53.0


^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2026-11-15 10:55 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-11-11  8:06 [PATCH 0/2] ASoC: qcom: qdsp6: bound the compress ring by the DMA buffer Julius Bairaktaris
2026-11-11  8:06 ` [PATCH 1/2] ASoC: qcom: q6apm-dai: reject compress rings larger than " Julius Bairaktaris
2026-11-15 10:55   ` Srinivas Kandagatla
2026-11-11  8:06 ` [PATCH 2/2] ASoC: qcom: q6asm-dai: " Julius Bairaktaris

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®