mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Bodo Eggert <harvested.in.lkml@7eggert.dyndns.org>
To: "Török Edwin" <edwin@gurde.com>,
	linux-kernel@vger.kernel.org,
	fireflier-devel@lists.sourceforge.net
Subject: Re: [RFC] packet/socket owner match (fireflier) using skfilter
Date: Thu, 06 Apr 2006 14:21:57 +0200	[thread overview]
Message-ID: <E1FRTVC-0000i5-PH@be1.lrz> (raw)
In-Reply-To: <5X7nH-7n6-7@gated-at.bofh.it>

Török Edwin <edwin@gurde.com> wrote:

> Fireflier aims at providing per application filtering. That is allowing to
> create rules like: allow apache to listen on port 80 (and only apache, nobody
> else).

I had a very simple idea for doing something like this:

Assign a special semantic to GID $n: Being in group $n allows you to listen
on port $n-$offset. $offset == -1 disables this feature (default).

E.g. You want apache to listen on 80 and 443: Set $offset to 60000 and put
apache into groups 60080 and 60443.

> I didn't include the patch inline, since it is quite long (1800+ lines ,
> ~100k). So I uploaded them here:
> http://edwintorok.googlepages.com/fireflier_kernel.html

(Text in parentheses written after completely reading the posting)

If I'd want it to work with iptables, I'd extend the socket struct to contain
the device:inode of the corresponding application (not changing it on exec)
and stat() the allowed applications on rule setups.
(I see you choose similar but more complicated approach, but:)

I'd deliberately allow access to these sockets if it's passed to other
applications since it's the intended behaviour. (BTW: Your approach isn't
going to be 100 % reliable, since it will allow other processes to illegaly
receive data if the socket is transfered after filtering, isn't it?)

Downside of both approaches:
 You'll have to guarantee stable dev:inode pairs. NFS? umount/mount?
 Workaround: suid helper setting/deleting the allowed-rule?

-- 
Ich danke GMX dafür, die Verwendung meiner Adressen mittels per SPF
verbreiteten Lügen zu sabotieren.

       reply	other threads:[~2006-04-06 12:22 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <5X7nH-7n6-7@gated-at.bofh.it>
2006-04-06 12:21 ` Bodo Eggert [this message]
2006-04-07 18:58   ` edwin
2006-04-07 20:06     ` Bodo Eggert
2006-04-08  7:50       ` edwin
2006-04-02  9:40 Török Edwin
2006-04-03 15:18 ` James Morris
2006-04-03 15:39   ` Török Edwin
2006-04-05 15:06     ` Stephen Smalley
2006-04-07 17:34       ` Török Edwin
2006-04-21 15:26 ` Mikado
2006-04-21 16:18   ` Török Edwin

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=E1FRTVC-0000i5-PH@be1.lrz \
    --to=harvested.in.lkml@7eggert.dyndns.org \
    --cc=7eggert@gmx.de \
    --cc=edwin@gurde.com \
    --cc=fireflier-devel@lists.sourceforge.net \
    --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 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®