core: tee_ta_instance_stats(): correct the allocation size of dump_ctx

Problem: Wrongly use sizeof(struct tee_ta_dump_stats) to calculate out
the allocation size of dump_ctx. This error causes buffer overflow when
iterating dump_ctx.

Solution: Correct the allocation size to
sizeof(struct tee_ta_dump_ctx) * ta_count.

Reviewed-by: Etienne Carriere <etienne.carriere@linaro.org>
Reviewed-by: Jerome Forissier <jerome.forissier@linaro.org>
Reviewed-by: Jens Wiklander <jens.wiklander@linaro.org>
Tested-by: Weizhao Jiang <weizhaoj@amazon.com>
Signed-off-by: Weizhao Jiang <weizhaoj@amazon.com>
1 file changed
tree: 3470493605888cae1e45ee9fd846ea0b2cf2ffaf
  1. .github/
  2. core/
  3. keys/
  4. ldelf/
  5. lib/
  6. mk/
  7. scripts/
  8. ta/
  9. .checkpatch.conf
  10. .gitattributes
  11. .gitignore
  12. CHANGELOG.md
  13. LICENSE
  14. MAINTAINERS
  15. Makefile
  16. README.md
  17. typedefs.checkpatch
README.md

OP-TEE Trusted OS

This git contains source code for the secure side implementation of OP-TEE project.

All official OP-TEE documentation has moved to http://optee.readthedocs.io.

// OP-TEE core maintainers