From 94f1595a775beffc924ace61dbdaabfc57d65668 Mon Sep 17 00:00:00 2001 From: Andrey Konovalov Date: Wed, 19 Jul 2017 15:31:22 +0200 Subject: prog: allow recursion for optional pointers When syzkaller generates arg that uses a few structs that reference each other via pointers, it can go into infinite recursion and crash. Fix this by forcing pointer args to be null when the depth of recursion reaches 3 for some struct. --- executor/syscalls.h | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'executor/syscalls.h') diff --git a/executor/syscalls.h b/executor/syscalls.h index 80648b4f3..7f6388789 100644 --- a/executor/syscalls.h +++ b/executor/syscalls.h @@ -1464,6 +1464,9 @@ static call_t syscalls[] = { {"syz_test$opt0", 1000001}, {"syz_test$opt1", 1000001}, {"syz_test$opt2", 1000001}, + {"syz_test$recur0", 1000001}, + {"syz_test$recur1", 1000001}, + {"syz_test$recur2", 1000001}, {"syz_test$regression0", 1000001}, {"syz_test$text_x86_16", 1000001}, {"syz_test$text_x86_32", 1000001}, @@ -2972,6 +2975,9 @@ static call_t syscalls[] = { {"syz_test$opt0", 1000001}, {"syz_test$opt1", 1000001}, {"syz_test$opt2", 1000001}, + {"syz_test$recur0", 1000001}, + {"syz_test$recur1", 1000001}, + {"syz_test$recur2", 1000001}, {"syz_test$regression0", 1000001}, {"syz_test$text_x86_16", 1000001}, {"syz_test$text_x86_32", 1000001}, @@ -4480,6 +4486,9 @@ static call_t syscalls[] = { {"syz_test$opt0", 1000001}, {"syz_test$opt1", 1000001}, {"syz_test$opt2", 1000001}, + {"syz_test$recur0", 1000001}, + {"syz_test$recur1", 1000001}, + {"syz_test$recur2", 1000001}, {"syz_test$regression0", 1000001}, {"syz_test$text_x86_16", 1000001}, {"syz_test$text_x86_32", 1000001}, -- cgit mrf-deployment