Commit ff3bc08
committed
ipc3: Don't trust size values in protocol input
The handling for SOF_COMP_NONE was extracting a "size" field from a
struct sof_ipc_comp_process command and passing it down into the
module_adapter layer where it was being used as the range for a
memcpy_s().
But that struct is IPC input data from the host! The size can
trivially be wrong and cause an overflow. And needless to say,
fuzzing discovered the hole and blew it up.
Note that the previous behavior when LIBRARY||UNIT_TEST is left
unchanged (fuzz builds as "real" firmware and doesn't use those
features). It turns out that this is still in production use, though
the details of why the code is different are unclear. Drop a note in
to fix this later.
Signed-off-by: Andy Ross <andyross@google.com>1 parent 192d1df commit ff3bc08
1 file changed
+5
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
277 | 277 | | |
278 | 278 | | |
279 | 279 | | |
280 | | - | |
281 | 280 | | |
| 281 | + | |
| 282 | + | |
282 | 283 | | |
283 | 284 | | |
| 285 | + | |
| 286 | + | |
| 287 | + | |
284 | 288 | | |
285 | 289 | | |
286 | 290 | | |
| |||
0 commit comments