diff options
| author | Dmitry Vyukov <dvyukov@google.com> | 2017-05-31 20:32:25 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2017-05-31 20:32:25 +0200 |
| commit | 2cf166ec847e808c72cc8942d696d7c66e78acff (patch) | |
| tree | 0822805d89e4a693334a38ab94077f570b7ba5f9 | |
| parent | 536006ee07efc1bd13df4441f0ab3c69c725bc11 (diff) | |
| parent | 7ab352e19de91bafb25435a38164bf0bac7dde1e (diff) | |
Merge pull request #209 from google/smaller_stack
executor: limit stack frame size
| -rw-r--r-- | Makefile | 3 | ||||
| -rw-r--r-- | executor/common.h | 4 |
2 files changed, 5 insertions, 2 deletions
@@ -18,8 +18,9 @@ all: all-tools: execprog mutate prog2c stress repro upgrade +# executor uses stacks of limited size, so no jumbo frames. executor: - $(CC) -o ./bin/syz-executor executor/executor.cc -pthread -Wall -O1 -g $(STATIC_FLAG) $(CFLAGS) + $(CC) -o ./bin/syz-executor executor/executor.cc -pthread -Wall -Wframe-larger-than=8192 -Werror -O1 -g $(STATIC_FLAG) $(CFLAGS) # Don't generate symbol table and DWARF debug info. # Reduces build time and binary sizes considerably. diff --git a/executor/common.h b/executor/common.h index 73a528471..af87856fb 100644 --- a/executor/common.h +++ b/executor/common.h @@ -234,7 +234,9 @@ static void execute_command(const char* format, ...) int tunfd = -1; -#define SYZ_TUN_MAX_PACKET_SIZE (64 << 10) +// We just need this to be large enough to hold headers that we parse (ethernet/ip/tcp). +// Rest of the packet (if any) will be silently truncated which is fine. +#define SYZ_TUN_MAX_PACKET_SIZE 1000 // sysgen knowns about this constant (maxPids) #define MAX_PIDS 32 |
