diff options
-rw-r--r-- | fuzzer-pubkey.c | 5 | ||||
-rw-r--r-- | fuzzer-pubkey.dict | 10 |
2 files changed, 8 insertions, 7 deletions
diff --git a/fuzzer-pubkey.c b/fuzzer-pubkey.c index cb648e4..a062e1f 100644 --- a/fuzzer-pubkey.c +++ b/fuzzer-pubkey.c @@ -25,9 +25,9 @@ int LLVMFuzzerTestOneInput(const uint8_t *Data, size_t Size) { buffer *keyblob = buf_getstringbuf(fuzz.input); unsigned int algolen; - const char* algoname = buf_getstring(keyblob, &algolen); + char* algoname = buf_getstring(keyblob, &algolen); - if (have_algo(algo, algolen, sshhostkey) == DROPBEAR_FAILURE) { + if (have_algo(algoname, algolen, sshhostkey) == DROPBEAR_FAILURE) { dropbear_exit("fuzzer imagined a bogus algorithm"); } fuzz_checkpubkey_line(line, 5, "/home/me/authorized_keys", @@ -36,6 +36,7 @@ int LLVMFuzzerTestOneInput(const uint8_t *Data, size_t Size) { buf_free(line); buf_free(keyblob); + m_free(algoname); m_malloc_free_epoch(1, 0); } else { m_malloc_free_epoch(1, 1); diff --git a/fuzzer-pubkey.dict b/fuzzer-pubkey.dict index daf12cf..734629c 100644 --- a/fuzzer-pubkey.dict +++ b/fuzzer-pubkey.dict @@ -1,8 +1,8 @@ -"ssh-rsa" -"ssh-dss" -"ecdsa-sha2-nistp256" -"ecdsa-sha2-nistp384" -"ecdsa-sha2-nistp521" +"\x00\x00\x00\x07ssh-rsa" +"\x00\x00\x00\x07ssh-dss" +"\x00\x00\x00\x13ecdsa-sha2-nistp256" +"\x00\x00\x00\x13ecdsa-sha2-nistp384" +"\x00\x00\x00\x13ecdsa-sha2-nistp521" "no-port-forwarding" "no-port-forwarding" "no-agent-forwarding" |