Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(281)

Issue 1946793002: net: Add fuzzer for HostResolverImpl. (Closed)

Created:
4 years, 7 months ago by mmenke
Modified:
4 years, 6 months ago
Reviewers:
Julia Tuttle, eroman
CC:
chromium-reviews, cbentzel+watch_chromium.org, Julia Tuttle
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

net: Add fuzzer for HostResolverImpl. The fuzzer tests it using both a mocked out platform resolver (Which isn't too exciting), and the built-in DNS resolver, complete with fuzzed UDP sockets. This CL introduces a FuzzedHostResolver class that can also be included as a component for other fuzzers. Also makes dns_socket_pool.cc less chatty on errors. BUG=600005 Committed: https://crrev.com/91c1716731622e720e91dc052aaee9961a009423 Cr-Commit-Position: refs/heads/master@{#397429}

Patch Set 1 #

Patch Set 2 : Minor changes #

Patch Set 3 : Self review, fix and beef up dictionary #

Patch Set 4 : Sync, more cleanups #

Patch Set 5 : Fix leak #

Patch Set 6 : Add cancelation, doing stuff in different order, recursion #

Patch Set 7 : More fixes, merge #

Patch Set 8 : Fix leak #

Patch Set 9 : test #

Patch Set 10 : Update suppression instead of fixing leak (Doesn't really belong in this CL, and affects a lot of c… #

Patch Set 11 : Remove dependency on RandInt, fuzz hosts #

Patch Set 12 : Fix tests #

Patch Set 13 : Suppress leak #

Total comments: 9

Patch Set 14 : Response to Julia's comments #

Total comments: 33

Patch Set 15 : Response to eroman's comments #

Patch Set 16 : merge, fix build #

Total comments: 21

Patch Set 17 : Response to eroman's comments, merge #

Patch Set 18 : Missed one #

Patch Set 19 : Remove port 0 check #

Unified diffs Side-by-side diffs Delta from patch set Stats (+1201 lines, -267 lines) Patch
M net/BUILD.gn View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 3 chunks +18 lines, -3 lines 0 comments Download
M net/base/fuzzed_data_provider.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 1 chunk +16 lines, -7 lines 0 comments Download
M net/base/fuzzed_data_provider.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 2 chunks +10 lines, -3 lines 0 comments Download
A net/data/dns/dns.dict View 1 2 3 4 5 6 7 8 9 10 11 12 13 1 chunk +67 lines, -0 lines 0 comments Download
M net/dns/dns_client.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 2 chunks +10 lines, -0 lines 0 comments Download
M net/dns/dns_client.cc View 1 2 3 4 5 6 7 8 9 10 3 chunks +30 lines, -8 lines 0 comments Download
M net/dns/dns_session_unittest.cc View 1 2 3 4 5 6 7 8 9 10 11 1 chunk +1 line, -1 line 0 comments Download
M net/dns/dns_socket_pool.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 4 chunks +11 lines, -3 lines 0 comments Download
M net/dns/dns_socket_pool.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 6 chunks +30 lines, -22 lines 0 comments Download
M net/dns/dns_transaction_unittest.cc View 1 2 3 4 5 6 7 8 9 10 11 1 chunk +2 lines, -2 lines 0 comments Download
A net/dns/fuzzed_host_resolver.h View 1 2 3 4 5 6 7 8 9 10 1 chunk +79 lines, -0 lines 0 comments Download
A net/dns/fuzzed_host_resolver.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 1 chunk +234 lines, -0 lines 0 comments Download
M net/dns/host_resolver_impl.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 7 chunks +25 lines, -9 lines 0 comments Download
M net/dns/host_resolver_impl.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 22 chunks +148 lines, -126 lines 0 comments Download
A net/dns/host_resolver_impl_fuzzer.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 1 chunk +239 lines, -0 lines 0 comments Download
M net/socket/fuzzed_socket.h View 2 chunks +3 lines, -3 lines 0 comments Download
M net/socket/fuzzed_socket.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 2 chunks +3 lines, -6 lines 0 comments Download
M net/socket/fuzzed_socket_factory.h View 2 chunks +3 lines, -3 lines 0 comments Download
M net/socket/fuzzed_socket_factory.cc View 2 chunks +2 lines, -67 lines 0 comments Download
M net/socket/socks_client_socket_fuzzer.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 1 chunk +1 line, -1 line 0 comments Download
A net/udp/fuzzed_datagram_client_socket.h View 1 2 3 1 chunk +76 lines, -0 lines 0 comments Download
A net/udp/fuzzed_datagram_client_socket.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 1 chunk +190 lines, -0 lines 0 comments Download
M net/url_request/url_request_data_job_fuzzer.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 2 chunks +2 lines, -2 lines 0 comments Download
M tools/valgrind/memcheck/suppressions.txt View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 1 chunk +1 line, -1 line 0 comments Download

Messages

Total messages: 47 (21 generated)
mmenke
Eric: PTAL. This CL is a bit simpler than its size suggests. fuzzed_host_resolver and host_resolver_impl_fuzzer ...
4 years, 7 months ago (2016-05-12 17:30:00 UTC) #12
eroman
just a heads up not sure I will get to this today.
4 years, 7 months ago (2016-05-12 21:58:31 UTC) #13
mmenke
On 2016/05/12 21:58:31, eroman wrote: > just a heads up not sure I will get ...
4 years, 7 months ago (2016-05-12 22:07:33 UTC) #14
Julia Tuttle
looks reasonable to me; added a couple nits. https://codereview.chromium.org/1946793002/diff/360001/net/data/dns/dns.dict File net/data/dns/dns.dict (right): https://codereview.chromium.org/1946793002/diff/360001/net/data/dns/dns.dict#newcode7 net/data/dns/dns.dict:7: # ...
4 years, 7 months ago (2016-05-13 17:15:13 UTC) #16
mmenke
Sorry for the slow response, a lot of reviews. [eroman]: PTAL. [juliatuttle]: Feel free to ...
4 years, 7 months ago (2016-05-17 19:50:37 UTC) #17
mmenke
eroman: I discovered that the URLRequest fuzzer can hit a DCHECK in the cookie code, ...
4 years, 7 months ago (2016-05-17 22:42:08 UTC) #18
eroman
https://codereview.chromium.org/1946793002/diff/380001/net/base/fuzzed_data_provider.h File net/base/fuzzed_data_provider.h (right): https://codereview.chromium.org/1946793002/diff/380001/net/base/fuzzed_data_provider.h#newcode36 net/base/fuzzed_data_provider.h:36: // Returns an unsigned number in the range [min, ...
4 years, 7 months ago (2016-05-17 23:01:34 UTC) #19
mmenke
Thanks for the feedback! https://codereview.chromium.org/1946793002/diff/380001/net/base/fuzzed_data_provider.h File net/base/fuzzed_data_provider.h (right): https://codereview.chromium.org/1946793002/diff/380001/net/base/fuzzed_data_provider.h#newcode36 net/base/fuzzed_data_provider.h:36: // Returns an unsigned number ...
4 years, 7 months ago (2016-05-19 19:09:46 UTC) #20
mmenke
Note that there were failures in the tryruns, but both failing browser tests have been ...
4 years, 7 months ago (2016-05-19 19:10:37 UTC) #21
eroman
Sorry, totally forgot this was still in my queue! On Thu, May 19, 2016 at ...
4 years, 6 months ago (2016-05-27 01:04:15 UTC) #22
mmenke
No worries, I'm in no hurry - not working on more fuzzers at the moment. ...
4 years, 6 months ago (2016-05-27 01:12:35 UTC) #23
eroman
I was initially concerned by the HostResolverImpl refactor, that adds the worker task runner as ...
4 years, 6 months ago (2016-06-01 01:47:21 UTC) #24
mmenke
On 2016/06/01 01:47:21, eroman wrote: > I was initially concerned by the HostResolverImpl refactor, that ...
4 years, 6 months ago (2016-06-01 18:08:08 UTC) #25
mmenke
On 2016/06/01 18:08:08, mmenke wrote: > On 2016/06/01 01:47:21, eroman wrote: > > I was ...
4 years, 6 months ago (2016-06-01 18:08:40 UTC) #26
mmenke
Thanks! https://codereview.chromium.org/1946793002/diff/420001/net/base/fuzzed_data_provider.h File net/base/fuzzed_data_provider.h (right): https://codereview.chromium.org/1946793002/diff/420001/net/base/fuzzed_data_provider.h#newcode58 net/base/fuzzed_data_provider.h:58: template <typename Type, int size> On 2016/06/01 01:47:21, ...
4 years, 6 months ago (2016-06-01 21:21:51 UTC) #27
mmenke
Oops, missed the most important one. https://codereview.chromium.org/1946793002/diff/420001/net/dns/host_resolver_impl.cc File net/dns/host_resolver_impl.cc (right): https://codereview.chromium.org/1946793002/diff/420001/net/dns/host_resolver_impl.cc#newcode718 net/dns/host_resolver_impl.cc:718: // cannot wait ...
4 years, 6 months ago (2016-06-01 21:28:47 UTC) #28
eroman
https://codereview.chromium.org/1946793002/diff/420001/net/dns/fuzzed_host_resolver.cc File net/dns/fuzzed_host_resolver.cc (right): https://codereview.chromium.org/1946793002/diff/420001/net/dns/fuzzed_host_resolver.cc#newcode34 net/dns/fuzzed_host_resolver.cc:34: // Port 0 is magic. On 2016/06/01 21:21:51, mmenke ...
4 years, 6 months ago (2016-06-01 21:46:06 UTC) #29
mmenke
https://codereview.chromium.org/1946793002/diff/420001/net/dns/fuzzed_host_resolver.cc File net/dns/fuzzed_host_resolver.cc (right): https://codereview.chromium.org/1946793002/diff/420001/net/dns/fuzzed_host_resolver.cc#newcode34 net/dns/fuzzed_host_resolver.cc:34: // Port 0 is magic. On 2016/06/01 21:46:06, eroman ...
4 years, 6 months ago (2016-06-01 21:53:29 UTC) #30
mmenke
https://codereview.chromium.org/1946793002/diff/420001/net/dns/fuzzed_host_resolver.cc File net/dns/fuzzed_host_resolver.cc (right): https://codereview.chromium.org/1946793002/diff/420001/net/dns/fuzzed_host_resolver.cc#newcode34 net/dns/fuzzed_host_resolver.cc:34: // Port 0 is magic. On 2016/06/01 21:53:28, mmenke ...
4 years, 6 months ago (2016-06-01 21:54:26 UTC) #31
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1946793002/480001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1946793002/480001
4 years, 6 months ago (2016-06-01 21:56:42 UTC) #35
commit-bot: I haz the power
Try jobs failed on following builders: linux_chromium_rel_ng on tryserver.chromium.linux (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.linux/builders/linux_chromium_rel_ng/builds/239065)
4 years, 6 months ago (2016-06-02 00:27:51 UTC) #37
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1946793002/480001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1946793002/480001
4 years, 6 months ago (2016-06-02 02:25:14 UTC) #39
commit-bot: I haz the power
Try jobs failed on following builders: linux_chromium_rel_ng on tryserver.chromium.linux (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.linux/builders/linux_chromium_rel_ng/builds/239472)
4 years, 6 months ago (2016-06-02 03:11:54 UTC) #41
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1946793002/480001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1946793002/480001
4 years, 6 months ago (2016-06-02 14:51:02 UTC) #43
commit-bot: I haz the power
Committed patchset #19 (id:480001)
4 years, 6 months ago (2016-06-02 16:03:37 UTC) #45
commit-bot: I haz the power
4 years, 6 months ago (2016-06-02 16:07:49 UTC) #47
Message was sent while issue was closed.
Patchset 19 (id:??) landed as
https://crrev.com/91c1716731622e720e91dc052aaee9961a009423
Cr-Commit-Position: refs/heads/master@{#397429}

Powered by Google App Engine
This is Rietveld 408576698