Commit 980fabf
audio: module_adapter: clear pipeline back-pointers on create failure
A module's init op can store its comp_dev into the parent pipeline's
source_comp/sink_comp before module creation completes. When a later
step of module_adapter_new_ext fails, the dev is freed on the err: path
before it has been added to the IPC component list, so ipc_comp_free
back-pointer cleanup never runs for it and
pipeline->source_comp/sink_comp is left pointing at freed memory.
A subsequent SET_PIPELINE_STATE then dereferences the freed component in
ipc4 pipeline_get_host_dev.
Found by the IPC4 libFuzzer target under AddressSanitizer.
Clear pipeline->source_comp/sink_comp/sched_comp that reference the dev
being freed on the creation-failure path, mirroring the cleanup
ipc_comp_free already performs for registered components.
Signed-off-by: Tomasz Leman <tomasz.m.leman@intel.com>1 parent cd3a114 commit 980fabf
1 file changed
Lines changed: 15 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
362 | 362 | | |
363 | 363 | | |
364 | 364 | | |
| 365 | + | |
| 366 | + | |
| 367 | + | |
| 368 | + | |
| 369 | + | |
| 370 | + | |
| 371 | + | |
| 372 | + | |
| 373 | + | |
| 374 | + | |
| 375 | + | |
| 376 | + | |
| 377 | + | |
| 378 | + | |
| 379 | + | |
365 | 380 | | |
366 | 381 | | |
367 | 382 | | |
| |||
0 commit comments