Commit 681b223
ASoC: wm_adsp: Don't overrun firmware file buffer when reading region data
[ Upstream commit 1cab2a84f470e15ecc8e5143bfe9398c6e888032 ]
Protect against corrupt firmware files by ensuring that the length we
get for the data in a region actually lies within the available firmware
file data buffer.
Signed-off-by: Richard Fitzgerald <rf@opensource.wolfsonmicro.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
Signed-off-by: Sasha Levin <alexander.levin@verizon.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>1 parent b63209c commit 681b223
1 file changed
Lines changed: 24 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1060 | 1060 | | |
1061 | 1061 | | |
1062 | 1062 | | |
1063 | | - | |
| 1063 | + | |
1064 | 1064 | | |
1065 | 1065 | | |
1066 | 1066 | | |
| |||
1221 | 1221 | | |
1222 | 1222 | | |
1223 | 1223 | | |
| 1224 | + | |
| 1225 | + | |
| 1226 | + | |
| 1227 | + | |
| 1228 | + | |
| 1229 | + | |
| 1230 | + | |
| 1231 | + | |
| 1232 | + | |
| 1233 | + | |
1224 | 1234 | | |
1225 | 1235 | | |
1226 | 1236 | | |
1227 | 1237 | | |
| 1238 | + | |
1228 | 1239 | | |
1229 | 1240 | | |
1230 | 1241 | | |
| |||
1269 | 1280 | | |
1270 | 1281 | | |
1271 | 1282 | | |
| 1283 | + | |
1272 | 1284 | | |
1273 | 1285 | | |
1274 | 1286 | | |
| |||
1730 | 1742 | | |
1731 | 1743 | | |
1732 | 1744 | | |
| 1745 | + | |
| 1746 | + | |
| 1747 | + | |
| 1748 | + | |
| 1749 | + | |
| 1750 | + | |
| 1751 | + | |
| 1752 | + | |
| 1753 | + | |
| 1754 | + | |
| 1755 | + | |
1733 | 1756 | | |
1734 | 1757 | | |
1735 | 1758 | | |
| |||
0 commit comments