From: Ivan Zahariev <famzah@icdsoft.com>
To: linux-kernel@vger.kernel.org
Cc: Ivan Zahariev <famzah@icdsoft.com>
Subject: EUID != root + EGID = root, and CAP_SETGID
Date: Fri, 11 Dec 2009 13:25:49 +0200 [thread overview]
Message-ID: <4B222C3D.2070807@icdsoft.com> (raw)
Hi guys,
Currently, if a process is started with EUID which is non-root, and EGID
which IS root (for example by set-group-ID file permission + file group
owner "root", or an account in /etc/passwd with group=0), then the
processes is not granted CAP_SETGID.
As a result, such a process cannot change its EGID to an arbitrary one,
even though the current EGID is the super-user "root" one. Therefore,
such a process cannot easily drop its EGID "root" privileges to non-root
ones, for security reasons.
This is not the case if the process starts with EUID=0. Then the
processes is granted *both* CAP_SETUID and CAP_SETGID.
Is this an intended behavior? Shouldn't a process which is started with
EGID=0 get CAP_SETGID too?
Thank you.
Best regads,
Ivan Zahariev
P.S. For more detailed info:
http://blog.famzah.net/2009/12/11/linux-non-root-user-processes-which-run-with-group-root-cannot-change-their-process-group-to-an-arbitrary-one/
next reply other threads:[~2009-12-11 11:32 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-12-11 11:25 Ivan Zahariev [this message]
2009-12-11 12:04 ` EUID != root + EGID = root, and CAP_SETGID Andreas Schwab
2009-12-13 5:19 ` David Wagner
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=4B222C3D.2070807@icdsoft.com \
--to=famzah@icdsoft.com \
--cc=linux-kernel@vger.kernel.org \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.