symbols_loaded
and symbols_collision
events work incorrectly with multiple policies
#4352
Labels
symbols_loaded
and symbols_collision
events work incorrectly with multiple policies
#4352
Description
The derive logic for these events does not take into account cases where multiple policies select the event and specify different sets of symbols or whitelisted libraries.
The current behavior is that the filters for these events are overwritten by the last policy that specifies them:
The copy operation overwrites filters from previous policies. This is easy to observe using 2 simple policies that specify different symbols for
symbols_loaded
:policy1.yaml
policy2.yaml
Running with each policy by itself results in the expected behavior, but when using both:
Only the
fopen
symbol from the second policy is shown.Fixing this behavior is not as simple as combining the filters, because the whitelisted libraries of
symbols_loaded
must be taken into account such that an event from a library excluded by one policy will not be excluded completely.This probably requires some sort of per-policy derive logic, where a separate event or set of events is derived for each policy and only sent to that policy's output (to avoid duplications in cases where the output filter accepts events that were created for a different policy).
Output of
tracee version
:The text was updated successfully, but these errors were encountered: