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

tracing: allow only one of kprobes/tracepoints/lsm #2708

Merged
merged 1 commit into from
Jul 22, 2024
Merged

Conversation

kkourt
Copy link
Contributor

@kkourt kkourt commented Jul 22, 2024

For historic reasons, the tracing sensor has three different aspects: kprobes, tracepoints, and (recently) lsm hooks.

Also for historic reasons, we did not allow tracepoints and kprobes in the same policy.

With the addition of the LSM sensor
(8eb13e8), if a policy includes an lsm section together with either a kprobe section or a tracepoint section, the lsm section will be ignored.

This patch rejects policies that have more than one section of kprobes, tracepoints, and lsm hooks in the policy.

A better solution would be to decouple the tracing sensor, and create one sensor for kprobes, one for tracepoints, and one for lsm sensors. See: #2706

CC: @anfedotoff

For historic reasons, the tracing sensor has three different aspects:
kprobes, tracepoints, and (recently) lsm hooks.

Also for historic reasons, we did not allow tracepoints and kprobes in
the same policy.

With the addition of the LSM sensor
(8eb13e8), if a policy includes an lsm
section together with either a kprobe section or a tracepoint section,
the lsm section will be ignored.

This patch rejects policies that have more than one section of kprobes,
tracepoints, and lsm hooks in the policy.

A better solution would be to decouple the tracing sensor, and create
one sensor for kprobes, one for tracepoints, and one for lsm sensors.
See: #2706

Fixes: 8eb13e8

Signed-off-by: Kornilios Kourtis <[email protected]>
@kkourt kkourt added the release-note/misc This PR makes changes that have no direct user impact. label Jul 22, 2024
@kkourt kkourt requested a review from a team as a code owner July 22, 2024 09:54
@kkourt kkourt requested a review from kevsecurity July 22, 2024 09:54
@kkourt kkourt merged commit 95f2637 into main Jul 22, 2024
42 checks passed
@kkourt kkourt deleted the pr/kkourt/lsm-alone branch July 22, 2024 11:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
release-note/misc This PR makes changes that have no direct user impact.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants