From: Pablo Neira Ayuso <pablo@netfilter.org>
To: Neil Horman <nhorman@tuxdriver.com>
Cc: netfilter-devel@vger.kernel.org,
Florian Weimer <fweimer@redhat.com>,
Hushan Jia <hushan.jia@gmail.com>
Subject: Re: [PATCH] libmnl: Add filtering support to library as a convienience
Date: Tue, 26 Mar 2013 21:50:28 +0100 [thread overview]
Message-ID: <20130326205028.GA7117@localhost> (raw)
In-Reply-To: <1364307643-21747-1-git-send-email-nhorman@tuxdriver.com>
Hi Neil,
On Tue, Mar 26, 2013 at 10:20:43AM -0400, Neil Horman wrote:
> Theres been recent discussion about detecting and discarding unwanted netlink
> messages in libmnl, so that we can avoid having applications get spoofed by user
> space processes sending messages with malformed netlink headers. Commonly
> applications want to be able to only receive messages from the kernel, but
> libmnl currently doesn't offer a mechanism to do that. This patch adds such a
> mechanism. It creates a function mnl_socket_recvfrom_filter, that adds an
> extra function pointer parameter which is used to interrogate recieved frames
> and filter them based on a desired criteria. It also adds a convieninece
> function mnl_recvfrom_filter_user which can be passed as the filter agrument in
> mnl_socket_recvfrom_filter, so as to prevent individual applications from
> re-inventing the wheel over and over again.
I remember that report from Florian. After some discussion, I proposed
this solution:
commit 20e1db19db5d6b9e4e83021595eab0dc8f107bef
Author: Pablo Neira Ayuso <pablo@netfilter.org>
Date: Thu Aug 23 02:09:11 2012 +0000
netlink: fix possible spoofing from non-root processes
Basically, it disables netlink-to-netlink communications between
non-root processes (with the exception of NETLINK_USERSOCK), so
non-root processes cannot spoof messages anymore.
Regards.
next prev parent reply other threads:[~2013-03-26 20:50 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-03-26 14:20 [PATCH] libmnl: Add filtering support to library as a convienience Neil Horman
2013-03-26 20:50 ` Pablo Neira Ayuso [this message]
2013-03-27 9:21 ` Florian Weimer
2013-04-19 2:20 ` Pablo Neira Ayuso
2013-03-27 12:55 ` Neil Horman
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=20130326205028.GA7117@localhost \
--to=pablo@netfilter.org \
--cc=fweimer@redhat.com \
--cc=hushan.jia@gmail.com \
--cc=netfilter-devel@vger.kernel.org \
--cc=nhorman@tuxdriver.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.