ports/98080: security/nmap patch for bpf open

Dmitry Morozovsky marck at FreeBSD.org
Mon May 29 11:20:18 UTC 2006


>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:



More information about the freebsd-ports-bugs mailing list