From 98cc8ce86035351402868d5448fe5654b87ac12e Mon Sep 17 00:00:00 2001 From: Oliver Chang Date: Wed, 19 Apr 2017 10:58:20 -0700 Subject: [PATCH] libssh: fix key file permissions Should hopefully fix https://github.com/google/oss-fuzz/pull/418#issuecomment-295277016 --- projects/libssh/libssh_server_fuzzer.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/projects/libssh/libssh_server_fuzzer.cc b/projects/libssh/libssh_server_fuzzer.cc index e0ef890d5..d6321ddf9 100644 --- a/projects/libssh/libssh_server_fuzzer.cc +++ b/projects/libssh/libssh_server_fuzzer.cc @@ -66,7 +66,7 @@ extern "C" int LLVMFuzzerTestOneInput(const uint8_t *data, size_t size) { res = shutdown(socket_fds[1], SHUT_WR); assert(res == 0); - int fd = open("/tmp/libssh_fuzzer_private_key", O_WRONLY | O_CREAT); + int fd = open("/tmp/libssh_fuzzer_private_key", O_WRONLY | O_CREAT, S_IRWXU); assert(fd >= 0); ssize_t write_res = write(fd, kRSAPrivateKeyPEM, strlen(kRSAPrivateKeyPEM)); assert(write_res == strlen(kRSAPrivateKeyPEM));