Re: [PATCH] firmware: cs_dsp: Use strnlen() on name fields in V1 wmfw files

From: Richard Fitzgerald
Date: Mon Jul 08 2024 - 11:00:36 EST


On 08/07/2024 15:48, Richard Fitzgerald wrote:
Use strnlen() instead of strlen() on the algorithm and coefficient name
string arrays in V1 wmfw files.

In V1 wmfw files the name is a NUL-terminated string in a fixed-size
array. cs_dsp should protect against overrunning the array if the NUL
terminator is missing.

Signed-off-by: Richard Fitzgerald <rf@xxxxxxxxxxxxxxxxxxxxx>
Fixes: f6bc909e7673 ("firmware: cs_dsp: add driver to support firmware loading on Cirrus Logic DSPs")

Don't take this. It applies to 6.11 but not to 6.10.
I'll try to sort out one that applies to new and old code, or
send separate 6.11 and backport versions.

Sorry about that.