diff options
| author | Pengpeng Hou <pengpeng@iscas.ac.cn> | 2026-07-06 22:45:39 +0800 |
|---|---|---|
| committer | Mark Brown <broonie@kernel.org> | 2026-07-14 12:24:23 +0100 |
| commit | bc889dfcea9294a1eae7f8e2f3573a90764ae4d0 (patch) | |
| tree | 2f4966951b37d2c6a5cc88fdf7ecbb447ffde917 /tools/lib/python/kdoc/python_version.py | |
| parent | 27d090f3ccd4cade897fb7e0c8c0a6e2fd3a95a0 (diff) | |
ASoC: tas2781: bound firmware description string parsing
The TAS2781 firmware parser reads several variable-length description
strings with strlen() before checking that the string terminator is
present inside the firmware blob. A malformed firmware image without a
NUL terminator can therefore make the parser walk past the end of the
firmware buffer before the later size checks run.
Add a small bounded string-length helper and use it for all description
fields that are parsed from the firmware buffer. Keep the existing size
checks for the fixed bytes that follow each string.
Fixes: 915f5eadebd2 ("ASoC: tas2781: firmware lib")
Signed-off-by: Pengpeng Hou <pengpeng@iscas.ac.cn>
Link: https://patch.msgid.link/20260706144540.93929-1-pengpeng@iscas.ac.cn
Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to 'tools/lib/python/kdoc/python_version.py')
0 files changed, 0 insertions, 0 deletions
