[call] Dont take grpclb_client_stats from the app (#33118)
This metadata doesn't actually encode so passing it through from an app
will force a crash.
<!--
If you know who should review your pull request, please assign it to
that
person, otherwise the pull request would get assigned randomly.
If your pull request is for a specific language, please add the
appropriate
lang label.
-->
diff --git a/src/core/lib/surface/call.cc b/src/core/lib/surface/call.cc
index e104697..74fcf2f 100644
--- a/src/core/lib/surface/call.cc
+++ b/src/core/lib/surface/call.cc
@@ -445,6 +445,8 @@
}
// Ignore any te metadata key value pairs specified.
md.Remove(TeMetadata());
+ // Should never come from applications
+ md.Remove(GrpcLbClientStatsMetadata());
}
void Call::ProcessIncomingInitialMetadata(grpc_metadata_batch& md) {
diff --git a/test/core/end2end/fuzzers/api_fuzzer_corpus/clusterfuzz-testcase-minimized-api_fuzzer-4617967326068736 b/test/core/end2end/fuzzers/api_fuzzer_corpus/clusterfuzz-testcase-minimized-api_fuzzer-4617967326068736
new file mode 100644
index 0000000..3b1b9cd
--- /dev/null
+++ b/test/core/end2end/fuzzers/api_fuzzer_corpus/clusterfuzz-testcase-minimized-api_fuzzer-4617967326068736
@@ -0,0 +1,30 @@
+actions {
+ create_channel {
+ target: "unix:"
+ channel_actions {
+ add_n_bytes_readable: 25970
+ }
+ }
+}
+actions {
+ create_call {
+ propagation_mask: 9541248
+ method {
+ value: "grpc.service_config"
+ }
+ timeout: 993774335
+ }
+}
+actions {
+ queue_batch {
+ operations {
+ send_initial_metadata {
+ metadata {
+ key {
+ value: "grpclb_client_stats"
+ }
+ }
+ }
+ }
+ }
+}