mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* Create new NetFilter table
@ 2014-01-10 19:25 Victor Porton
  2014-01-10 19:39 ` Joshua Brindle
  2014-01-10 19:58 ` David Lang
  0 siblings, 2 replies; 4+ messages in thread
From: Victor Porton @ 2014-01-10 19:25 UTC (permalink / raw)
  To: selinux, linux-kernel

I propose to create a new NetFilter table dedicated to rules created programmatically (not by explicit admin's iptables command).

Otherwise an admin could be tempted to say `iptables -F security` which would probably break rules created for example by sandboxing software (which may follow same-origin policy to restrict one particular program to certain domain and port only). Note that in this case `iptables -F security` is a security risk (sandbox breaking)?

New table could be possibly be called:

- temp
- temporary
- auto
- automatic
- volatile
- daemon
- system
- sys

In iptables docs it should be said that this table should not be manipulated manually.

-- 
Victor Porton - http://portonvictor.org

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: Create new NetFilter table
  2014-01-10 19:25 Create new NetFilter table Victor Porton
@ 2014-01-10 19:39 ` Joshua Brindle
  2014-01-10 19:52   ` Victor Porton
  2014-01-10 19:58 ` David Lang
  1 sibling, 1 reply; 4+ messages in thread
From: Joshua Brindle @ 2014-01-10 19:39 UTC (permalink / raw)
  To: Victor Porton; +Cc: selinux, linux-kernel

Victor Porton wrote:
> I propose to create a new NetFilter table dedicated to rules created programmatically (not by explicit admin's iptables command).
>
> Otherwise an admin could be tempted to say `iptables -F security` which would probably break rules created for example by sandboxing software (which may follow same-origin policy to restrict one particular program to certain domain and port only). Note that in this case `iptables -F security` is a security risk (sandbox breaking)?
>
> New table could be possibly be called:
>
> - temp
> - temporary
> - auto
> - automatic
> - volatile
> - daemon
> - system
> - sys
>
> In iptables docs it should be said that this table should not be manipulated manually.

Is it possible that the solution to your sandboxing problem is seccomp 
filter?

http://outflux.net/teach-seccomp/

You'd filter out any syscall that can make outbound connections and then 
only pass already opened sockets to the sandboxed threads?

seccomp filter was actually created for sandboxing, so that user 
applications could voluntarily shed the ability to call certain syscalls 
before handling untrusted data.


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: Create new NetFilter table
  2014-01-10 19:39 ` Joshua Brindle
@ 2014-01-10 19:52   ` Victor Porton
  0 siblings, 0 replies; 4+ messages in thread
From: Victor Porton @ 2014-01-10 19:52 UTC (permalink / raw)
  To: Joshua Brindle; +Cc: selinux, linux-kernel



10.01.2014, 21:39, "Joshua Brindle" <brindle@quarksecurity.com>:
> Victor Porton wrote:
>
>>  I propose to create a new NetFilter table dedicated to rules created programmatically (not by explicit admin's iptables command).
>>
>>  Otherwise an admin could be tempted to say `iptables -F security` which would probably break rules created for example by sandboxing software (which may follow same-origin policy to restrict one particular program to certain domain and port only). Note that in this case `iptables -F security` is a security risk (sandbox breaking)?
>>
>>  New table could be possibly be called:
>>
>>  - temp
>>  - temporary
>>  - auto
>>  - automatic
>>  - volatile
>>  - daemon
>>  - system
>>  - sys
>>
>>  In iptables docs it should be said that this table should not be manipulated manually.
>
> Is it possible that the solution to your sandboxing problem is seccomp
> filter?
>
> http://outflux.net/teach-seccomp/
>
> You'd filter out any syscall that can make outbound connections and then
> only pass already opened sockets to the sandboxed threads?
>
> seccomp filter was actually created for sandboxing, so that user
> applications could voluntarily shed the ability to call certain syscalls
> before handling untrusted data.

seccomp would not work for me, because I need network enabled sandboxes. Moreover we should be able to filter out certain subnets such as 127.0.0.0/255.0.0.0 (and others), This cleanly can't be done with seccomp.

-- 
Victor Porton - http://portonvictor.org

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: Create new NetFilter table
  2014-01-10 19:25 Create new NetFilter table Victor Porton
  2014-01-10 19:39 ` Joshua Brindle
@ 2014-01-10 19:58 ` David Lang
  1 sibling, 0 replies; 4+ messages in thread
From: David Lang @ 2014-01-10 19:58 UTC (permalink / raw)
  To: Victor Porton; +Cc: selinux, linux-kernel

On Fri, 10 Jan 2014, Victor Porton wrote:

> I propose to create a new NetFilter table dedicated to rules created programmatically (not by explicit admin's iptables command).
>
> Otherwise an admin could be tempted to say `iptables -F security` which would probably break rules created for example by sandboxing software (which may follow same-origin policy to restrict one particular program to certain domain and port only). Note that in this case `iptables -F security` is a security risk (sandbox breaking)?
>
> New table could be possibly be called:
>
> - temp
> - temporary
> - auto
> - automatic
> - volatile
> - daemon
> - system
> - sys
>
> In iptables docs it should be said that this table should not be manipulated manually.

I would disagree with this idea.

If you make one special table, why would you not want others?

You would then need to define all the conditions where this table is used 
instead of, or in addition to, the existing tables.

Yes admins can shoot themselves in the foot with iptables, and any admin who 
flushes rules without understanding what is affected will probably be causing 
significant problems anyway.

Rather than doing this, have the tools that are programmatically creating rules 
also maintain a file that can be used to recreate all those rules. Then the 
Admins or init scripts can recreate things easily.

David Lang

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2014-01-10 19:58 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-01-10 19:25 Create new NetFilter table Victor Porton
2014-01-10 19:39 ` Joshua Brindle
2014-01-10 19:52   ` Victor Porton
2014-01-10 19:58 ` David Lang

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®