Commit 0b214bb
committed
module_adapter: ipc4: validate pin counts against IPC4 maximum
Reject IPC4 module init payloads where nb_input_pins or nb_output_pins
exceed the protocol maximum (IPC4_MAX_SRC_QUEUE / IPC4_MAX_DST_QUEUE = 8).
The existing cfgsz equality check ensures the immediate pointer
arithmetic is in-bounds, but it does not prevent unsupported pin counts
from being stored in dst->nb_input_pins / dst->nb_output_pins and used
by downstream module code. Add explicit upper-bound validation before
computing pinsz, matching the IPC4 ABI contract advertised via
IPC4_MAX_MODULE_PIN_COUNT_FW_CFG.
Signed-off-by: Adrian Bonislawski <adrian.bonislawski@intel.com>1 parent cb7a692 commit 0b214bb
1 file changed
Lines changed: 8 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
20 | 20 | | |
21 | 21 | | |
22 | 22 | | |
| 23 | + | |
23 | 24 | | |
24 | 25 | | |
25 | 26 | | |
| |||
141 | 142 | | |
142 | 143 | | |
143 | 144 | | |
144 | | - | |
145 | | - | |
| 145 | + | |
| 146 | + | |
| 147 | + | |
| 148 | + | |
| 149 | + | |
| 150 | + | |
| 151 | + | |
146 | 152 | | |
147 | 153 | | |
148 | 154 | | |
| |||
0 commit comments