Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 9 Jan 2003 12:37:50 -0800 (PST)
From:      Matthew Dillon <dillon@apollo.backplane.com>
To:        Alfred Perlstein <bright@mu.org>
Cc:        hackers@FreeBSD.ORG, tegge@FreeBSD.ORG
Subject:   Re: rfork DoS
Message-ID:  <200301092037.h09Kbo9v005055@apollo.backplane.com>
References:   <20030109202346.GS33821@elvis.mu.org>

next in thread | previous in thread | raw e-mail | index | archive | help
    Well, the manual page (which may be out of date) infers
    that the rfork() only operates on the current process if
    RFPROC is not set.  If we extend that to include RFTHREAD
    then the inference is that either RFPROC or RFTHREAD must be
    set and if neither is set an error should be returned.  Am
    I missing something?

					-Matt
					Matthew Dillon 
					<dillon@backplane.com>


:I think there can be a problem if we allow rfork without
:either RFCFDG or RFFDG and RFTHREAD.
:
:Basically because we cache the ADVLOCK flag in the proc
:we may have a situation where this happens:
:
:p1 rfork(RFMEM); /* gets back p2 */
:p2 advlocks some files from the shared table
:p2 exits, but since the refcount on the fdesc is still > 0 we leave it
:   alone and leak lock structures.
:p1 exits 
:
:Does this make sense as a problem area?  I think we should only
:allow filedesc sharing if RFTHREAD is set.   RFTHREAD seems to get
:it right because of the peers/leader mechanism.
:
:thanks,
:-- 
:-Alfred Perlstein [alfred@freebsd.org]
:'Instead of asking why a piece of software is using "1970s technology,"
: start asking why software is ignoring 30 years of accumulated wisdom.'
:


To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-hackers" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200301092037.h09Kbo9v005055>