[xds_client_fuzzer] fix null pointer dereference in `FakeXdsTransport::TriggerConnectionFailure()` (#33117)

b/259358608
pull/33116/head
Mark D. Roth 2 years ago committed by GitHub
parent 13133ae703
commit 5ae1cfcce3
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 24
      test/core/xds/xds_client_corpora/fake_transport_trigger_connection_failure
  2. 2
      test/core/xds/xds_transport_fake.cc

@ -0,0 +1,24 @@
bootstrap: "{\"xds_servers\": [{\"server_uri\":\"xds.example.com:659\", \"channel_creds\":[{\"type\": \"fake\"}]}]}"
actions {
start_watch {
resource_type {
endpoint {
}
}
resource_name_url: "//ClientHello"
value: "J\001-8\377\248󠀬03209960555158341825735263247\213\1110977990980586646490508\377\377\377\377\377\0227\227\227\227\227\227\226\227\227\227\2vers\\\": [{\\\"server_uri\\\":\\\"xds.example.com:443\\\"\\\"channel_cr␜␜␜␜␜␜␜␜␜␜␜␜␜␜␜␜␜␜␜␜␜␜␜␜␜␜␜␜␜␜␜␜␜␜␜␜␜␜␜␜␜␜␜␜␜␜␜␜␜␜␜␜␜␜␜␜␜␜␜␜␜␜␜␜␜␜␜␜␜␜␜␜␜␜␜␜␜␜␜␜␜␜␜␜␜␜␜␜␜␜␜␜␜␜␜␜␜␜␜␜␜␜␜␜␜␜␜␜␜␜␜␜␜␜␜␜␜␜n start_watch {\n resource_type {\n route_config {\n }\n }\n resource_name: \"/\"\n }\n}\nactions {\n stop_watch {\n resource_name: \"QQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQ\"\n }\n}\nactions {\n stop_watch {\n resource_type {\n cluster {\n }\n }\n }\n}\n"
}
}
actions {
stop_watch {
resource_type {
endpoint {
}
}
resou2ce_name: "QQQQQQQQQQQQQQQQQQQQQQQ\177\177\177\177\177\177\177\177\177\177\177\177\177\177\177\177\177\177\177\177\177\177\177\177\177\177\177\177\177\0178\177\177\177\177\177\177\177\177\177\002\177\177\177W\177\177\177\177\177\177\177\177\177\177\177\177\177\177\177\177\177\177\177\177\177\177\177\177\0018446744073709551615\177\177QQQQQQQQQQ"
}
}
actions {
trigger_connection_failure {
}
}

@ -160,7 +160,7 @@ void FakeXdsTransportFactory::FakeXdsTransport::TriggerConnectionFailure(
RefCountedPtr<RefCountedOnConnectivityFailure> on_connectivity_failure;
{
MutexLock lock(&mu_);
on_connectivity_failure = on_connectivity_failure_->Ref();
on_connectivity_failure = on_connectivity_failure_;
}
ExecCtx exec_ctx;
if (on_connectivity_failure != nullptr) {

Loading…
Cancel
Save