Commit bed995f
audio: base_fw: validate dma control payload length before subtract
basefw_dma_control() computes data_size = data_offset - sizeof(struct
ipc4_dma_control) where data_offset is the host-supplied payload
length. When data_offset is smaller than the header the unsigned
subtraction wraps to a huge value that passes the length check and is
forwarded as the payload size, leading to an out-of-bounds read.
Reject data_offset values smaller than the fixed header before the
subtraction.
Signed-off-by: Tomasz Leman <tomasz.m.leman@intel.com>1 parent 2575428 commit bed995f
1 file changed
Lines changed: 7 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
770 | 770 | | |
771 | 771 | | |
772 | 772 | | |
| 773 | + | |
| 774 | + | |
| 775 | + | |
| 776 | + | |
| 777 | + | |
| 778 | + | |
| 779 | + | |
773 | 780 | | |
774 | 781 | | |
775 | 782 | | |
| |||
0 commit comments