lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20071128234743.GA26217@sergelap.austin.ibm.com>
Date:	Wed, 28 Nov 2007 17:47:43 -0600
From:	"Serge E. Hallyn" <serue@...ibm.com>
To:	Casey Schaufler <casey@...aufler-ca.com>
Cc:	Jiri Slaby <jirislaby@...il.com>,
	Andrew Morton <akpm@...ux-foundation.org>,
	linux-kernel@...r.kernel.org, "Serge E. Hallyn" <serue@...ibm.com>,
	"Andrew G. Morgan" <morgan@...nel.org>
Subject: Re: named + capset = EPERM [Was: 2.6.24-rc3-mm2]

Quoting Casey Schaufler (casey@...aufler-ca.com):
> 
> --- Jiri Slaby <jirislaby@...il.com> wrote:
> 
> > On 11/28/2007 12:41 PM, Andrew Morton wrote:
> > >
> >
> ftp://ftp.kernel.org/pub/linux/kernel/people/akpm/patches/2.6/2.6.24-rc3/2.6.24-rc3-mm2/
> > [...]
> > > +capabilities-introduce-per-process-capability-bounding-set.patch
> > 
> > A regression against -mm1. This patch breaks bind (9.5.0-18.a7.fc8):
> > capset(0x19980330, 0,
> >
> {CAP_DAC_READ_SEARCH|CAP_SETGID|CAP_SETUID|CAP_NET_BIND_SERVICE|CAP_SYS_CHROOT|CAP_SYS_RESOURCE,
> >
> CAP_DAC_READ_SEARCH|CAP_SETGID|CAP_SETUID|CAP_NET_BIND_SERVICE|CAP_SYS_CHROOT|CAP_SYS_RESOURCE,
> > 0}) = -1 EPERM (Operation not permitted)
> > 
> > $ grep SEC .config
> > CONFIG_SECCOMP=y
> > # CONFIG_NETWORK_SECMARK is not set
> > CONFIG_RPCSEC_GSS_KRB5=m
> > # CONFIG_RPCSEC_GSS_SPKM3 is not set
> > # CONFIG_SECURITY is not set
> > # CONFIG_SECURITY_FILE_CAPABILITIES is not set
> > 
> > probably this hunk?:
> > @@ -133,6 +119,12 @@ int cap_capset_check (struct task_struct
> >                 /* incapable of using this inheritable set */
> >                 return -EPERM;
> >         }
> > +       if (!!cap_issubset(*inheritable,
> > +                          cap_combine(target->cap_inheritable,
> > +                                      current->cap_bset))) {
> > +               /* no new pI capabilities outside bounding set */
> > +               return -EPERM;
> > +       }

That shouldn't be it, since you can't lower cap_bset since
CONFIG_SECURITY_FILE_CAPABILITIES=n.

> > 
> >         /* verify restrictions on target's new Permitted set */
> >         if (!cap_issubset (*permitted,
> 
> I can see that the value for CAP_LAST_CAP is not right in
> include/linux/capability.h, but I don't know if that is the

Alas, that doesn't seem likely to be it either, since cap_valid() and
therefore CAP_LAST_CAP are only used when tweaking the cap_bset.

> only problem. I should have a patch (unless someone beats me to it)
> later today.

Oh, sorry, after I sent the patch to fix that inline, I never sent it
as a separate patch.

I'll resend it to lkml right now.

thanks,
-serge
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ