[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <aXmB9XIzmRlwSdx4@mail.hallyn.com>
Date: Tue, 27 Jan 2026 21:26:45 -0600
From: "Serge E. Hallyn" <serge@...lyn.com>
To: Paul Moore <paul@...l-moore.com>
Cc: "Serge E. Hallyn" <serge@...lyn.com>,
Ondrej Mosnacek <omosnace@...hat.com>,
Andrew Morton <akpm@...ux-foundation.org>,
"Eric W . Biederman" <ebiederm@...ssion.com>,
Alexey Gladkov <legion@...nel.org>, linux-kernel@...r.kernel.org,
linux-security-module@...r.kernel.org, selinux@...r.kernel.org
Subject: Re: [PATCH] ipc: don't audit capability check in ipc_permissions()
On Tue, Jan 27, 2026 at 05:06:47PM -0500, Paul Moore wrote:
> On Mon, Jan 26, 2026 at 9:01 PM Serge E. Hallyn <serge@...lyn.com> wrote:
> > On Mon, Jan 26, 2026 at 05:50:12PM -0500, Paul Moore wrote:
> > > On Thu, Jan 22, 2026 at 9:56 AM Ondrej Mosnacek <omosnace@...hat.com> wrote:
> > > >
> > > > The IPC sysctls implement the ctl_table_root::permissions hook and
> > > > they override the file access mode based on the CAP_CHECKPOINT_RESTORE
> > > > capability, which is being checked regardless of whether any access is
> > > > actually denied or not, so if an LSM denies the capability, an audit
> > > > record may be logged even when access is in fact granted.
> > > >
> > > > It wouldn't be viable to restructure the sysctl permission logic to only
> > > > check the capability when the access would be actually denied if it's
> > > > not granted. Thus, do the same as in net_ctl_permissions()
> > > > (net/sysctl_net.c) - switch from ns_capable() to ns_capable_noaudit(),
> > > > so that the check never emits an audit record.
> > > >
> > > > Fixes: 0889f44e2810 ("ipc: Check permissions for checkpoint_restart sysctls at open time")
> > > > Signed-off-by: Ondrej Mosnacek <omosnace@...hat.com>
> > > > ---
> > > > include/linux/capability.h | 6 ++++++
> > > > ipc/ipc_sysctl.c | 2 +-
> > > > 2 files changed, 7 insertions(+), 1 deletion(-)
> > >
> > > This change seems reasonable to me, but I would make sure Serge has a
> > > chance to review/ACK this patch as it has a capability impact.
> >
> > Acked-by: Serge Hallyn <serge@...lyn.com>
> >
> > Thanks - looks good to me.
>
> I don't see a dedicated IPC maintainer/tree, do you want to take this
> via the capabilities tree Serge?
Will do.
-serge
Powered by blists - more mailing lists