Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 14 Jul 2012 18:59:54 +0100
From:      Chris Rees <utisoft@gmail.com>
To:        Ian Smith <smithi@nimnet.asn.au>
Cc:        freebsd-ipfw@freebsd.org, freebsd-bugs@freebsd.org
Subject:   Re: kern/165939: [ipw] security bug: incomplete firewall rules loaded if tables are used in ipfw.conf
Message-ID:  <CADLo83-C_6=AMHejePkCLnRfQWKFUwvM7as5vSnJDRMULKH4vw@mail.gmail.com>
In-Reply-To: <20120715025005.I74353@sola.nimnet.asn.au>
References:  <201207141614.q6EGEi7P024139@freefall.freebsd.org> <20120715025005.I74353@sola.nimnet.asn.au>

next in thread | previous in thread | raw e-mail | index | archive | help
On 14 Jul 2012 18:49, "Ian Smith" <smithi@nimnet.asn.au> wrote:
>
> On Sat, 14 Jul 2012, crees@freebsd.org wrote:
>  > http://www.freebsd.org/cgi/query-pr.cgi?pr=165939
>
>  > Description
>  > If user has tables used in /etc/ipfw.conf for example:
>  >
>  > table 1 add 64.6.108.239
>  >
>  > then firewall restart:
>  >
>  > /etc/rc.d/ipfw start
>  >
>  > fails with:
>  > Line 8: setsockopt(IP_FW_TABLE_ADD): File exists
>  > Firewall rules loaded.
>  >
>  > and incomplete ruleset is loaded. This is serious security problem.
>  >
>  > How-To-Repeat
>  > Fix
>  > in /etc/rc.firewall
>  >
>  > after ${fwcmd} -f flush
>  > you need to flush tables too with command
>  >
>  > ipfw table all flush
>
> Yes, to such a ruleset you'd need to add 'table all flush' too.
>
> ipfw flush specifically does not flush tables.  I've long relied upon
> that, using mostly static tables only reloaded from a file saved hourly
> by cron, when $firewall_script finds tables are not loaded - ie at boot.

Not A Bug then?

Chris



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CADLo83-C_6=AMHejePkCLnRfQWKFUwvM7as5vSnJDRMULKH4vw>