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

killer: assorted fixes #2058

Merged
merged 8 commits into from
Feb 16, 2024
Merged

killer: assorted fixes #2058

merged 8 commits into from
Feb 16, 2024

Conversation

olsajiri
Copy link
Contributor

@olsajiri olsajiri commented Feb 2, 2024

Forcing fmod_ret method for secrity_* functions.
Allow multiple killer sensors.

@olsajiri olsajiri added the release-note/minor This PR introduces a minor user-visible change label Feb 2, 2024
@olsajiri olsajiri force-pushed the pr/olsajiri/killer_fixes branch 5 times, most recently from eb6c14a to 59dbdbd Compare February 11, 2024 21:31
@olsajiri olsajiri changed the title Pr/olsajiri/killer fixes killer: assorted fixes Feb 11, 2024
@olsajiri olsajiri force-pushed the pr/olsajiri/killer_fixes branch 3 times, most recently from 9389dc8 to ea32849 Compare February 12, 2024 08:38
@olsajiri olsajiri marked this pull request as ready for review February 12, 2024 11:23
@olsajiri olsajiri requested a review from a team as a code owner February 12, 2024 11:23
Based on the link used, so it's not confusing in error messages.

Signed-off-by: Jiri Olsa <[email protected]>
Due to kernel restrictions we can't use override return for security_*
functions. Let's detect this and force fmod_ret for such case unless
the 'override return' mode is specifically required.

Signed-off-by: Jiri Olsa <[email protected]>
To make the following changes easier.

Signed-off-by: Jiri Olsa <[email protected]>
Adding killerHandler object to carry the syscall symbols as a
preparation for allowing multiple instances of killer sensors.

Signed-off-by: Jiri Olsa <[email protected]>
Adding suppoer to have multiple instances of killer sensor,
the limitation on single killer instance in policy stays.

Signed-off-by: Jiri Olsa <[email protected]>
The killer_data is currently global to all instances of killer sensor,
making it easy for tracepoint/kprobe sensors to communicate the NotifyKiller
action. But it causes an issue when one killer instance is removed and
removes the pinned map.

Solving this by making the killer_data map spcific for policy. This way
each killer sensor has its own killer_data map and related tracepoints
or kprobes are able to map to proper killer_data map.

Signed-off-by: Jiri Olsa <[email protected]>
So we can set sys_prctl first argument value from following test.

Signed-off-by: Jiri Olsa <[email protected]>
Loading 2 different killer policies in the test and making sure
they catch and kill.

Signed-off-by: Jiri Olsa <[email protected]>
Copy link
Member

@tpapagian tpapagian left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, thanks!

Copy link
Contributor

@kkourt kkourt left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, thanks!

@kkourt kkourt merged commit 78770f4 into main Feb 16, 2024
36 checks passed
@kkourt kkourt deleted the pr/olsajiri/killer_fixes branch February 16, 2024 07:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
release-note/minor This PR introduces a minor user-visible change
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants