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: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Thu, 28 Aug 2008 16:18:27 +0200
From:	Pavel Machek <pavel@...e.cz>
To:	Markku Savela <msa@...h.iki.fi>
Cc:	linux-kernel@...r.kernel.org
Subject: Re: Frustrated with capabilities..

On Wed 2008-08-27 12:31:10, Markku Savela wrote:
> I just want to run an exectable with limited capabilities and assumed
> the following approach would work fine:
> 
>  1) fork process
>  2) in child
> 
>     2.1 set current capabilities (eip) using cap_set_proc
>     2.2 execve the executable.
> 
> But it frigging does not work! Just before the execve, the result of
> cap_to_text is
> 
>     = cap_net_bind_service+eip
> 
> but, in the execve executable, the result is suddenly
> 
>     = cap_net_bind_service+i
> 
> Why does the execve clear the effective and permitted capabities,
> against my clear instructions? (I also have the prctl KEEP_CAPS set,
> though in this case it should be irrelevant).
> 
> - The kernel is from ubuntu distro, 2.6.24.
> 
> - the executable *does* *not* have any setuid/setgid bits
> 
> - the upcoming file capabities will not be any help, because I will
>   need to start the same executable with different capabilities
>   depending on context.

Yes, you need upcoming filesystem capabilities.  Binary may not
inherit capabilities unless filesystem flags permit that.

-- 
(english) http://www.livejournal.com/~pavelmachek
(cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html
--
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