From owner-freebsd-bugs@FreeBSD.ORG Sat Jul 14 17:59:56 2012 Return-Path: Delivered-To: freebsd-bugs@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id A1A351065670; Sat, 14 Jul 2012 17:59:56 +0000 (UTC) (envelope-from utisoft@gmail.com) Received: from mail-bk0-f54.google.com (mail-bk0-f54.google.com [209.85.214.54]) by mx1.freebsd.org (Postfix) with ESMTP id ECD738FC0A; Sat, 14 Jul 2012 17:59:55 +0000 (UTC) Received: by bkcje9 with SMTP id je9so4053185bkc.13 for ; Sat, 14 Jul 2012 10:59:55 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=ajdfYuNlAwnqfbOkimablkifD95VjBLlyLt4aFheMWQ=; b=COpC9G2DQilMqKr+zNv9n7D4TNIbdLRcS4mGhoQJGQx7A5VEaaFYpkPAPNdmIGavWo /yWGZB95Yxk6TGa8HcP2X+tzM0fpCrZOxXeYgP5LeABlZbQ/fZcFgPso0/0oLOHHzjnw Ns2qaZ7Fy023yyM2SH6e5w/eQAKr4JgC6FCc4ONVC+HTj6Xg09d2+09VHyYox2jwebpb Ud8/EsJhjZCHcwAXaKXXgPmhEq7DCBMEHK7lcZRVfPRySHFvTcPviFrTbV5iRNxeXIVl QbUlCL8O51mU/5grpwShLLGXqFRqzi08VzsFhCqCLt36fq06+5+w2KInPV+Q5gFlflOJ Jegw== MIME-Version: 1.0 Received: by 10.204.152.27 with SMTP id e27mr2706832bkw.56.1342288794861; Sat, 14 Jul 2012 10:59:54 -0700 (PDT) Received: by 10.204.49.87 with HTTP; Sat, 14 Jul 2012 10:59:54 -0700 (PDT) Received: by 10.204.49.87 with HTTP; Sat, 14 Jul 2012 10:59:54 -0700 (PDT) In-Reply-To: <20120715025005.I74353@sola.nimnet.asn.au> References: <201207141614.q6EGEi7P024139@freefall.freebsd.org> <20120715025005.I74353@sola.nimnet.asn.au> Date: Sat, 14 Jul 2012 18:59:54 +0100 Message-ID: From: Chris Rees To: Ian Smith Content-Type: text/plain; charset=ISO-8859-1 X-Content-Filtered-By: Mailman/MimeDel 2.1.5 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 X-BeenThere: freebsd-bugs@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 14 Jul 2012 17:59:56 -0000 On 14 Jul 2012 18:49, "Ian Smith" 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