From owner-freebsd-bugs Sat Oct 13 0:30: 9 2001 Delivered-To: freebsd-bugs@hub.freebsd.org Received: from freefall.freebsd.org (freefall.FreeBSD.org [216.136.204.21]) by hub.freebsd.org (Postfix) with ESMTP id 8A48237B40C for ; Sat, 13 Oct 2001 00:30:02 -0700 (PDT) Received: (from gnats@localhost) by freefall.freebsd.org (8.11.4/8.11.4) id f9D7U2h57596; Sat, 13 Oct 2001 00:30:02 -0700 (PDT) (envelope-from gnats) Date: Sat, 13 Oct 2001 00:30:02 -0700 (PDT) Message-Id: <200110130730.f9D7U2h57596@freefall.freebsd.org> To: freebsd-bugs@FreeBSD.org Cc: From: "Crist J. Clark" Subject: Re: kern/31130: ipfw tee functionality causes malfunction and security hole Reply-To: "Crist J. Clark" Sender: owner-freebsd-bugs@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.org The following reply was made to PR kern/31130; it has been noted by GNATS. From: "Crist J. Clark" To: tburgess@whitley.unimelb.edu.au Cc: freebsd-gnats-submit@FreeBSD.ORG Subject: Re: kern/31130: ipfw tee functionality causes malfunction and security hole Date: Sat, 13 Oct 2001 00:22:40 -0700 This seems to fix 'tee' in ipfw(8) for me. Wanna give it a shot? BTW, I recently wrote a simple tool, Divert Packet Capture Daemon, dpcd, that catches packets on a divert(4) socket, passes them to a "module" that does arbitrary things, and then can (optionally) write the packet back. If you are still having 'tee' problems, let me know. Patch for -CURRENT. Should apply on -STABLE too. Index: src/sys/netinet/ip_input.c =================================================================== RCS file: /export/ncvs/src/sys/netinet/ip_input.c,v retrieving revision 1.182 diff -u -r1.182 ip_input.c --- src/sys/netinet/ip_input.c 2001/10/05 05:45:27 1.182 +++ src/sys/netinet/ip_input.c 2001/10/13 06:55:37 @@ -794,6 +794,10 @@ return; m = clone; ip = mtod(m, struct ip *); + /* XXX 'tee' was broken. Are these the right fixes? */ + ip->ip_len += hlen; + divert_info = 0; + goto pass; } #endif -- Crist J. Clark | cjclark@alum.mit.edu | cjclark@jhu.edu http://people.freebsd.org/~cjc/ | cjc@freebsd.org To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-bugs" in the body of the message