Skip to content

firmware: cs_dsp: Add check to prevent overrunning the firmware file

Richard Fitzgerald alsa-devel linux-sound lkml 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest4 patches 1 replyIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/4firmware: cs_dsp: Fix overflow checking of wmfw headerdrivers/firmware/cirrus/cs_dsp.c+18 -70 replies
2/4firmware: cs_dsp: Return error if block header overflows filedrivers/firmware/cirrus/cs_dsp.c+14 -40 replies
3/4firmware: cs_dsp: Validate payload length before processing blockdrivers/firmware/cirrus/cs_dsp.c+15 -210 replies
4/4firmware: cs_dsp: Prevent buffer overrun when processing V2 alg headersdrivers/firmware/cirrus/cs_dsp.c+113 -310 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.

Read the v1 thread

Cover letter [PATCH 0/4] firmware: cs_dsp: Add check to prevent overrunning the firmware file

This series fixes various missing length checks when processing variable-length data from the firmware file. These could have caused overrunning the end of firmware file buffer, or wild pointer accesses.

Richard Fitzgerald (4):
firmware: cs_dsp: Fix overflow checking of wmfw header
firmware: cs_dsp: Return error if block header overflows file
firmware: cs_dsp: Validate payload length before processing block
firmware: cs_dsp: Prevent buffer overrun when processing V2 alg
headers

 drivers/firmware/cirrus/cs_dsp.c | 223 ++++++++++++++++++++++---------
 1 file changed, 160 insertions(+), 63 deletions(-)
Signature · 1 line
2.39.2