diff options
| author | Dmitry Vyukov <dvyukov@google.com> | 2024-04-16 10:08:04 +0200 |
|---|---|---|
| committer | Dmitry Vyukov <dvyukov@google.com> | 2024-04-16 08:50:03 +0000 |
| commit | 917c2e787ff5bb43dc747ce79e33d286b5cb2c6f (patch) | |
| tree | f55c64d4f68864a5ddc13991a336614af7f606d2 /executor | |
| parent | 0d592ce46ebc504d579c07e5bc3f7f3f2038c4cf (diff) | |
executor: ignore socketpair error in syz_usbip_server_init
Fuzzer managed to do:
executing program 4:
...
prlimit64(0x0, 0x7, &(0x7f0000000000), 0x0)
...
syz_usbip_server_init(0x3)
...
SYZFATAL: executor 4 failed 11 times: executor 4: exit status 67
SYZFAIL: syz_usbip_server_init: socketpair failed
(errno 24: Too many open files)
Diffstat (limited to 'executor')
| -rw-r--r-- | executor/common_linux.h | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/executor/common_linux.h b/executor/common_linux.h index e83bad6c0..f53a0e781 100644 --- a/executor/common_linux.h +++ b/executor/common_linux.h @@ -2046,8 +2046,11 @@ static long syz_usbip_server_init(volatile long a0) bool usb3 = (speed == USB_SPEED_SUPER); int socket_pair[2]; - if (socketpair(AF_UNIX, SOCK_STREAM, 0, socket_pair)) - fail("syz_usbip_server_init: socketpair failed"); + if (socketpair(AF_UNIX, SOCK_STREAM, 0, socket_pair)) { + // This can happen if the test calls prlimit(RLIMIT_AS). + debug("syz_usbip_server_init: socketpair failed (%d)\n", errno); + return -1; + } int client_fd = socket_pair[0]; int server_fd = socket_pair[1]; |
