Re: RFC(v2): Audit Kernel Container IDs

2017-12-11 Thread Steve Grubb
On Monday, December 11, 2017 11:30:57 AM EST Eric Paris wrote: > > Because a container doesn't have to use namespaces to be a container > > you still need a mechanism for a process to declare that it is in > > fact > > in a container, and to identify the container. > > I like the idea but I'm stil

Re: RFC(v2): Audit Kernel Container IDs

2017-12-11 Thread Casey Schaufler
On 12/11/2017 8:30 AM, Eric Paris wrote: > On Sat, 2017-12-09 at 10:28 -0800, Casey Schaufler wrote: >> Because a container doesn't have to use namespaces to be a container >> you still need a mechanism for a process to declare that it is in >> fact >> in a container, and to identify the container.

Re: RFC(v2): Audit Kernel Container IDs

2017-12-11 Thread Eric Paris
On Sat, 2017-12-09 at 10:28 -0800, Casey Schaufler wrote: > On 12/9/2017 2:20 AM, Micka�l Sala�n wrote: > > What about automatically create > > and assign an ID to a process when it enters a namespace different > > than > > one of its parent process? This delegates the (permission) > > respon

Re: RFC(v2): Audit Kernel Container IDs

2017-12-11 Thread Richard Guy Briggs
On 2017-12-09 11:20, Mickaël Salaün wrote: > > On 12/10/2017 18:33, Casey Schaufler wrote: > > On 10/12/2017 7:14 AM, Richard Guy Briggs wrote: > >> Containers are a userspace concept. The kernel knows nothing of them. > >> > >> The Linux audit system needs a way to be able to track the container

Re: RFC(v2): Audit Kernel Container IDs

2017-12-09 Thread Casey Schaufler
On 12/9/2017 2:20 AM, Micka�l Sala�n wrote: > On 12/10/2017 18:33, Casey Schaufler wrote: >> On 10/12/2017 7:14 AM, Richard Guy Briggs wrote: >>> Containers are a userspace concept. The kernel knows nothing of them. >>> >>> The Linux audit system needs a way to be able to track the container >

Re: RFC(v2): Audit Kernel Container IDs

2017-12-09 Thread Mickaël Salaün
On 12/10/2017 18:33, Casey Schaufler wrote: > On 10/12/2017 7:14 AM, Richard Guy Briggs wrote: >> Containers are a userspace concept. The kernel knows nothing of them. >> >> The Linux audit system needs a way to be able to track the container >> provenance of events and actions. Audit needs the

Re: RFC(v2): Audit Kernel Container IDs

2017-10-19 Thread Steve Grubb
On Thursday, October 19, 2017 7:11:33 PM EDT Aleksa Sarai wrote: > >>> The registration is a pseudo filesystem (proc, since PID tree already > >>> exists) write of a u8[16] UUID representing the container ID to a file > >>> representing a process that will become the first process in a new > >>> co

Re: RFC(v2): Audit Kernel Container IDs

2017-10-19 Thread Aleksa Sarai
The registration is a pseudo filesystem (proc, since PID tree already exists) write of a u8[16] UUID representing the container ID to a file representing a process that will become the first process in a new container.  This write might place restrictions on mount namespaces required to define a c

Re: RFC(v2): Audit Kernel Container IDs

2017-10-19 Thread Aleksa Sarai
The registration is a pseudo filesystem (proc, since PID tree already exists) write of a u8[16] UUID representing the container ID to a file representing a process that will become the first process in a new container. This write might place restrictions on mount namespaces required to define a c

Re: RFC(v2): Audit Kernel Container IDs

2017-10-19 Thread Richard Guy Briggs
On 2017-10-12 15:45, Steve Grubb wrote: > On Thursday, October 12, 2017 10:14:00 AM EDT Richard Guy Briggs wrote: > > Containers are a userspace concept. The kernel knows nothing of them. > > > > The Linux audit system needs a way to be able to track the container > > provenance of events and act

Re: RFC(v2): Audit Kernel Container IDs

2017-10-19 Thread Paul Moore
On Thu, Oct 19, 2017 at 12:25 PM, Eric W. Biederman wrote: > Paul Moore writes: > >> On Wed, Oct 18, 2017 at 8:43 PM, Eric W. Biederman >> wrote: >>> Aleksa Sarai writes: >> The security implications are that anything that can change the label >> could also hide itself and its doings fr

Re: RFC(v2): Audit Kernel Container IDs

2017-10-19 Thread Eric W. Biederman
Paul Moore writes: > On Wed, Oct 18, 2017 at 8:43 PM, Eric W. Biederman > wrote: >> Aleksa Sarai writes: > The security implications are that anything that can change the label > could also hide itself and its doings from the audit system and thus > would be used as a means to evade

Re: RFC(v2): Audit Kernel Container IDs

2017-10-19 Thread Paul Moore
On Thu, Oct 19, 2017 at 9:32 AM, Casey Schaufler wrote: > On 10/18/2017 5:05 PM, Richard Guy Briggs wrote: >> On 2017-10-17 01:10, Casey Schaufler wrote: >>> On 10/16/2017 5:33 PM, Richard Guy Briggs wrote: On 2017-10-12 16:33, Casey Schaufler wrote: > On 10/12/2017 7:14 AM, Richard Guy B

Re: RFC(v2): Audit Kernel Container IDs

2017-10-19 Thread Paul Moore
On Wed, Oct 18, 2017 at 8:43 PM, Eric W. Biederman wrote: > Aleksa Sarai writes: The security implications are that anything that can change the label could also hide itself and its doings from the audit system and thus would be used as a means to evade detection. I actually think

Re: RFC(v2): Audit Kernel Container IDs

2017-10-19 Thread Casey Schaufler
On 10/18/2017 5:05 PM, Richard Guy Briggs wrote: > On 2017-10-17 01:10, Casey Schaufler wrote: >> On 10/16/2017 5:33 PM, Richard Guy Briggs wrote: >>> On 2017-10-12 16:33, Casey Schaufler wrote: On 10/12/2017 7:14 AM, Richard Guy Briggs wrote: > Containers are a userspace concept. The ker

Re: RFC(v2): Audit Kernel Container IDs

2017-10-18 Thread Eric W. Biederman
Aleksa Sarai writes: >>> The security implications are that anything that can change the label >>> could also hide itself and its doings from the audit system and thus >>> would be used as a means to evade detection. I actually think this >>> means the label should be write once (once you've set

Re: RFC(v2): Audit Kernel Container IDs

2017-10-18 Thread Richard Guy Briggs
On 2017-10-17 01:10, Casey Schaufler wrote: > On 10/16/2017 5:33 PM, Richard Guy Briggs wrote: > > On 2017-10-12 16:33, Casey Schaufler wrote: > >> On 10/12/2017 7:14 AM, Richard Guy Briggs wrote: > >>> Containers are a userspace concept. The kernel knows nothing of them. > >>> > >>> The Linux aud

Re: RFC(v2): Audit Kernel Container IDs

2017-10-18 Thread Aleksa Sarai
The security implications are that anything that can change the label could also hide itself and its doings from the audit system and thus would be used as a means to evade detection. I actually think this means the label should be write once (once you've set it, you can't change it) ... Richar

Re: RFC(v2): Audit Kernel Container IDs

2017-10-18 Thread Paul Moore
On Tue, Oct 17, 2017 at 11:44 AM, James Bottomley wrote: > On Tue, 2017-10-17 at 11:28 -0400, Simo Sorce wrote: >> > Without a *kernel* policy on containerIDs you can't say what >> > security policy is being exempted. >> >> The policy has been basically stated earlier. >> >> A way to track a set o

Re: RFC(v2): Audit Kernel Container IDs

2017-10-18 Thread Paul Moore
On Tue, Oct 17, 2017 at 8:31 AM, Simo Sorce wrote: > The container Id can be used also for authorization purposes (by other > processes on the host), not just audit, I think this is why a separate > control has been proposed. Apologies, but I'm just now getting a chance to work my way through thi

Re: RFC(v2): Audit Kernel Container IDs

2017-10-17 Thread Steve Grubb
On Tuesday, October 17, 2017 1:57:43 PM EDT James Bottomley wrote: > > > > The idea is that processes spawned into a container would be > > > > labelled by the container orchestration system. It's unclear > > > > what should happen to processes using nsenter after the fact, but > > > > policy for

Re: RFC(v2): Audit Kernel Container IDs

2017-10-17 Thread James Bottomley
On Tue, 2017-10-17 at 13:15 -0400, Steve Grubb wrote: > On Tuesday, October 17, 2017 12:43:18 PM EDT Casey Schaufler wrote: > > > > > > > > The idea is that processes spawned into a container would be > > > labelled by the container orchestration system.  It's unclear > > > what should happen to

Re: RFC(v2): Audit Kernel Container IDs

2017-10-17 Thread Steve Grubb
On Tuesday, October 17, 2017 12:43:18 PM EDT Casey Schaufler wrote: > > The idea is that processes spawned into a container would be labelled > > by the container orchestration system. It's unclear what should happen > > to processes using nsenter after the fact, but policy for that should > > be

Re: RFC(v2): Audit Kernel Container IDs

2017-10-17 Thread Casey Schaufler
On 10/17/2017 8:44 AM, James Bottomley wrote: > On Tue, 2017-10-17 at 11:28 -0400, Simo Sorce wrote: >>> Without a *kernel* policy on containerIDs you can't say what >>> security policy is being exempted. >> The policy has been basically stated earlier. >> >> A way to track a set of processes from

Re: RFC(v2): Audit Kernel Container IDs

2017-10-17 Thread Casey Schaufler
On 10/17/2017 8:28 AM, Simo Sorce wrote: > On Tue, 2017-10-17 at 07:59 -0700, Casey Schaufler wrote: >> On 10/17/2017 5:31 AM, Simo Sorce wrote: >>> On Mon, 2017-10-16 at 21:42 -0400, Steve Grubb wrote: On Monday, October 16, 2017 8:33:40 PM EDT Richard Guy Briggs wrote: > There is su

Re: RFC(v2): Audit Kernel Container IDs

2017-10-17 Thread James Bottomley
On Tue, 2017-10-17 at 11:28 -0400, Simo Sorce wrote: > > Without a *kernel* policy on containerIDs you can't say what > > security policy is being exempted. > > The policy has been basically stated earlier. > > A way to track a set of processes from a specific point in time > forward. The name us

Re: RFC(v2): Audit Kernel Container IDs

2017-10-17 Thread Simo Sorce
On Tue, 2017-10-17 at 07:59 -0700, Casey Schaufler wrote: > On 10/17/2017 5:31 AM, Simo Sorce wrote: > > On Mon, 2017-10-16 at 21:42 -0400, Steve Grubb wrote: > > > On Monday, October 16, 2017 8:33:40 PM EDT Richard Guy Briggs > > > wrote: > > > > There is such a thing, but the kernel doesn't know

Re: RFC(v2): Audit Kernel Container IDs

2017-10-17 Thread Casey Schaufler
On 10/17/2017 5:31 AM, Simo Sorce wrote: > On Mon, 2017-10-16 at 21:42 -0400, Steve Grubb wrote: >> On Monday, October 16, 2017 8:33:40 PM EDT Richard Guy Briggs wrote: >>> There is such a thing, but the kernel doesn't know about it >>> yet.  This same situation exists for loginuid and sessionid wh

Re: RFC(v2): Audit Kernel Container IDs

2017-10-17 Thread Simo Sorce
On Mon, 2017-10-16 at 21:42 -0400, Steve Grubb wrote: > On Monday, October 16, 2017 8:33:40 PM EDT Richard Guy Briggs wrote: > > There is such a thing, but the kernel doesn't know about it > > yet.  This same situation exists for loginuid and sessionid which > > are userspace concepts that the ker

Re: RFC(v2): Audit Kernel Container IDs

2017-10-16 Thread Steve Grubb
On Monday, October 16, 2017 8:33:40 PM EDT Richard Guy Briggs wrote: > On 2017-10-12 16:33, Casey Schaufler wrote: > > On 10/12/2017 7:14 AM, Richard Guy Briggs wrote: > > > Containers are a userspace concept. The kernel knows nothing of them. > > > > > > The Linux audit system needs a way to be

Re: RFC(v2): Audit Kernel Container IDs

2017-10-16 Thread Casey Schaufler
On 10/16/2017 5:33 PM, Richard Guy Briggs wrote: > On 2017-10-12 16:33, Casey Schaufler wrote: >> On 10/12/2017 7:14 AM, Richard Guy Briggs wrote: >>> Containers are a userspace concept. The kernel knows nothing of them. >>> >>> The Linux audit system needs a way to be able to track the container

Re: RFC(v2): Audit Kernel Container IDs

2017-10-16 Thread Richard Guy Briggs
On 2017-10-12 16:33, Casey Schaufler wrote: > On 10/12/2017 7:14 AM, Richard Guy Briggs wrote: > > Containers are a userspace concept. The kernel knows nothing of them. > > > > The Linux audit system needs a way to be able to track the container > > provenance of events and actions. Audit needs t

Re: RFC(v2): Audit Kernel Container IDs

2017-10-13 Thread Alan Cox
On Thu, 12 Oct 2017 10:14:00 -0400 Richard Guy Briggs wrote: > Containers are a userspace concept. The kernel knows nothing of them. > > The Linux audit system needs a way to be able to track the container > provenance of events and actions. Audit needs the kernel's help to do > this. > > Sin

Re: RFC(v2): Audit Kernel Container IDs

2017-10-12 Thread Eric W. Biederman
Richard Guy Briggs writes: > A namespace cannot directly migrate from one container to another but > could be assigned to a newly spawned container. A namespace can be > moved from one container to another indirectly by having that namespace > used in a second process in another container and th

Re: RFC(v2): Audit Kernel Container IDs

2017-10-12 Thread Casey Schaufler
On 10/12/2017 7:14 AM, Richard Guy Briggs wrote: > Containers are a userspace concept. The kernel knows nothing of them. > > The Linux audit system needs a way to be able to track the container > provenance of events and actions. Audit needs the kernel's help to do > this. > > Since the concept o

Re: RFC(v2): Audit Kernel Container IDs

2017-10-12 Thread Steve Grubb
On Thursday, October 12, 2017 10:14:00 AM EDT Richard Guy Briggs wrote: > Containers are a userspace concept. The kernel knows nothing of them. > > The Linux audit system needs a way to be able to track the container > provenance of events and actions. Audit needs the kernel's help to do > this.

RFC(v2): Audit Kernel Container IDs

2017-10-12 Thread Richard Guy Briggs
Containers are a userspace concept. The kernel knows nothing of them. The Linux audit system needs a way to be able to track the container provenance of events and actions. Audit needs the kernel's help to do this. Since the concept of a container is entirely a userspace concept, a registration