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

bug: Fix Potential Nil Reference in GetLabels Implementation #24416

Merged

Conversation

nathanjsweet
Copy link
Member

The policyIdentityLabelLookup wrapper for Endpoint implements the GetLabels interface method. This is necessary for constructing the MapState of the policy engine. This implementation incorrectly did not check if the identity returned by LookupIdentityByID was nil. This fixes this bug, which heretofore has not caused any issues.

The policyIdentityLabelLookup wrapper for Endpoint implements
the GetLabels interface method. This is necessary for the
constructing the MapState of the policy engine. This implementation
incorrectly did not check if the identity returned by LookupIdentityByID
was nil. This fixes this bug, which heretofore has not caused any issues.

Signed-off-by: Nate Sweet <nathanjsweet@pm.me>
@nathanjsweet nathanjsweet added the release-note/misc This PR makes changes that have no direct user impact. label Mar 16, 2023
@nathanjsweet nathanjsweet requested a review from a team as a code owner March 16, 2023 17:49
@christarazi christarazi added kind/bug This is a bug in the Cilium logic. sig/policy Impacts whether traffic is allowed or denied based on user-defined policies. labels Mar 16, 2023
@christarazi
Copy link
Member

/test

@christarazi christarazi removed the request for review from jrajahalme March 16, 2023 20:17
@maintainer-s-little-helper maintainer-s-little-helper bot added the ready-to-merge This PR has passed all tests and received consensus from code owners to merge. label Mar 16, 2023
@borkmann borkmann merged commit bfbe5a2 into master Mar 17, 2023
42 checks passed
@borkmann borkmann deleted the pr/nathanjsweet/fix-policy-identity-label-nil-reference branch March 17, 2023 12:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/bug This is a bug in the Cilium logic. ready-to-merge This PR has passed all tests and received consensus from code owners to merge. release-note/misc This PR makes changes that have no direct user impact. sig/policy Impacts whether traffic is allowed or denied based on user-defined policies.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants