mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: CGEL <cgel.zte@gmail.com>
To: Paul Moore <paul@paul-moore.com>
Cc: rth@twiddle.net, ink@jurassic.park.msu.ru, mattst88@gmail.com,
	eparis@redhat.com, linux-audit@redhat.com,
	kbuild-all@lists.01.org, linux-kernel@vger.kernel.org,
	Yang Yang <yang.yang29@zte.com.cn>,
	Zeal Robot <zealci@zte.com.cn>,
	guo.xiaofeng@zte.com.cn, huang.junhua@zte.com.cn,
	dai.shixin@zte.com.cn
Subject: Re: [PATCH] audit: do a quick exit when syscall number is invalid
Date: Thu, 31 Mar 2022 02:29:47 +0000	[thread overview]
Message-ID: <6245121e.1c69fb81.ea0ab.0c2e@mx.google.com> (raw)
In-Reply-To: <CAHC9VhTxACMG=V_J1OYy_7VjM3LjuNJcwJSf6om1eO8esCDAbg@mail.gmail.com>

On Wed, Mar 30, 2022 at 10:48:12AM -0400, Paul Moore wrote:
> On Wed, Mar 30, 2022 at 1:59 AM CGEL <cgel.zte@gmail.com> wrote:
> > On Tue, Mar 29, 2022 at 09:11:19AM -0400, Paul Moore wrote:
> > > On Mon, Mar 28, 2022 at 11:22 PM CGEL <cgel.zte@gmail.com> wrote:
> > > > On Mon, Mar 28, 2022 at 11:06:12PM -0400, Paul Moore wrote:
> > > > > On Mon, Mar 28, 2022 at 9:48 PM CGEL <cgel.zte@gmail.com> wrote:
> > > > > > Sorry could anybody give a hand to solve this? It works well on x86_64 and arm64.
> > > > > > I have no alpha environment and not familiar to this arch, much thanks!
> > > > >
> > > > > Regardless of if this is fixed, I'm not convinced this is something we
> > > > > want to merge.  After all, a process executed a syscall and we should
> > > > > process it like any other; just because it happens to be an
> > > > > unrecognized syscall on a particular kernel build doesn't mean it
> > > > > isn't security relevant (probing for specific syscall numbers may be a
> > > > > useful attack fingerprint).
> > > >
> > > > Thanks for your reply.
> > > >
> > > > But syscall number less than 0 is even invalid for auditctl. So we
> > > > will never hit this kind of audit rule. And invalid syscall number
> > > > will always cause failure early in syscall handle.
> > > >
> > > > sh-4.2# auditctl -a always,exit -F arch=b64 -S -1
> > > > Syscall name unknown: -1
> > >
> > > You can add an audit filter without explicitly specifying a syscall:
> > >
> > > % auditctl -a exit,always -F auid=1000
> > > % auditctl -l
> > > -a always,exit -S all -F auid=1000
> > >
> > I have tried this, and execute program which call syscall number is -1,
> > audit still didn't record it. It supports that there's no need for audit
> > to handle syscall number less than 0.
> >
> > sh-4.2# auditctl -a exit,always
> > sh-4.2# auditctl -l
> > -a always,exit -S all
> 
> If audit is not generating SYSCALL records, even for invalid/ENOSYS
> syscalls, I would consider that a bug which should be fixed.
>
If we fix this bug, do you think audit invalid/ENOSYS syscalls better
be forcible or be a rule that can be configure? I think configure is 
better.
> -- 
> paul-moore.com

  reply	other threads:[~2022-03-31  2:30 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-03-26  9:46 cgel.zte
2022-03-26 20:55 ` kernel test robot
2022-03-29  1:48   ` CGEL
2022-03-29  2:19     ` Enzo Matsumiya
2022-03-29  3:06     ` Paul Moore
2022-03-29  3:22       ` CGEL
2022-03-29 13:11         ` Paul Moore
2022-03-30  5:59           ` CGEL
2022-03-30 14:48             ` Paul Moore
2022-03-31  2:29               ` CGEL [this message]
2022-03-31 14:16                 ` Paul Moore
2022-04-01  1:57                   ` CGEL
2022-04-01 13:39                     ` Steve Grubb
2022-04-01 14:16                       ` Paul Moore
2022-04-02  8:06                         ` CGEL
2022-04-02 15:07                           ` Paul Moore
2022-04-04 15:58                           ` Richard Guy Briggs
2022-04-06  1:19                             ` CGEL
2022-04-06 16:49                               ` Richard Guy Briggs
2022-04-07  2:36                                 ` CGEL

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=6245121e.1c69fb81.ea0ab.0c2e@mx.google.com \
    --to=cgel.zte@gmail.com \
    --cc=dai.shixin@zte.com.cn \
    --cc=eparis@redhat.com \
    --cc=guo.xiaofeng@zte.com.cn \
    --cc=huang.junhua@zte.com.cn \
    --cc=ink@jurassic.park.msu.ru \
    --cc=kbuild-all@lists.01.org \
    --cc=linux-audit@redhat.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mattst88@gmail.com \
    --cc=paul@paul-moore.com \
    --cc=rth@twiddle.net \
    --cc=yang.yang29@zte.com.cn \
    --cc=zealci@zte.com.cn \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

Powered by JetHome