[PATCH v4 28/30] audit, landlock: Add AUDIT_EXE_LANDLOCK_DENY rule type
Paul Moore
paul at paul-moore.com
Thu Jan 16 20:24:04 UTC 2025
On Thu, Jan 16, 2025 at 5:57 AM Mickaël Salaün <mic at digikod.net> wrote:
> On Wed, Jan 15, 2025 at 06:53:08PM -0500, Paul Moore wrote:
> > On Jan 8, 2025 =?UTF-8?q?Micka=C3=ABl=20Sala=C3=BCn?= <mic at digikod.net> wrote:
> > >
> > > Landlock manages a set of standalone security policies, which can be
> > > loaded by any process. Because a sandbox policy may contain errors and
> > > can lead to log spam, we need a way to exclude some of them. It is
> > > simple and it makes sense to identify Landlock domains (i.e. security
> > > policies) per binary path that loaded such policy.
> > >
> > > Add a new AUDIT_EXE_LANDLOCK_DENY rule type to enables system
> > > administrator to filter logs according to the origin or the security
> > > policy responsible for a denial.
> >
> > For reasons similar to why I didn't want to expose the audit timestamp
> > to users outside of audit, I'm not very enthusiastic about expanding
> > the audit filtering code at this point in time.
> >
> > I'm not saying "no" exactly, just "not right now".
>
> Contrary to MAC systems which are configured and tuned by one entity
> (e.g. the sysadmin), Landlock security policies can be configured by a
> lot of different entities (e.g. sysadmin, app developers, users). One
> noisy policy (e.g. a buggy sandboxed tar called in a loop by maintenance
> scripts) could easily flood the audit logs without the ability for
> sysadmins to filter such policy. They will only be able to filter all
> users that *may* trigger such log (by executing the buggy sandboxed
> app), which would mean almost all users, which would mask all other
> legitimate Landlock events, then nullifying the entire audit support for
> Landlock.
>
> My plan was to extend these new kind of filter types to PID, UID, GID,
> and LOGINUID (a subset of the audit filter exclude list) to give the
> necessary flexibility to filter policy creators.
>
> We really need a way to filter policy creators, and that needs to be
> part of the (initial) Landlock audit support for it to be viable.
> What do you propose?
If I recall correctly, there are other patches in the patchset which
provide some filtering of audit Landlock messages using mechanisms
specific to Landlock, that may be an option here. If not, perhaps the
audit log is not the best way to log Landlock events?
--
paul-moore.com
More information about the Linux-security-module-archive
mailing list