From: ebiederm@xmission.com (Eric W. Biederman)
To: Richard Guy Briggs <rgb@redhat.com>
Cc: Pablo Neira Ayuso <pablo@netfilter.org>,
Netfilter Developer Mailing List
<netfilter-devel@vger.kernel.org>,
linux-audit@redhat.com, Florian Westphal <fw@strlen.de>,
Thomas Woerner <twoerner@redhat.com>,
Thomas Graf <tgraf@infradead.org>, Eric Paris <eparis@redhat.com>,
Paul Moore <pmoore@redhat.com>, Steve Grubb <sgrubb@redhat.com>
Subject: Re: [PATCH 6/6 RFC] netfilter: add audit netns ID
Date: Wed, 24 May 2017 14:44:06 -0500 [thread overview]
Message-ID: <87tw4aavll.fsf@xmission.com> (raw)
In-Reply-To: <20170524180403.GK6203@madcap2.tricolour.ca> (Richard Guy Briggs's message of "Wed, 24 May 2017 14:04:03 -0400")
Richard Guy Briggs <rgb@redhat.com> writes:
> On 2017-05-24 19:31, Pablo Neira Ayuso wrote:
>> Cc'ing Eric Biederman.
>>
>> On Thu, May 18, 2017 at 01:21:52PM -0400, Richard Guy Briggs wrote:
>> > diff --git a/net/bridge/netfilter/ebtables.c b/net/bridge/netfilter/ebtables.c
>> > index 59b63a8..0f77b2a 100644
>> > --- a/net/bridge/netfilter/ebtables.c
>> > +++ b/net/bridge/netfilter/ebtables.c
>> > @@ -27,6 +27,7 @@
>> > #include <linux/smp.h>
>> > #include <linux/cpumask.h>
>> > #include <linux/audit.h>
>> > +#define PROC_DYNAMIC_FIRST 0xF0000000U
>> > #include <net/sock.h>
>> > /* needed for logical [in,out]-dev filtering */
>> > #include "../br_private.h"
>> > @@ -1075,7 +1076,8 @@ static int do_replace_finish(struct net *net, struct ebt_replace *repl,
>> > ab = audit_log_start(current->audit_context, GFP_KERNEL,
>> > AUDIT_NETFILTER_CFG);
>> > if (ab) {
>> > - audit_log_format(ab, "op=replace family=%u table=%s entries=%u",
>> > + audit_log_format(ab, "op=replace net=%u family=%u table=%s entries=%u",
>> > + net->ns.inum - PROC_DYNAMIC_FIRST,
>>
>> IIRC, there was a discussion on exposing netns i-node number to
>> userspace time ago on netdev and Eric Biederman was not happy about
>> this?
>
> He was not happy about it being exposed in the /proc filesystem. We've
> been talking since then and while we've not come to a definitive
> conclusion there is a communication channel open.
>
> This is more of an RFC patch than the rest of this set and I didn't
> seriously expect this one to be accepted, I did want to present the idea
> to see if there were concerns or better ideas generated how to
> differentiate this record from a seemingly identical one. The only
> other ID would be the network namespace' struct pointer.
>
> At this stage, one thing that is missing is a device number to qualify
> this namespace ID.
>
> Once I started printing the namespace proc inode number (minus the
> starting offset) in decimal, it was very clear what was happenning and
> seemed worth sharing that debugging tool patch.
If the appropriate device number and full inode number is included I
don't have any deep problems with the idea. I don't like the bare inode
number as we have had in the past and may in the future have these inode
numbers in multiple filesystems so the inode number by itself is not
unique.
Eric
next prev parent reply other threads:[~2017-05-24 19:44 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-05-18 17:21 [PATCH 0/6 RFC] Address NETFILTER_CFG issues Richard Guy Briggs
2017-05-18 17:21 ` [PATCH 1/6 RFC] netfilter: normalize x_table function declarations Richard Guy Briggs
2017-05-24 17:37 ` Pablo Neira Ayuso
2017-05-24 22:30 ` Richard Guy Briggs
2017-05-18 17:21 ` [PATCH 2/6 RFC] netfilter: normalize ebtables " Richard Guy Briggs
2017-05-18 17:21 ` [PATCH 3/6 RFC] netfilter: audit only on xtables and ebtables syscall rule or standalone Richard Guy Briggs
2017-05-24 17:36 ` Pablo Neira Ayuso
2017-05-24 18:09 ` Richard Guy Briggs
2017-06-02 15:25 ` Paul Moore
2017-05-18 17:21 ` [PATCH 4/6 RFC] netfilter: ebtables: audit table registration Richard Guy Briggs
2017-06-02 15:27 ` Paul Moore
2017-05-18 17:21 ` [PATCH 5/6 RFC] netfilter: add audit operation field Richard Guy Briggs
2017-06-02 15:28 ` Paul Moore
2017-05-18 17:21 ` [PATCH 6/6 RFC] netfilter: add audit netns ID Richard Guy Briggs
2017-05-24 17:31 ` Pablo Neira Ayuso
2017-05-24 18:04 ` Richard Guy Briggs
2017-05-24 19:44 ` Eric W. Biederman [this message]
2017-06-02 15:32 ` Paul Moore
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=87tw4aavll.fsf@xmission.com \
--to=ebiederm@xmission.com \
--cc=eparis@redhat.com \
--cc=fw@strlen.de \
--cc=linux-audit@redhat.com \
--cc=netfilter-devel@vger.kernel.org \
--cc=pablo@netfilter.org \
--cc=pmoore@redhat.com \
--cc=rgb@redhat.com \
--cc=sgrubb@redhat.com \
--cc=tgraf@infradead.org \
--cc=twoerner@redhat.com \
/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.