From owner-freebsd-bugs Mon Oct 21 15:10: 5 2002 Delivered-To: freebsd-bugs@hub.freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 5244337B409 for ; Mon, 21 Oct 2002 15:10:03 -0700 (PDT) Received: from freefall.freebsd.org (freefall.freebsd.org [216.136.204.21]) by mx1.FreeBSD.org (Postfix) with ESMTP id 9D4A543E65 for ; Mon, 21 Oct 2002 15:10:02 -0700 (PDT) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (gnats@localhost [127.0.0.1]) by freefall.freebsd.org (8.12.6/8.12.6) with ESMTP id g9LMA2x3036102 for ; Mon, 21 Oct 2002 15:10:02 -0700 (PDT) (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.12.6/8.12.6/Submit) id g9LMA2e6036101; Mon, 21 Oct 2002 15:10:02 -0700 (PDT) Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 83B1437B401 for ; Mon, 21 Oct 2002 15:04:42 -0700 (PDT) Received: from www.freebsd.org (www.freebsd.org [216.136.204.117]) by mx1.FreeBSD.org (Postfix) with ESMTP id D0CA043E4A for ; Mon, 21 Oct 2002 15:04:41 -0700 (PDT) (envelope-from nobody@FreeBSD.org) Received: from www.freebsd.org (localhost [127.0.0.1]) by www.freebsd.org (8.12.6/8.12.6) with ESMTP id g9LM4f7R026695 for ; Mon, 21 Oct 2002 15:04:41 -0700 (PDT) (envelope-from nobody@www.freebsd.org) Received: (from nobody@localhost) by www.freebsd.org (8.12.6/8.12.6/Submit) id g9LM4fAB026694; Mon, 21 Oct 2002 15:04:41 -0700 (PDT) Message-Id: <200210212204.g9LM4fAB026694@www.freebsd.org> Date: Mon, 21 Oct 2002 15:04:41 -0700 (PDT) From: Brian Lai To: freebsd-gnats-submit@FreeBSD.org X-Send-Pr-Version: www-1.0 Subject: misc/44361: possible raw socket bug 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 >Number: 44361 >Category: misc >Synopsis: possible raw socket bug >Confidential: no >Severity: critical >Priority: high >Responsible: freebsd-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: sw-bug >Submitter-Id: current-users >Arrival-Date: Mon Oct 21 15:10:02 PDT 2002 >Closed-Date: >Last-Modified: >Originator: Brian Lai >Release: 4.5 >Organization: no >Environment: FreeBSD 4.5-RELEASE >Description: look at rip_output@sys/netinet/raw_ip.c, ip->ip_len, which is in network byte order, is compared against m->m_pkthdr.len which is in host byte order. This bug is found when I am developing a user level TCP/IP stack. As far as I know, this bug exits in 4.7 and 5.0-CURRENT. >How-To-Repeat: >Fix: add ---------------- NTOHS(ip->ip_len); NTOHS(ip->ip_off); ---------------- after ---------------- } else { if (m->m_pkthdr.len > IP_MAXPACKET) { m_freem(m); return(EMSGSIZE); } ip = mtod(m, struct ip *); ---------------- >Release-Note: >Audit-Trail: >Unformatted: To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-bugs" in the body of the message