aboutsummaryrefslogtreecommitdiffstats
path: root/pkg/csource
diff options
context:
space:
mode:
authorDmitry Vyukov <dvyukov@google.com>2024-04-16 10:13:38 +0200
committerDmitry Vyukov <dvyukov@google.com>2024-04-16 08:50:03 +0000
commit2338035c3e34de90e19b356c6904db4e9978ff8e (patch)
treec85a4289807209a3e410bf04540e7eec7a9e316b /pkg/csource
parent917c2e787ff5bb43dc747ce79e33d286b5cb2c6f (diff)
executor: ignore EBADF when reading tun
Fuzzer managed to do: executing program 0: ... close_range(r5, 0xffffffffffffffff, 0x0) ... SYZFATAL: executor 0 failed 11 times: executor 0: exit status 67 SYZFAIL: tun read failed (errno 9: Bad file descriptor)
Diffstat (limited to 'pkg/csource')
-rw-r--r--pkg/csource/generated.go2
1 files changed, 1 insertions, 1 deletions
diff --git a/pkg/csource/generated.go b/pkg/csource/generated.go
index 6f5cf9095..c983873c8 100644
--- a/pkg/csource/generated.go
+++ b/pkg/csource/generated.go
@@ -4258,7 +4258,7 @@ static int read_tun(char* data, int size)
int rv = read(tunfd, data, size);
if (rv < 0) {
- if (errno == EAGAIN || errno == EBADFD)
+ if (errno == EAGAIN || errno == EBADF || errno == EBADFD)
return -1;
fail("tun read failed");
}