From: Pavel Emelyanov <xemul@openvz.org>
To: Thomas Graf <tgraf@suug.ch>
Cc: David Woodhouse <dwmw2@infradead.org>,
Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
Linux Netdev List <netdev@vger.kernel.org>
Subject: Re: Audit vs netlink interaction problem
Date: Mon, 17 Mar 2008 10:59:41 +0300 [thread overview]
Message-ID: <47DE24ED.7060101@openvz.org> (raw)
In-Reply-To: <20080314182927.GQ20815@postel.suug.ch>
Thomas Graf wrote:
> * Pavel Emelyanov <xemul@openvz.org> 2008-03-14 20:05
>> Hmmm... I'm afraid, that this can break the audit filtering and signal
>> auditing. I haven't yet looked deep into it, but it compares the
>> task->tgid with this audit_pid for different purposes. If audit_pid
>> changes this code will be broken.
>
> OK, then both pids have to be stored. audit_pid remains as-is but is
> no longer used as destination netlink pid. A second pid is stored and
> updated whenever a netlink message is received from userspace.
>
>> Bu we have no the netlink socket at the moment of setting the pid to
>> check this. The audit_reveive_msg() call which does this set is received
>> via another (pre-created global) socket.
>
> I don't understand this. As far as I can read the code, a plain kernel
> side netlink socket is created in audit_init(). But it doesn't matter,
> as soon as we receive the first message from userspace, we know the
> netlink source pid.
audit_init() creates a kernel-side socket, while we need to know the pid
of a user-side one. But I saw your patch, seems like the NETLINK_CB(skb).pid
is what we need for this check :)
>> I though, that proper behavior would be to split audit_pid, used for
>> filtering from the audit_nlk_pid used for netlink communications.
>
> Yes, exactly.
>
prev parent reply other threads:[~2008-03-17 8:00 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-03-14 16:22 Audit vs netlink interaction problem Pavel Emelyanov
2008-03-14 16:39 ` Thomas Graf
2008-03-14 17:05 ` Pavel Emelyanov
2008-03-14 18:29 ` Thomas Graf
2008-03-14 18:40 ` Thomas Graf
2008-03-17 8:01 ` Pavel Emelyanov
2008-03-17 19:41 ` Eric Paris
2008-03-17 7:59 ` Pavel Emelyanov [this message]
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=47DE24ED.7060101@openvz.org \
--to=xemul@openvz.org \
--cc=dwmw2@infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=tgraf@suug.ch \
/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