kern/63772: tap device / exclusive open problem

Stefan `Sec` Zehl sec at 42.org
Thu Mar 4 11:20:09 PST 2004


>Number:         63772
>Category:       kern
>Synopsis:       tap device / exclusive open problem
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Thu Mar 04 11:20:08 PST 2004
>Closed-Date:
>Last-Modified:
>Originator:     Stefan `Sec` Zehl
>Release:        FreeBSD 5.2-CURRENT i386
>Organization:
>Environment:
System: FreeBSD dell 5.2-CURRENT FreeBSD 5.2-CURRENT #3: Thu Mar 4 17:37:09 CET 2004 root at dell:/usr/obj/usr/src/sys/DELL i386



        
>Description:

tap(4) says:

     The Ethernet tunnel device, normally /dev/tapN, is exclusive-open (it
     cannot be opened if it is already open) and is restricted to the super-
     user.  A read() call will return an error (EHOSTDOWN) if the interface is

but this appears to be untrue.

The problem affects openvpn (1.6r2) which always ends up using tap0,            even if it already in use.

>How-To-Repeat:

I can have multiple processes reading and writing on a single tap inerface.

dell:~#cat /dev/tap0 &
[1] 29197
dell:~#cat /dev/tap0 &
[2] 29198

dell:~#echo> /dev/tap0 ; echo $?
0
dell:~#jobs
[1]  - running    cat /dev/tap0
[2]  + running    cat /dev/tap0


>Fix:

>Release-Note:
>Audit-Trail:
>Unformatted:


More information about the freebsd-bugs mailing list