From: Casey Schaufler Subject: Re: Correct audit field for a netmask? Date: Fri, 16 Nov 2007 16:07:14 -0800 (PST) Message-ID: <671342.60721.qm@web36605.mail.mud.yahoo.com> References: <200711161125.21373.paul.moore@hp.com> Reply-To: casey@schaufler-ca.com Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: quoted-printable Return-path: Received: from mx3.redhat.com (mx3.redhat.com [172.16.48.32]) by int-mx1.corp.redhat.com (8.13.1/8.13.1) with ESMTP id lAH07QSn023949 for ; Fri, 16 Nov 2007 19:07:26 -0500 Received: from web36605.mail.mud.yahoo.com (web36605.mail.mud.yahoo.com [209.191.85.22]) by mx3.redhat.com (8.13.1/8.13.1) with SMTP id lAH07KhE024761 for ; Fri, 16 Nov 2007 19:07:20 -0500 In-Reply-To: <200711161125.21373.paul.moore@hp.com> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: linux-audit-bounces@redhat.com Errors-To: linux-audit-bounces@redhat.com To: Paul Moore , Steve Grubb Cc: linux-audit@redhat.com List-Id: linux-audit@redhat.com --- Paul Moore wrote: > On Friday 16 November 2007 11:10:55 am Steve Grubb wrote: > > On Thursday 15 November 2007 16:12:53 Paul Moore wrote: > > > I was wondering what was the correct way to send a netmask in an au= dit > > > message? > > > > That is a curious one. I don't think we've ever recorded a netmask si= nce we > > don't audit the routing tables. How does this net mask get used in a = way > > that needs to be audited. Just curious. :) >=20 > It's not a routing table, but rather an IP selector/filter used to assi= gn=20 > static/fallback security labels to incoming traffic. There has been a = lot of >=20 > discussion about this on the SELinux list over the summer and RFC patch= es=20 > have been available for a week or two, the audit relevant patch is belo= w=20 > (once we get these issues resolved I'll respin the audit patch and send= it=20 > here for review): >=20 > * http://marc.info/?l=3Dlinux-security-module&m=3D119514613623937&w=3D= 2 >=20 > > > Or is there some other field specifically for the netmask? > > > > > > =A0addr=3D10.0.0.0 X=3D8 > > > > This would probably be better so that extra parsing of the value is n= ot > > needed. I'd suggest something short like "net" to save diskspace. >=20 > Okay, so for single addresses we should still go with "addr": >=20 > addr=3D10.0.0.1 >=20 > ... but for networks we should go with "net": >=20 > net=3D10.0.0.0/8 >=20 > ? Looks like a good appoach to me. Alternatively you could replace addr=3D10.0.0.1 with net=3D10.0.0.1/32 or you could stick with addr and assume "/32" if a netmask is missing. I personally thing your suggestion is the right way to go. Or, if you want to do something truely horrible you could look at the Cisco CLI and see how they do it. Casey Schaufler casey@schaufler-ca.com