aboutsummaryrefslogtreecommitdiffstats
path: root/pkg/csource
diff options
context:
space:
mode:
authorAleksandr Nogikh <nogikh@google.com>2022-02-24 18:29:38 +0000
committerAleksandr Nogikh <wp32pw@gmail.com>2022-02-25 18:57:20 +0100
commit5b413887959fc84a48dfef1f619a31ae4f718a5e (patch)
tree78c4dffa095cf22799ca4b749ffed72eeaa7cb8f /pkg/csource
parent7c33726645532432752ae4074ccaad36638db7b1 (diff)
executor: tolerate syz_genetlink_get_family_id failures
We cannot expect syscalls to always succeed during fuzzing, especially when the situation involves a complex interaction with the system. For the syz_genetlink_get_family_id case, it leads to numerous SYZFAIL crashes every day. Don't print a SYZFAIL error for this pseudo syscall.
Diffstat (limited to 'pkg/csource')
-rw-r--r--pkg/csource/generated.go4
1 files changed, 1 insertions, 3 deletions
diff --git a/pkg/csource/generated.go b/pkg/csource/generated.go
index 04f6b6108..74b56d8ea 100644
--- a/pkg/csource/generated.go
+++ b/pkg/csource/generated.go
@@ -6082,10 +6082,8 @@ static long syz_emit_vhci(volatile long a0, volatile long a1)
static long syz_genetlink_get_family_id(volatile long name, volatile long sock_arg)
{
debug("syz_genetlink_get_family_id(%s, %d)\n", (char*)name, (int)sock_arg);
- bool dofail = false;
int fd = sock_arg;
if (fd < 0) {
- dofail = true;
fd = socket(AF_NETLINK, SOCK_RAW, NETLINK_GENERIC);
if (fd == -1) {
debug("syz_genetlink_get_family_id: socket failed: %d\n", errno);
@@ -6093,7 +6091,7 @@ static long syz_genetlink_get_family_id(volatile long name, volatile long sock_a
}
}
struct nlmsg nlmsg_tmp;
- int ret = netlink_query_family_id(&nlmsg_tmp, fd, (char*)name, dofail);
+ int ret = netlink_query_family_id(&nlmsg_tmp, fd, (char*)name, false);
if ((int)sock_arg < 0)
close(fd);
if (ret < 0) {