Commit 9c209bc
zephyr: alloc: Add 16MB allocation limit to native_sim host allocator
When building the native_sim fuzzer, the host allocator does not
possess the strict bounds of the internal Zephyr memory pools. If
the fuzzer generates a malformed payload requesting an excessively
large size (e.g. 4GB), it passes directly to the host ASAN allocator
which aborts due to OOM or protection limits. Adding a 16MB cap
allows these to fail gracefully.
Signed-off-by: Liam Girdwood <liam.r.girdwood@linux.intel.com>1 parent 8048ea3 commit 9c209bc
1 file changed
Lines changed: 5 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
475 | 475 | | |
476 | 476 | | |
477 | 477 | | |
| 478 | + | |
| 479 | + | |
| 480 | + | |
| 481 | + | |
| 482 | + | |
478 | 483 | | |
479 | 484 | | |
480 | 485 | | |
| |||
0 commit comments