[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20061012190647.GA6725@sergelap.austin.ibm.com>
Date: Thu, 12 Oct 2006 14:06:47 -0500
From: "Serge E. Hallyn" <serue@...ibm.com>
To: Serge Aleynikov <serge@...idt.net>
Cc: linux-kernel@...r.kernel.org, Linus Torvalds <torvalds@...l.org>,
Alan Cox <alan@...hat.com>
Subject: Re: non-critical security bug fix
Quoting Serge Aleynikov (serge@...idt.net):
> To Maintainers of the linux/security/commoncap.c:
>
> Patch description:
> ==================
> This bug-fix ensures that if a process with root access sets
> keep_capabilities flag, current capabilities get preserved when the
> process switches from root to another effective user. It looks like
> this was intended from the way capabilities are documented, but the
> current->keep_capabilities flag is not being checked.
Note that without your patch, the permitted set is maintained, so that
you can regain the caps into your effective set after setuid if you
need. i.e.
prctl(PR_SET_KEEPCAPS, 1);
setresuid(1000, 1000, 1000);
caps = cap_from_text("cap_net_admin,cap_sys_admin,cap_dac_override=ep");
ret = cap_set_proc(caps);
So this patch will change the default behavior, but does not add
features or change what is possible.
Ordinarely I'd say changing default behavior wrt security is a bad
thing, but given that this is "default behavior when doing prctl(PR_SET_KEEPCAPS)",
I don't know how much it matters.
Still, I like the current behavior, where setuid means drop effective
caps no matter what.
-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