From: Paul Moore <pmoore@redhat.com>
To: selinux@tycho.nsa.gov, Andy Ruch <adruch2002@yahoo.com>
Subject: Re: selinux control for network interface using SOCK_RAW
Date: Wed, 18 Dec 2013 15:21:05 -0500 [thread overview]
Message-ID: <4723476.XQtkhknjQL@sifl> (raw)
In-Reply-To: <1387381759.80678.YahooMailNeo@web163404.mail.gq1.yahoo.com>
On Wednesday, December 18, 2013 07:49:19 AM Andy Ruch wrote:
> Hello,
>
> I'm trying to restrict an application to only have access to some network
> interfaces. I'm running a custom policy on a RHEL 6.3 system. The
> application is opening the socket as AF_PACKET and SOCK_RAW. However,
> selinux doesn't seem to be controlling any raw access to the interfaces.
SELinux does not provide any per-packet access controls for AF_PACKET sockets.
The basic problem is that AF_PACKET traffic is an opaque blob as far as the
kernel is concerned. The application may carefully craft well formed IP
packets, but the kernel doesn't do any inspection/parsing of the data sent
down via a AF_PACKET socket, it is just a blob to passed off to the network
device.
I suppose we could do something with the netif:egress access control for
packet sockets, but that would require a new LSM hook and some SELinux glue as
AF_PACKET traffic isn't subject to the netfilter hooks SELinux currently uses
(if I recall correctly).
--
paul moore
security and virtualization @ redhat
next prev parent reply other threads:[~2013-12-18 20:21 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-12-18 15:49 selinux control for network interface using SOCK_RAW Andy Ruch
2013-12-18 17:31 ` Colin Powers
2013-12-18 17:47 ` Andy Ruch
2013-12-18 20:21 ` Paul Moore [this message]
2013-12-18 20:37 ` Andy Ruch
2013-12-18 21:14 ` Paul Moore
2013-12-19 20:48 ` Andy Ruch
2013-12-19 21:45 ` 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=4723476.XQtkhknjQL@sifl \
--to=pmoore@redhat.com \
--cc=adruch2002@yahoo.com \
--cc=selinux@tycho.nsa.gov \
/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.