diff options
| author | Julius Bairaktaris <julius@bairaktaris.de> | 2026-11-11 09:06:24 +0100 |
|---|---|---|
| committer | Mark Brown <broonie@kernel.org> | 2026-11-18 17:37:20 +0000 |
| commit | 4c15e549b7ad03183d10826da91e9ddc207a02cd (patch) | |
| tree | f27ec5f5a8d81b60dbd92a36e3de18b661139c35 /tools/perf/scripts/python | |
| parent | 3857bc06e5a40c5ebb62917147375a811f010aa0 (diff) | |
ASoC: qcom: q6asm-dai: reject compress rings larger than the DMA buffer
q6asm_dai_compr_open() allocates a fixed 8 MiB DMA buffer, but
q6asm_dai_compr_set_params() takes the ring size from the fragment size
and count that userspace passes to SNDRV_COMPRESS_SET_PARAMS without
checking it against that buffer. The compress core checks the geometry
against the runtime buffer only for drivers without a copy callback.
q6asm_compr_copy() places each write() at the stream position modulo the
ring size, so a ring larger than the DMA buffer lets write() copy user
data past its end, and after SNDRV_COMPRESS_NEXT_TRACK the copy starts at
the next multiple of the fragment size.
Reject a ring larger than the DMA buffer.
Fixes: a08cd56a4524 ("ASoC: q6asm-dai: add support to copy callback")
Cc: stable@vger.kernel.org
Signed-off-by: Julius Bairaktaris <julius@bairaktaris.de>
Link: https://patch.msgid.link/20261111080624.244291-3-julius@bairaktaris.de
Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to 'tools/perf/scripts/python')
0 files changed, 0 insertions, 0 deletions
