You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently it is not possible to only allow certain values in a filter that is permissive. If we had x in [values] and x not_in [values] operators, it would be possible to express such conditions. Currently we have to list all values that we want to deny. Example of the proposed:
What you are proposing would be a bit of syntactic sugar that would complicate the implementation and the file format quite a lot.
One core thing we tried to keep for seccompiler is its simplicity in the filter format. The interface we currently have tries to satisfy all use cases while keeping the code simple enough and not introducing a lot of conflicting cases in the validation of the format.
In this specific case I believe it introduces more overhead and complexity than simplicity.
Or are you trying to deny every socket call that doesn't have AF_INET or AF_INET6 types?
If that's the case, indeed you'd need to list all possible types of socket address types.
In order to simplify this, you could use the Le, Ge, etc. operators, potentially.
As a general rule though, it's not recommended to use denylists for this exact reason. You need to have huge lists of potentially dangerous system calls and parameters that need to be updated frequently (and leave room for security issues if not updated).
Currently it is not possible to only allow certain values in a filter that is permissive. If we had
x in [values]
andx not_in [values]
operators, it would be possible to express such conditions. Currently we have to list all values that we want to deny. Example of the proposed:The text was updated successfully, but these errors were encountered: