Skip to content

Commit d00582b

Browse files
committed
Fix fuzzer bug b/309756937 (grpc#35279)
Built on grpc#35278, which should be landed first Always fail parsing when `grpclb_client_stats` is included in headers -- it's a meaningless value and the only reason to include it would be some sort of attack. Closes grpc#35279 COPYBARA_INTEGRATE_REVIEW=grpc#35279 from ctiller:fuzz-309756937 545448c PiperOrigin-RevId: 590745978
1 parent 33a4c8c commit d00582b

File tree

6 files changed

+6
-5
lines changed

6 files changed

+6
-5
lines changed

src/core/lib/transport/metadata_batch.h

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -410,7 +410,8 @@ struct GrpcLbClientStatsMetadata {
410410
static const char* DisplayMemento(MementoType) {
411411
return "<internal-lb-stats>";
412412
}
413-
static MementoType ParseMemento(Slice, bool, MetadataParseErrorFn) {
413+
static MementoType ParseMemento(Slice, bool, MetadataParseErrorFn error) {
414+
error("not a valid value for grpclb_client_stats", Slice());
414415
return nullptr;
415416
}
416417
};

src/objective-c/tests/Hosts/ios-host/AppDelegate.github.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,4 +22,4 @@
2222

2323
@property(strong, nonatomic) UIWindow* window;
2424

25-
@end
25+
@end

src/objective-c/tests/Hosts/ios-host/AppDelegate.github.m

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,4 +24,4 @@ @interface AppDelegate ()
2424

2525
@implementation AppDelegate
2626

27-
@end
27+
@end

src/objective-c/tests/Hosts/ios-host/Info.github.plist

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,4 +38,4 @@
3838
<string>UIInterfaceOrientationLandscapeRight</string>
3939
</array>
4040
</dict>
41-
</plist>
41+
</plist>

src/objective-c/tests/Hosts/ios-host/main.github.m

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,4 +23,4 @@ int main(int argc, char* argv[]) {
2323
@autoreleasepool {
2424
return UIApplicationMain(argc, argv, nil, NSStringFromClass([AppDelegate class]));
2525
}
26-
}
26+
}
Binary file not shown.

0 commit comments

Comments
 (0)