aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDmitry Vyukov <dvyukov@google.com>2020-01-15 17:53:04 +0100
committerDmitry Vyukov <dvyukov@google.com>2020-01-15 18:04:24 +0100
commit0b7abdf922ce6cd06d8d110a934adbe7e339417b (patch)
tree4f0de87a90678298c5e46de7b4e5528556046bd3
parent4272e40b21ae4d3cb66ff106d302c4a6f5867c63 (diff)
syz-manager: don't send more than 100K inputs to hub
Never send more than 100K, this is never healthy but happens episodically due to various reasons: problems with fallback coverage, bugs in kcov, fuzzer exploiting our infrastructure, etc.
-rw-r--r--syz-manager/hub.go7
1 files changed, 7 insertions, 0 deletions
diff --git a/syz-manager/hub.go b/syz-manager/hub.go
index 1b05daf87..ff0f26066 100644
--- a/syz-manager/hub.go
+++ b/syz-manager/hub.go
@@ -88,6 +88,13 @@ func (hc *HubConnector) connect(corpus [][]byte) (*rpctype.RPCClient, error) {
hubCorpus[hash.Hash(inp)] = true
a.Corpus = append(a.Corpus, inp)
}
+ // Never send more than this, this is never healthy but happens episodically
+ // due to various reasons: problems with fallback coverage, bugs in kcov,
+ // fuzzer exploiting our infrastructure, etc.
+ const max = 100 * 1000
+ if len(a.Corpus) > max {
+ a.Corpus = a.Corpus[:max]
+ }
// Hub.Connect request can be very large, so do it on a transient connection
// (rpc connection buffers never shrink).
if err := rpctype.RPCCall(hc.cfg.HubAddr, "Hub.Connect", a, nil); err != nil {