Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix null metadata dereference in Thrift proxy router for shadow traffic #38181

Draft
wants to merge 2 commits into
base: main
Choose a base branch
from

Formatting

432baf3
Select commit
Loading
Failed to load commit list.
Draft

Fix null metadata dereference in Thrift proxy router for shadow traffic #38181

Formatting
432baf3
Select commit
Loading
Failed to load commit list.
CI (Envoy) / Envoy/Checks succeeded Jan 24, 2025 in 35m 48s

Envoy/Checks (success)

Check has finished

Details

Check run finished (success ✔️)

The check run can be viewed here:

Envoy/Checks (pr/38181/main@432baf3)

Check started by

Request (pr/38181/main@432baf3)

PeterL328 @PeterL328 432baf3 #38181 merge main@969348a

Fix null metadata dereference in Thrift proxy router for shadow traffic

This commit addresses a segmentation fault in Envoy’s Thrift proxy when handling shadow traffic. The crash occurs due to a null pointer dereference of MessageMetadata within the shadow router path during response parsing from upstream. In scenarios where the Thrift decoder unexpectedly returns a complete parsing status without metadata, the previous logic led to crashing. Now, UpstreamRequest has been updated to include null-checks around metadata access during handleRegularResponse(), treating it as an error condition.

Commit Message:
Additional Description:
Risk Level:
Testing:
Docs Changes:
Release Notes:
Platform Specific Features:
[Optional Runtime guard:]
[Optional Fixes #Issue]
[Optional Fixes commit #PR or SHA]
[Optional Deprecated:]
[Optional API Considerations:]

Environment

Request variables

Key Value
ref de5b5c1
sha 432baf3
pr 38181
base-sha 969348a
actor PeterL328 @PeterL328
message Fix null metadata dereference in Thrift proxy router for shadow traffic...
started 1737719595.955923
target-branch main
trusted false
Build image

Container image/s (as used in this CI run)

Key Value
default envoyproxy/envoy-build-ubuntu:d2be0c198feda0c607fa33209da01bf737ef373f
mobile envoyproxy/envoy-build-ubuntu:mobile-d2be0c198feda0c607fa33209da01bf737ef373f
Version

Envoy version (as used in this CI run)

Key Value
major 1
minor 34
patch 0
dev true