From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752510AbbBWXv5 (ORCPT ); Mon, 23 Feb 2015 18:51:57 -0500 Received: from mail-la0-f52.google.com ([209.85.215.52]:44863 "EHLO mail-la0-f52.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752223AbbBWXvy (ORCPT ); Mon, 23 Feb 2015 18:51:54 -0500 MIME-Version: 1.0 In-Reply-To: References: From: Andy Lutomirski Date: Mon, 23 Feb 2015 15:51:33 -0800 Message-ID: Subject: Re: [PATCH] capabilities: Ambient capability set V1 To: Christoph Lameter Cc: Jarkko Sakkinen , "Ted Ts'o" , "linux-kernel@vger.kernel.org" , "Andrew G. Morgan" , Andrew Morton , LSM List , Michael Kerrisk , Linux API , Mimi Zohar , Austin S Hemmelgarn , Aaron Jones , Serge Hallyn , Markku Savela , Jonathan Corbet Content-Type: text/plain; charset=UTF-8 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Feb 23, 2015 8:41 AM, "Christoph Lameter" wrote: > > On Mon, 23 Feb 2015, Andy Lutomirski wrote: > > > If you set ambient caps and then run a setuid program (without > > no_new_privs), then the ambient set *must* be cleared by the kernel > > because that's what the setuid program expects. Yes, the whole > > Why would a setuid program expect that? I'd say we expect the ambient set > to remain in effect. What would break if the ambient set would stay > active? > On a total guess: exim, sendmail, sudo, Apache suexec, etc. Basically anything that expects setresuid(nonzero values); execve to drop caps. I haven't checked how many of the examples above actually do this. --Andy