Chromium Code Reviews| Index: net/ntlm/ntlm_client_fuzzer.cc |
| diff --git a/net/ntlm/ntlm_client_fuzzer.cc b/net/ntlm/ntlm_client_fuzzer.cc |
| new file mode 100644 |
| index 0000000000000000000000000000000000000000..5cae3970189a2837ef84db6acd2c5a1169b67203 |
| --- /dev/null |
| +++ b/net/ntlm/ntlm_client_fuzzer.cc |
| @@ -0,0 +1,22 @@ |
| +// Copyright 2017 The Chromium Authors. All rights reserved. |
| +// Use of this source code is governed by a BSD-style license that can be |
| +// found in the LICENSE file. |
| + |
| +#include <stddef.h> |
| +#include <stdint.h> |
| + |
| +#include "net/ntlm/ntlm_client.h" |
| +#include "net/ntlm/ntlm_test_data.h" |
| + |
| +extern "C" int LLVMFuzzerTestOneInput(const uint8_t* data, size_t size) { |
| + net::ntlm::NtlmClient client; |
| + |
| + // The challenge message is the input to the fuzzer. This data would |
| + // normally come from the server. The returned Authenticate message is |
| + // ignored. |
| + client.GenerateAuthenticateMessage( |
| + net::ntlm::test::kNtlmDomain, net::ntlm::test::kUser, |
| + net::ntlm::test::kPassword, net::ntlm::test::kHostnameAscii, |
| + net::ntlm::test::kClientChallenge, net::ntlm::Buffer(data, size)); |
|
mmenke
2017/07/20 19:44:50
Is there any benefit to fuzzing any of the other f
zentaro
2017/08/02 15:01:41
Done.
|
| + return 0; |
| +} |
|
asanka
2017/07/20 19:39:56
Given that the library is for explicit credentials
asanka
2017/07/20 19:42:24
If the server is allowed to disable Unicode, then
zentaro
2017/08/02 15:01:41
Done. I think using the fuzzed data provider cover
|