Commit 34e00a8
fuzz: Enable heap protection option
IPC fuzzer is built with Zephyr sys_heap. Because we have a custom
allocator, the compiler sanitizers alone are not able to detect all
errors related to memory allocation. Enabling heap hardening aims to
increase the number of potentially detectable errors in fuzz builds.
CONFIG_SYS_HEAP_HARDENING_EXTREME: adds per-chunk canary trailers
(catching buffer overflows that spill even a single byte into the next
chunk), double-free detection, free-list pointer validation, and
a full heap structure walk after every alloc/free operation. This last
check catches external corruption (e.g. a wild write from an unrelated
component damaging heap metadata) before the allocator acts on it,
rather than letting the damage propagate silently to the next allocation
that happens to touch the corrupted region. The measured cost is ~7%
throughput (288k -> 280k execs/30s), negligible given the class of bugs
it surfaces.
Signed-off-by: Tomasz Leman <tomasz.m.leman@intel.com>1 parent 1f4b8f0 commit 34e00a8
1 file changed
Lines changed: 1 addition & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
5 | 5 | | |
6 | 6 | | |
7 | 7 | | |
| 8 | + | |
8 | 9 | | |
9 | 10 | | |
10 | 11 | | |
| |||
0 commit comments