summaryrefslogtreecommitdiff
path: root/scripts/Makefile.thinlto
diff options
context:
space:
mode:
authorPeter Ujfalusi <peter.ujfalusi@linux.intel.com>2026-10-07 11:49:50 +0300
committerMark Brown <broonie@kernel.org>2026-10-07 13:16:49 +0200
commit8c3db31941f035b0347392cdb789e3edb3ab9d27 (patch)
tree87890789c9cf83b642b8c65ebdf821c1e0336ae6 /scripts/Makefile.thinlto
parentc6b1d75d064603a1ad61ac18f616060096cb2644 (diff)
downloadlinux-8c3db31941f035b0347392cdb789e3edb3ab9d27.tar.gz
linux-8c3db31941f035b0347392cdb789e3edb3ab9d27.zip
ASoC: SOF: Check that the audio buffer fits into the page table
The page table describing the audio buffer for the firmware is a single PAGE_SIZE allocation, but snd_sof_create_page_table() writes the compressed PFNs into it without checking that they fit. The PFNs are stored in 2.5 bytes each and the last one is written with a 32 bit access, so with 4K pages the table can hold 1638 PFNs, which is a buffer of 6.4MB. A larger buffer corrupts memory past the end of the page table. The PCM path is not affected as the maximum buffer size is specified by the topology, but the compressed streams can ask for larger buffers. Pass the page table buffer to snd_sof_create_page_table() instead of only its address and verify that the buffer can be described by it. Signed-off-by: Peter Ujfalusi <peter.ujfalusi@linux.intel.com> Link: https://patch.msgid.link/20261007084955.1256-24-peter.ujfalusi@linux.intel.com Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to 'scripts/Makefile.thinlto')
0 files changed, 0 insertions, 0 deletions