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 potential null dereference in ext_authz #36268

Merged
merged 4 commits into from
Oct 15, 2024

use hasData rather than hasDataWithName

8b0a04b
Select commit
Loading
Failed to load commit list.
Merged

fix potential null dereference in ext_authz #36268

use hasData rather than hasDataWithName
8b0a04b
Select commit
Loading
Failed to load commit list.
CI (Envoy) / Mobile/iOS tests skipped Oct 14, 2024 in 0s

Check was skipped

This check was not triggered in this CI run

Details

Request (pr/36268/main@8b0a04b)

antoniovleonti @antoniovleonti 8b0a04b #36268 merge main@d5834c1

fix potential null dereference in ext_authz

Commit Message: fix potential null dereference in ext_authz
Additional Description:

Previously, if ext_authz had emit filter state stats set to true and another filter added filter state under the ext authz filter's name, it would result in a null dereference. The member logging_info_ would not be set in initiateCall after seeing there was already data there. Later, we would dereference logging_info_ to update the stats as if it were initialized already.

I've added a check for a null logging_info_ and added logging & a stat for when there's a filter state naming collision.

I also made some readability improvements to the ext_authz test.

Risk Level: low
Testing: unit tested
Docs Changes: none
Release Notes: none
Platform Specific Features: none

Environment

Request variables

Key Value
ref 2eac096
sha 8b0a04b
pr 36268
base-sha d5834c1
actor antoniovleonti @antoniovleonti
message fix potential null dereference in ext_authz...
started 1728928129.766703
target-branch main
trusted false
Build image

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

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

Envoy version (as used in this CI run)

Key Value
major 1
minor 32
patch 0
dev true