How to define audit rule for one bit *not* set for a syscall argument?

Richard Du duxiong at gmail.com
Wed Mar 8 13:46:57 UTC 2023


Hello all,

I'm trying to define an audit rule with auditctl for clone() syscall, and I
would expect that the a0 of clone() syscall (i.e. the clone_flags argument)
without the CLONE_THREAD flag bit being set.

int clone(int (*fn)(void *), void *stack, int flags, void *arg, ...
                 /* pid_t *parent_tid, void *tls, pid_t *child_tid */ );

>From man page of auditctl, -F option build a rule file: name, operation,
value.
-F [n=v | n!=v | n<v | n>v | n<=v | n>=v | n&v | n&=v]

I can understand that, the n&v (Audit_bitmask) means any bit of a bitmast
is set, and the n&=v (Audit_bittest) means all bits of a bitmask are set.

While my question is, how to build a rule which means "none of bit of a
bitmask is set", i.e. ( ! n&=v ). If the current audit comparator dosen't
support this, can we add the support in furture?

Thanks,
Richard
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://listman.redhat.com/archives/linux-audit/attachments/20230308/4920aeea/attachment.htm>


More information about the Linux-audit mailing list