transport: don't crash if peer sends an empty header field name

The grpc-http2 transport doesn't validate hpack-decoded field names to be
valid http2 field names before checking their first byte. Had it verified
first and found that the empty string is illegal, this crash wouldn't happen,
but currently a malicious request can crash a gRPC server by sending an empty
hpack string.
2 files changed
tree: 44300da9b586a26930b769794618596eccd48bb3
  1. benchmark/
  2. codes/
  3. credentials/
  4. Documentation/
  5. examples/
  6. grpclog/
  7. health/
  8. interop/
  9. metadata/
  10. naming/
  11. peer/
  12. test/
  13. testdata/
  14. transport/
  15. .travis.yml
  16. call.go
  17. call_test.go
  18. clientconn.go
  19. clientconn_test.go
  20. codegen.sh
  21. CONTRIBUTING.md
  22. coverage.sh
  23. doc.go
  24. LICENSE
  25. Makefile
  26. PATENTS
  27. picker.go
  28. picker_test.go
  29. README.md
  30. rpc_util.go
  31. rpc_util_test.go
  32. server.go
  33. stream.go
  34. trace.go
README.md

#gRPC-Go

Build Status GoDoc

The Go implementation of gRPC: A high performance, open source, general RPC framework that puts mobile and HTTP/2 first. For more information see the gRPC Quick Start guide.

Installation

To install this package, you need to install Go 1.4 or above and setup your Go workspace on your computer. The simplest way to install the library is to run:

$ go get google.golang.org/grpc

Prerequisites

This requires Go 1.4 or above.

Constraints

The grpc package should only depend on standard Go packages and a small number of exceptions. If your contribution introduces new dependencies which are NOT in the list, you need a discussion with gRPC-Go authors and consultants.

Documentation

See API documentation for package and API descriptions and find examples in the examples directory.

Status

Beta release