| commit | 125080241ded63d9c00777f1c6772c29a7463d40 | [log] [tgz] |
|---|---|---|
| author | Flavio Ceolin <flavio.ceolin@intel.com> | Tue Jun 30 15:12:49 2020 -0700 |
| committer | Anas Nashif <anas.nashif@intel.com> | Wed Jul 01 07:22:18 2020 -0400 |
| tree | 3e75a8ee76e03f74effe0e3d0a63b088e49a6e0c | |
| parent | 2a706d9f209648533d952a1d1d439bccf22cabd3 [diff] |
random: entropy: Fix invalid memory access In sys_rand_get() if the entropy hardware unlikely return error, the fallgback is using the system timer to and fill the given buffer with that data. The problem what that k_cycle_get_32() returns a four bytes integer and depending the sizeof of the buffer we need copy the right amount of data. That was not being done properly leading to invalid read/write memory access. Fixes #26435 Signed-off-by: Flavio Ceolin <flavio.ceolin@intel.com>