[PATCH] pid: use ns_capable_noaudit() when determining net sysctl permissions

Serge E. Hallyn serge at hallyn.com
Fri Sep 12 19:35:45 UTC 2025


On Thu, Sep 11, 2025 at 06:05:05PM -0500, Serge E. Hallyn wrote:
> On Thu, Sep 11, 2025 at 04:46:20PM -0400, Paul Moore wrote:
> > On Sep 10, 2025 =?UTF-8?q?Christian=20G=C3=B6ttsche?= <cgoettsche at seltendoof.de> wrote:
> > > 
> > > The capability check should not be audited since it is only being used
> > > to determine the inode permissions. A failed check does not indicate a
> > > violation of security policy but, when an LSM is enabled, a denial audit
> > > message was being generated.
> > > 
> > > The denial audit message can either lead to the capability being
> > > unnecessarily allowed in a security policy, or being silenced potentially
> > > masking a legitimate capability check at a later point in time.
> > > 
> > > Similar to commit d6169b0206db ("net: Use ns_capable_noaudit() when
> > > determining net sysctl permissions")
> > > 
> > > Fixes: 7863dcc72d0f ("pid: allow pid_max to be set per pid namespace")
> > > CC: Christian Brauner <brauner at kernel.org>
> > > CC: linux-security-module at vger.kernel.org
> > > CC: selinux at vger.kernel.org
> > > Signed-off-by: Christian Göttsche <cgzones at googlemail.com>
> > > ---
> > >  kernel/pid.c | 2 +-
> > >  1 file changed, 1 insertion(+), 1 deletion(-)
> > 
> > Reviewed-by: Paul Moore <paul at paul-moore.com>
> 
> Thanks.
> 
> Acked-by: Serge Hallyn <serge at hallyn.com>
> 
> I'll queue this up in the capability tree, unless Christian wanted
> it in his.
> 
> -serge

I've included this in git://git.kernel.org/pub/scm/linux/kernel/git/sergeh/linux.git#caps-next

thanks,
-serge



More information about the Linux-security-module-archive mailing list