Commit 8aeb445
ipc4: helper: validate host device_count before indexing channel map
dma_cfg->channel_map.device_count comes from a host supplied gateway
config blob and was used directly to bound the loop indexing the fixed
channel_map.map[GTW_DMA_DEVICE_MAX_COUNT] array, allowing an out-of-bounds
read. Reject counts above the ABI maximum with IPC4_INVALID_REQUEST.
Signed-off-by: Adrian Bonislawski <adrian.bonislawski@intel.com>1 parent 382ea2f commit 8aeb445
1 file changed
Lines changed: 9 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1312 | 1312 | | |
1313 | 1313 | | |
1314 | 1314 | | |
| 1315 | + | |
| 1316 | + | |
| 1317 | + | |
| 1318 | + | |
| 1319 | + | |
| 1320 | + | |
| 1321 | + | |
| 1322 | + | |
1315 | 1323 | | |
1316 | 1324 | | |
1317 | 1325 | | |
1318 | 1326 | | |
1319 | 1327 | | |
1320 | | - | |
| 1328 | + | |
1321 | 1329 | | |
1322 | 1330 | | |
1323 | 1331 | | |
| |||
0 commit comments