Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 24 Oct 2015 17:17:18 +0000
From:      bugzilla-noreply@freebsd.org
To:        freebsd-bugs@FreeBSD.org
Subject:   [Bug 204005] [patch][pf] PF_ANEQ macro improperly compare IPv4 packets.
Message-ID:  <bug-204005-8@https.bugs.freebsd.org/bugzilla/>

next in thread | raw e-mail | index | archive | help
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=204005

            Bug ID: 204005
           Summary: [patch][pf] PF_ANEQ macro improperly compare IPv4
                    packets.
           Product: Base System
           Version: 11.0-CURRENT
          Hardware: Any
                OS: Any
            Status: New
          Keywords: patch
          Severity: Affects Only Me
          Priority: ---
         Component: kern
          Assignee: freebsd-bugs@FreeBSD.org
          Reporter: milosz.kaniewski@gmail.com
          Keywords: patch

Created attachment 162429
  --> https://bugs.freebsd.org/bugzilla/attachment.cgi?id=162429&action=edit
patch

PF_ANEQ() macro will in most situations returns TRUE comparing two identical
IPv4 packets (when it should return FALSE). It happens because PF_ANEQ()
doesn't stop if first 32 bits of IPv4 packets are equal and starts to check
next 3*32 bits (like for IPv6 packet). Those bits containt some garbage and in
result PF_ANEQ() wrongly returns TRUE.

Fix: Check if packet is of AF_INET type and if it is then compare only first 32
bits of data.
Proposed fix in attachment.

This bug was already described and repaired in OpenBSD pf:
http://cvsweb.openbsd.org/cgi-bin/cvsweb/src/sys/net/pfvar.h?f=h#rev1.287

-- 
You are receiving this mail because:
You are the assignee for the bug.



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?bug-204005-8>