Commit a0cd49e
committed
firmware: cs_dsp: Validate payload length before processing block
JIRA: https://issues.redhat.com/browse/RHEL-53640
CVE: CVE-2024-42237
commit 6598afa
Author: Richard Fitzgerald <rf@opensource.cirrus.com>
Date: Thu Jun 27 15:14:31 2024 +0100
firmware: cs_dsp: Validate payload length before processing block
Move the payload length check in cs_dsp_load() and cs_dsp_coeff_load()
to be done before the block is processed.
The check that the length of a block payload does not exceed the number
of remaining bytes in the firwmware file buffer was being done near the
end of the loop iteration. However, some code before that check used the
length field without validating it.
Signed-off-by: Richard Fitzgerald <rf@opensource.cirrus.com>
Fixes: f6bc909 ("firmware: cs_dsp: add driver to support firmware loading on Cirrus Logic DSPs")
Link: https://patch.msgid.link/20240627141432.93056-4-rf@opensource.cirrus.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Signed-off-by: David Arcari <darcari@redhat.com>1 parent 80852bc commit a0cd49e
1 file changed
+15
-21
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1529 | 1529 | | |
1530 | 1530 | | |
1531 | 1531 | | |
| 1532 | + | |
| 1533 | + | |
| 1534 | + | |
| 1535 | + | |
| 1536 | + | |
| 1537 | + | |
1532 | 1538 | | |
1533 | 1539 | | |
1534 | 1540 | | |
| |||
1585 | 1591 | | |
1586 | 1592 | | |
1587 | 1593 | | |
1588 | | - | |
1589 | | - | |
1590 | | - | |
1591 | | - | |
1592 | | - | |
1593 | | - | |
1594 | | - | |
1595 | | - | |
1596 | | - | |
1597 | | - | |
1598 | 1594 | | |
1599 | 1595 | | |
1600 | 1596 | | |
| |||
2219 | 2215 | | |
2220 | 2216 | | |
2221 | 2217 | | |
| 2218 | + | |
| 2219 | + | |
| 2220 | + | |
| 2221 | + | |
| 2222 | + | |
2222 | 2223 | | |
2223 | 2224 | | |
2224 | 2225 | | |
| |||
2315 | 2316 | | |
2316 | 2317 | | |
2317 | 2318 | | |
2318 | | - | |
2319 | | - | |
2320 | | - | |
2321 | | - | |
2322 | | - | |
2323 | | - | |
2324 | | - | |
2325 | | - | |
2326 | | - | |
2327 | | - | |
2328 | | - | |
2329 | 2319 | | |
2330 | 2320 | | |
2331 | 2321 | | |
| |||
2365 | 2355 | | |
2366 | 2356 | | |
2367 | 2357 | | |
| 2358 | + | |
| 2359 | + | |
| 2360 | + | |
| 2361 | + | |
2368 | 2362 | | |
2369 | 2363 | | |
2370 | 2364 | | |
| |||
0 commit comments