From: FreeBSD Security AdvisoriesTo: BUGTRAQ@SECURITYFOCUS.COM Subject: FreeBSD Security Advisory FreeBSD-SA-01:32.ipfilter Date: Mon, 16 Apr 2001 12:37:22 -0700 -----BEGIN PGP SIGNED MESSAGE----- ============================================================================= FreeBSD-SA-01:32 Security Advisory FreeBSD, Inc. Topic: IPFilter may incorrectly pass packets Category: core Module: IPFilter Announced: 2001-04-16 Credits: Thomas Lopatic <thomas@lopatic.de> Affects: FreeBSD 3.x (all releases), FreeBSD 4.x (all releases), FreeBSD 3.5-STABLE, and 4.2-STABLE prior to the correction date. Corrected: 2001-04-07 (FreeBSD 4.2-STABLE) Vendor status: Corrected FreeBSD only: NO I. Background IPFilter is a multi-platform packet filtering package. II. Problem Description When matching a packet fragment, insufficient checks were performed to ensure the fragment is valid. In addition, the fragment cache is checked before any rules are checked. Even if all fragments are blocked with a rule, fragment cache entries can be created by packets that match currently held state information. Because of these discrepancies, certain packets may bypass filtering rules. All versions of FreeBSD prior to the correction date, including FreeBSD 3.5.1 and 4.2, contain this problem. The base system that will ship with FreeBSD 4.3 does not contain this problem since it was corrected during the beta cycle before the release. III. Impact Malicious remote users may be able to bypass filtering rules, allowing them to potentially circumvent the firewall. IPFilter is not enabled by default. If you have not enabled IPFilter, your system is not vulnerable to this problem. IV. Workaround Since fragment cache matching occurs before filtering rules checking, it is not possible to work around this problem using IPFilter rules. V. Solution [FreeBSD 3.x] Due to the age of the IPFilter package shipped with FreeBSD 3.x, it is recommended that FreeBSD 3.x systems update to IPFilter 3.4.17 using the package available from the authors website: http://coombs.anu.edu.au/~avalon/ip-filter.html [FreeBSD 4.x] One of the following: 1) Upgrade to FreeBSD 4.2-STABLE after the correction date. 2) Download the patch and detached PGP signature from the following location: The following patch applies to FreeBSD 4.1-RELEASE through 4.2-STABLE. # fetch ftp://ftp.freebsd.org/pub/FreeBSD/CERT/patches/SA-01:33/ipfilter.patch # fetch ftp://ftp.freebsd.org/pub/FreeBSD/CERT/patches/SA-01:33/ipfilter.patch.asc Verify the detached signature using your PGP utility. Issue the following commands as root: # cd /usr/src # patch -p < /path/to/patch If the system is using ipfilter as a kernel module, the module may be rebuilt and installed and ipfilter rules reloaded with the following commands: # cd /usr/src/sys/modules/ipfilter # make all install # kldunload ipl && kldload ipf && ipf -Fa -f /etc/ipf.rules Otherwise, if ipfilter is compiled into the kernel, a new kernel will need to be compiled and installed and the system will have to be rebooted for the changes to take effect. -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.0.4 (FreeBSD) Comment: For info see http://www.gnupg.org iQCVAwUBOttI71UuHi5z0oilAQHKwwP8CfuhsJA8z78zOJCLSGWPAJSgsi9aFvP7 oVd4eKkVHgHI5hC5QTRgOGg84KncXUu7DJjlOlZ+6nVxcxdp4DED/yRTWjqc14og guP3SBAcJwH5y44ZW/VV+LlbNJue77Igkq1u3dran6TPBMdiUeRIRsj0acn6k1nc ATwy7N0Ade8= =Wujh -----END PGP SIGNATURE----- From owner-bugtraq@SECURITYFOCUS.COM Tue Apr 17 05:38:02 2001 Return-Path: <owner-bugtraq@SECURITYFOCUS.COM> Received: from localhost (io [127.0.0.1]) by jelly.lwn.net (8.9.3/8.9.3) with ESMTP id FAA03069 for <cool@localhost>; Tue, 17 Apr 2001 05:38:02 -0600 Delivered-To: cool@lwn.net Received: from vena.lwn.net [206.168.112.25] by localhost with POP3 (fetchmail-5.5.0) for cool@localhost (single-drop); Tue, 17 Apr 2001 05:38:02 -0600 (MDT) Received: (qmail 20754 invoked by uid 1013); 17 Apr 2001 06:58:00 -0000 Delivered-To: lwn-bugtraq@LWN.NET Received: (qmail 20750 invoked from network); 17 Apr 2001 06:57:55 -0000 Received: from lists.securityfocus.com (66.38.151.7) by vena.lwn.net with SMTP; 17 Apr 2001 06:57:55 -0000 Received: from lists.securityfocus.com (lists.securityfocus.com [66.38.151.7]) by lists.securityfocus.com (Postfix) with ESMTP id 2FB9D24CE89; Mon, 16 Apr 2001 23:45:29 -0600 (MDT) Received: from LISTS.SECURITYFOCUS.COM by LISTS.SECURITYFOCUS.COM (LISTSERV-TCP/IP release 1.8d) with spool id 33427873 for BUGTRAQ@LISTS.SECURITYFOCUS.COM; Mon, 16 Apr 2001 23:44:02 -0600 Approved-By: aleph1@SECURITYFOCUS.COM Delivered-To: bugtraq@lists.securityfocus.com Received: from securityfocus.com (mail.securityfocus.com [66.38.151.9]) by lists.securityfocus.com (Postfix) with SMTP id 3133224EEEF for <bugtraq@lists.securityfocus.com>; Mon, 16 Apr 2001 13:37:19 -0600 (MDT) Received: (qmail 17248 invoked by alias); 16 Apr 2001 19:37:20 -0000 Delivered-To: bugtraq@securityfocus.com Received: (qmail 17240 invoked from network); 16 Apr 2001 19:37:20 -0000 Received: from mx2.freebsd.org (216.136.204.119) by mail.securityfocus.com with SMTP; 16 Apr 2001 19:37:20 -0000 Received: from hub.freebsd.org (hub.freebsd.org [216.136.204.18]) by mx2.freebsd.org (Postfix) with ESMTP id 65ED15545A for <bugtraq@securityfocus.com>; Mon, 16 Apr 2001 12:37:22 -0700 (PDT) (envelope-from security-advisories@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [216.136.204.21]) by hub.freebsd.org (Postfix) with ESMTP id 5C5AD37B42C; Mon, 16 Apr 2001 12:37:22 -0700 (PDT) (envelope-from security-advisories@FreeBSD.org) Received: (from kris@localhost) by freefall.freebsd.org (8.11.1/8.11.1) id f3GJbMb51244; Mon, 16 Apr 2001 12:37:22 -0700 (PDT) (envelope-from security-advisories@FreeBSD.org) X-Authentication-Warning: freefall.freebsd.org: kris set sender to security-advisories@FreeBSD.org using -f Precedence: bulk Message-ID: <200104161937.f3GJbMb51244@freefall.freebsd.org> Date: Mon, 16 Apr 2001 12:37:22 -0700 Reply-To: security-advisories@FreeBSD.org Sender: Bugtraq List <BUGTRAQ@SECURITYFOCUS.COM> From: FreeBSD Security Advisories <security-advisories@FreeBSD.org> Subject: FreeBSD Security Advisory FreeBSD-SA-01:32.ipfilter To: BUGTRAQ@SECURITYFOCUS.COM Status: RO Content-Length: 3473 Lines: 102 -----BEGIN PGP SIGNED MESSAGE----- ============================================================================= FreeBSD-SA-01:32 Security Advisory FreeBSD, Inc. Topic: IPFilter may incorrectly pass packets Category: core Module: IPFilter Announced: 2001-04-16 Credits: Thomas Lopatic <thomas@lopatic.de> Affects: FreeBSD 3.x (all releases), FreeBSD 4.x (all releases), FreeBSD 3.5-STABLE, and 4.2-STABLE prior to the correction date. Corrected: 2001-04-07 (FreeBSD 4.2-STABLE) Vendor status: Corrected FreeBSD only: NO I. Background IPFilter is a multi-platform packet filtering package. II. Problem Description When matching a packet fragment, insufficient checks were performed to ensure the fragment is valid. In addition, the fragment cache is checked before any rules are checked. Even if all fragments are blocked with a rule, fragment cache entries can be created by packets that match currently held state information. Because of these discrepancies, certain packets may bypass filtering rules. All versions of FreeBSD prior to the correction date, including FreeBSD 3.5.1 and 4.2, contain this problem. The base system that will ship with FreeBSD 4.3 does not contain this problem since it was corrected during the beta cycle before the release. III. Impact Malicious remote users may be able to bypass filtering rules, allowing them to potentially circumvent the firewall. IPFilter is not enabled by default. If you have not enabled IPFilter, your system is not vulnerable to this problem. IV. Workaround Since fragment cache matching occurs before filtering rules checking, it is not possible to work around this problem using IPFilter rules. V. Solution [FreeBSD 3.x] Due to the age of the IPFilter package shipped with FreeBSD 3.x, it is recommended that FreeBSD 3.x systems update to IPFilter 3.4.17 using the package available from the authors website: http://coombs.anu.edu.au/~avalon/ip-filter.html [FreeBSD 4.x] One of the following: 1) Upgrade to FreeBSD 4.2-STABLE after the correction date. 2) Download the patch and detached PGP signature from the following location: The following patch applies to FreeBSD 4.1-RELEASE through 4.2-STABLE. # fetch ftp://ftp.freebsd.org/pub/FreeBSD/CERT/patches/SA-01:33/ipfilter.patch # fetch ftp://ftp.freebsd.org/pub/FreeBSD/CERT/patches/SA-01:33/ipfilter.patch.asc Verify the detached signature using your PGP utility. Issue the following commands as root: # cd /usr/src # patch -p < /path/to/patch If the system is using ipfilter as a kernel module, the module may be rebuilt and installed and ipfilter rules reloaded with the following commands: # cd /usr/src/sys/modules/ipfilter # make all install # kldunload ipl && kldload ipf && ipf -Fa -f /etc/ipf.rules Otherwise, if ipfilter is compiled into the kernel, a new kernel will need to be compiled and installed and the system will have to be rebooted for the changes to take effect. -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.0.4 (FreeBSD) Comment: For info see http://www.gnupg.org iQCVAwUBOttI71UuHi5z0oilAQHKwwP8CfuhsJA8z78zOJCLSGWPAJSgsi9aFvP7 oVd4eKkVHgHI5hC5QTRgOGg84KncXUu7DJjlOlZ+6nVxcxdp4DED/yRTWjqc14og guP3SBAcJwH5y44ZW/VV+LlbNJue77Igkq1u3dran6TPBMdiUeRIRsj0acn6k1nc ATwy7N0Ade8= =Wujh -----END PGP SIGNATURE-----