From owner-freebsd-ports-bugs@FreeBSD.ORG Mon May 29 11:20:18 2006 Return-Path: X-Original-To: freebsd-ports-bugs@hub.freebsd.org Delivered-To: freebsd-ports-bugs@hub.freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id B1E9A16A431 for ; Mon, 29 May 2006 11:20:18 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [216.136.204.21]) by mx1.FreeBSD.org (Postfix) with ESMTP id 2F2DA43D55 for ; Mon, 29 May 2006 11:20:18 +0000 (GMT) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (gnats@localhost [127.0.0.1]) by freefall.freebsd.org (8.13.4/8.13.4) with ESMTP id k4TBKI9b001423 for ; Mon, 29 May 2006 11:20:18 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.13.4/8.13.4/Submit) id k4TBKHIY001422; Mon, 29 May 2006 11:20:18 GMT (envelope-from gnats) Resent-Date: Mon, 29 May 2006 11:20:18 GMT Resent-Message-Id: <200605291120.k4TBKHIY001422@freefall.freebsd.org> Resent-From: FreeBSD-gnats-submit@FreeBSD.org (GNATS Filer) Resent-To: freebsd-ports-bugs@FreeBSD.org Resent-Reply-To: FreeBSD-gnats-submit@FreeBSD.org, Dmitry Morozovsky Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 3197216A421 for ; Mon, 29 May 2006 11:13:07 +0000 (UTC) (envelope-from marck@woozle.rinet.ru) Received: from woozle.rinet.ru (woozle.rinet.ru [195.54.192.68]) by mx1.FreeBSD.org (Postfix) with ESMTP id 6C96343D53 for ; Mon, 29 May 2006 11:13:06 +0000 (GMT) (envelope-from marck@woozle.rinet.ru) Received: from woozle.rinet.ru (localhost [127.0.0.1]) by woozle.rinet.ru (8.13.6/8.13.6) with ESMTP id k4TBD4bp075777 for ; Mon, 29 May 2006 15:13:04 +0400 (MSD) (envelope-from marck@woozle.rinet.ru) Received: (from marck@localhost) by woozle.rinet.ru (8.13.6/8.13.6/Submit) id k4TBD4NP075776; Mon, 29 May 2006 15:13:04 +0400 (MSD) (envelope-from marck) Message-Id: <200605291113.k4TBD4NP075776@woozle.rinet.ru> Date: Mon, 29 May 2006 15:13:04 +0400 (MSD) From: Dmitry Morozovsky To: FreeBSD-gnats-submit@FreeBSD.org X-Send-Pr-Version: 3.113 Cc: Subject: ports/98080: security/nmap patch for bpf open X-BeenThere: freebsd-ports-bugs@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: Dmitry Morozovsky List-Id: Ports bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 29 May 2006 11:20:18 -0000 >Number: 98080 >Category: ports >Synopsis: security/nmap patch for bpf open >Confidential: no >Severity: non-critical >Priority: medium >Responsible: freebsd-ports-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: sw-bug >Submitter-Id: current-users >Arrival-Date: Mon May 29 11:20:17 GMT 2006 >Closed-Date: >Last-Modified: >Originator: Dmitry Morozovsky >Release: FreeBSD 6-STABLE i386 >Organization: Cronyx Plus LLC (RiNet ISP) >Environment: System: FreeBSD 6-STABLE >Description: security/nmap fails to attach to bpf when more than 128 bpfs are busy. >How-To-Repeat: >Fix: I'm not sure what limit should we set, but 1024 seems reasonable for me, and it does work on real-load router with 450+ VLANs. Index: Makefile =================================================================== RCS file: /home/ncvs/ports/security/nmap/Makefile,v retrieving revision 1.98 diff -u -r1.98 Makefile --- Makefile 15 Mar 2006 14:30:41 -0000 1.98 +++ Makefile 29 May 2006 11:02:06 -0000 @@ -7,7 +7,7 @@ PORTNAME?= nmap PORTVERSION= ${DISTVERSION:L:C/([a-z])[a-z]+/\1/g:C/[^a-z0-9+]+/./g} -PORTREVISION= 1 +PORTREVISION= 2 CATEGORIES= security ipv6 MASTER_SITES= http://download.insecure.org/nmap/dist/ \ http://www.mirrors.wiretapped.net/security/network-mapping/nmap/ \ Index: files/patch-libdnet-stripped_src_eth-bsd.c =================================================================== RCS file: files/patch-libdnet-stripped_src_eth-bsd.c diff -N files/patch-libdnet-stripped_src_eth-bsd.c --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ files/patch-libdnet-stripped_src_eth-bsd.c 29 May 2006 11:02:06 -0000 @@ -0,0 +1,14 @@ + +$FreeBSD$ + +--- libdnet-stripped/src/eth-bsd.c.orig ++++ libdnet-stripped/src/eth-bsd.c +@@ -45,7 +45,7 @@ + int i; + + if ((e = calloc(1, sizeof(*e))) != NULL) { +- for (i = 0; i < 128; i++) { ++ for (i = 0; i < 1024; i++) { + snprintf(file, sizeof(file), "/dev/bpf%d", i); + e->fd = open(file, O_WRONLY); + if (e->fd != -1 || errno != EBUSY) >Release-Note: >Audit-Trail: >Unformatted: