Fix invalid HTTP2 parsing - #932
Merged
Merged
Conversation
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #932 +/- ##
==========================================
+ Coverage 55.26% 55.84% +0.58%
==========================================
Files 253 255 +2
Lines 21769 22139 +370
==========================================
+ Hits 12031 12364 +333
- Misses 8911 8936 +25
- Partials 827 839 +12
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
grcevski
added a commit
to grafana/opentelemetry-ebpf-instrumentation
that referenced
this pull request
Nov 26, 2025
Merged
marctc
pushed a commit
to grafana/opentelemetry-ebpf-instrumentation
that referenced
this pull request
Dec 9, 2025
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Since HTTP2 (including gRPC) client connections can be long lived, we might never see the HTTP2 preamble in eBPF, so we have code in userspace that detects if a frame might be HTTP2/gRPC.
Since HTTP2/gRPC is binary and a lot of the header values are encoded in the static/dynamic tables, it's possible in practice to match HTTP2 accidentally with random binary text, e.g. something from TLS. Our logic to detect HTTP2 in userspace was too lenient and could cause false positives.
I've re-worked the code with additional logic:
:pathwithout:methodmakes no sense, and matching:methodalone is not clear since the constants are all in the static table and can be fooled by binary.