kern/106438: [ipf] ipfilter: keep state does not seem to allow
replies in on spar64 (and maybe others)
Pyun YongHyeon
pyunyh at gmail.com
Mon Dec 7 18:37:30 UTC 2009
On Mon, Dec 07, 2009 at 01:40:04AM +0000, Mark Abene wrote:
> The following reply was made to PR kern/106438; it has been noted by GNATS.
>
> From: Mark Abene <phiber at phiber.com>
> To: bug-followup at FreeBSD.org, mala at hinterbergen.de
> Cc:
> Subject: Re: kern/106438: [ipf] ipfilter: keep state does not seem to allow
> replies in on spar64 (and maybe others)
> Date: Sun, 06 Dec 2009 20:26:25 -0500
>
> It's been several years since this was first reported, and I can confirm
> that it's still a problem in FreeBSD 8.0-RELEASE on i386 with an fxp
> interface. I just wasted nearly two days trying to figure out why our
> ipfilter rules which have been in use for years on our firewall suddenly
> locked the machine out when we upgraded from a rather old version of
> FreeBSD to 8.0-RELEASE.
>
> Same exact problem, same exact symptoms. Disabling checksumming on the
> interface resolved the problem completely, otherwise ipfilter was rather
> broken. I'm really glad I found this bug report, though not soon
> enough. This is a rather serious problem.
>
I think the bug is in ipfilter's checksum computation. Unlike other
operating systems, FreeBSD also supports cheap controllers that lacks
pseudo checksum operation. These controllers just compute partial
checksum without pseudo header and drivers(fxp(4), hme(4) and gem(4))
that take advantage of this feature insert a tag which indicates
pseudo checksum is required in upper stack. The checksum computation
code in ipfilter didn't account for IP header length so it always
computed checksum wrong.
I guess the following patch may fix the issue. The patch is not
tested and wouldn't be complete as it assumes IPv4. However no other
driver in tree set CSUM_DATA_VALID without CSUM_PSEUDO_HDR for IPv6
at this moment.
Darren, would you review the patch? Because ipfilter lives in
contrib I think it should go upstream first.
> -Mark
-------------- next part --------------
A non-text attachment was scrubbed...
Name: ipfilter.csum.patch
Type: text/x-diff
Size: 567 bytes
Desc: not available
Url : http://lists.freebsd.org/pipermail/freebsd-net/attachments/20091207/65f7676c/ipfilter.csum.bin
More information about the freebsd-net
mailing list