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

filters/fields: do a deep copy before filtering #1726

Merged
merged 1 commit into from
Nov 6, 2023

Conversation

willfindlay
Copy link
Contributor

[upstream commit 09de1f8]

We need to deep copy the event here to avoid issues caused by filtering out information that is shared between events through the event cache (e.g. process info). This can cause segmentation faults and other nasty bugs. Avoid all that by doing a deep copy here before filtering. This is not pretty or great for performance, but it at least works as a stopgap until we're able to refactor things so that it's no longer necessary.

Fix a number of segmentation faults related to field filters.

[upstream commit 09de1f8]

We need to deep copy the event here to avoid issues caused by filtering out information
that is shared between events through the event cache (e.g. process info). This can cause
segmentation faults and other nasty bugs. Avoid all that by doing a deep copy here before
filtering. This is not pretty or great for performance, but it at least works as a stopgap
until we're able to refactor things so that it's no longer necessary.

Signed-off-by: William Findlay <will@isovalent.com>
@willfindlay willfindlay added the release-note/bug This PR fixes an issue in a previous release of Tetragon. label Nov 6, 2023
@willfindlay willfindlay requested a review from kkourt November 6, 2023 16:33
@willfindlay willfindlay requested a review from a team as a code owner November 6, 2023 16:33
@willfindlay willfindlay merged commit a5f4235 into v1.0 Nov 6, 2023
27 checks passed
@willfindlay willfindlay deleted the backports/v1.0/1712 branch November 6, 2023 17:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
release-note/bug This PR fixes an issue in a previous release of Tetragon.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants