Commit 607e39d
committed
ipc3: bound host page count before page table DMA and parsing
The host-supplied ring->pages drives both the page table DMA transfer
length (20 bits per page) and the DSP-side descriptor allocations, but
only ring->size was sanity checked. A large page count could overflow
the fixed-size page table buffer and wrap the page-count multiplication.
Reject a zero or too-large page count at the single entry point before
any use.
Signed-off-by: Liam Girdwood <liam.r.girdwood@linux.intel.com>1 parent 3f7738d commit 607e39d
1 file changed
Lines changed: 32 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
16 | 16 | | |
17 | 17 | | |
18 | 18 | | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
19 | 38 | | |
20 | 39 | | |
21 | 40 | | |
| |||
216 | 235 | | |
217 | 236 | | |
218 | 237 | | |
| 238 | + | |
| 239 | + | |
| 240 | + | |
| 241 | + | |
| 242 | + | |
| 243 | + | |
| 244 | + | |
| 245 | + | |
| 246 | + | |
| 247 | + | |
| 248 | + | |
| 249 | + | |
| 250 | + | |
219 | 251 | | |
220 | 252 | | |
221 | 253 | | |
| |||
0 commit comments