roll: pigweed, pw_toolchain: pw_grpc: Skip HTTP2 frame payload for frames that result in stream reset

When receiving invalid frames from a client, some errors result in
stream reset (force closure), and some errors result in connection
closure.

If the error only results in stream reset, the rest of the frames sent
in the connection should be readable by the server. This means that the
entire frame should be skipped over, with normal connection processing
happening after.

Previously, the code did not skip past the payload for DATA and HEADERS
frames that resulted in a stream-reset error. Thus, when continuing to
process the connection, the payload of the frame would be interpreted as
the header of the next frame, resulting in a cascade of failures.

This commit fixes the issue by ensuring that, for frames with a payload,
the payload is skipped when encountering a stream-reset error. For
errors that result in a connection error (GOAWAY), there are no changes.

Test: Set up a situation where the client sends a DATA frame with a
Test: payload on a stream that the server has already closed.
Test: Observe that the server recognizes this is data for a closed
Test: stream, and that subsequent frames are received and interpreted
Test: correctly.
Original-Reviewed-on: https://pigweed-review.googlesource.com/c/pigweed/pigweed/+/230951

https://pigweed.googlesource.com/pigweed/pigweed
pigweed, pw_toolchain Rolled-Commits: 7e7c141c8808200..821e313b4756e1d
Roller-URL: https://ci.chromium.org/b/8739051093813627025
GitWatcher: ignore
CQ-Do-Not-Cancel-Tryjobs: true
Change-Id: Id27d4ca09e3bfd31e3ac5c644a49b34d7099692b
Reviewed-on: https://pigweed-review.googlesource.com/c/pigweed/showcase/sense/+/230876
Bot-Commit: Pigweed Roller <pigweed-roller@pigweed-service-accounts.iam.gserviceaccount.com>
Lint: Lint 🤖 <android-build-ayeaye@system.gserviceaccount.com>
Commit-Queue: Pigweed Roller <pigweed-roller@pigweed-service-accounts.iam.gserviceaccount.com>
1 file changed
tree: a8acc3876468c85abfc6ae7e17f48080061f43ad
  1. .github/
  2. .vscode/
  3. apps/
  4. device/
  5. modules/
  6. system/
  7. targets/
  8. tools/
  9. web_app/
  10. .bazelignore
  11. .bazelrc
  12. .bazelversion
  13. .buildifier.json
  14. .clang-format
  15. .clangd.shared
  16. .gitignore
  17. .pw_console.yaml
  18. AUTHORS
  19. BUILD.bazel
  20. CONTRIBUTING.md
  21. LICENSE
  22. MODULE.bazel
  23. OWNERS
  24. pigweed.json
  25. README.md
README.md

Sense

git clone https://pigweed.googlesource.com/pigweed/showcase/sense

Welcome to Pigweed Sense, a tour of key Pigweed components experienced through an imagined air quality product.

Please visit Sense: An interactive tour through Pigweed to get started.