All of lore.kernel.org
 help / color / mirror / Atom feed
From: Nick Hay <nickjhay@hotmail.com>
To: netfilter-devel@lists.netfilter.org
Subject: Re: Extending LOG target to display pid
Date: Wed, 06 Jul 2005 11:56:33 +1200	[thread overview]
Message-ID: <42CB1E31.1000802@hotmail.com> (raw)

Tobias DiPasquale wrote:
> On 7/5/05, Nick Hay <nickjhay@hotmail.com> wrote:
> 
>>2. Any ideas on how I can get the pid of a local packet's creator in the
>>log module?  I couldn't find any structures connected to the sk_buff
>>that might contain it, and couldn't think of where the data would
>>originally come from.
> 
> 
> A security framework, with the proper auditing and accounting
> mechanisms in place in the network stack could make this possible (any
> it may already be). But in general, it would be quite a lot of work to
> add the necessary code to the stack to account for the
> sending/receiving PID at the correct stage. Unless you're doing MAC,
> its probably not worth it.

My original intention was to replicate some part of Windows' ZoneAlarm
package: the ability to recognise which program was asking for access,
and to filter based on that.  Noticing a strange packet that was blocked
by my filter on outgoing ports, and not being able to find out where it
came from was the immediate motivation :)

Is it better to try this at the SELinux level,
blocking/monitoring/adjusting access to socket creation/use?

>>Actually... would current->pid work?
> 
> No, because there's no guarantee that the same process is on the CPU
> by the time the packet hits your rule.
>
> Can't check on #1 right now, but I believe that its filled in by the
> module itself in whatever way it chooses.

-- Nick

             reply	other threads:[~2005-07-05 23:56 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-07-05 23:56 Nick Hay [this message]
2005-07-07  6:32 ` Extending LOG target to display pid Jonas Berlin
  -- strict thread matches above, loose matches on Subject: below --
2005-07-05 16:05 Nick Hay
2005-07-05 17:28 ` Tobias DiPasquale
2005-07-05 18:05 ` Juha Heljoranta

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=42CB1E31.1000802@hotmail.com \
    --to=nickjhay@hotmail.com \
    --cc=netfilter-devel@lists.netfilter.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.