ipc: check type before freeing

When freeing we currently implicitly are trusting the ID to match the
type specified in the message. From a security standpoint this is wrong,
never trust the other side. This is the likely cause of how the fuzzer
is leaking memory in pipelines since they have additional allocations
that are not freed when they are treated as a buffer or a component.

Signed-off-by: Curtis Malainey <cujomalainey@chromium.org>
2 files changed
tree: 21d7d3d5c415fc0bddd78ef512c173702ebe8d31
  1. .github/
  2. doc/
  3. installer/
  4. keys/
  5. scripts/
  6. smex/
  7. src/
  8. test/
  9. tools/
  10. zephyr/
  11. .gitignore
  12. .gitmodules
  13. .travis.yml
  14. CMakeLists.txt
  15. CODEOWNERS
  16. Kconfig
  17. Kconfig.sof
  18. Kconfig.xtos-build
  19. Kconfig.xtos-dbg
  20. LICENCE
  21. README.md
README.md

Sound Open Firmware

Status

GitHub Actions Build Status Gitter chat

Documentation

See docs

Running the tests

See unit testing documentation

Deployment

TODO: Add additional notes about how to deploy this on a live system

Contributing

See Contributing to the Project

License

This project is licensed under the BSD Clause 3 - see the LICENCE file for details