lkml.org 
[lkml]   [2009]   [Nov]   [10]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    SubjectRe: sunrpc port allocation and IANA reserved list
    From
    Date
    On Tue, 2009-11-10 at 12:37 -0600, Chris Friesen wrote:
    > On 11/10/2009 11:53 AM, Ben Hutchings wrote:
    > > On Tue, 2009-11-10 at 11:43 -0600, Chris Friesen wrote:
    >
    > >> Given that a userspace application can be stopped and restarted at any
    > >> time, and a sunrpc registration can happen at any time, what is the
    > >> expected mechanism to prevent the kernel from allocating a port for use
    > >> by sunrpc that reserved or well-known?
    > >>
    > >> Apparently Redhat and Debian have distro-specific ways of dealing with
    > >> this, but is there a standard solution? Should there be?
    > >>
    > >> The current setup seems suboptimal.
    > >
    > > I believe both RH and Debian are using the same implementation:
    > > <http://cyberelk.net/tim/software/portreserve/>.
    >
    > That helps with the startup case, but still leaves a possible hole if an
    > app using a fixed port number is restarted at runtime. During the
    > window where nobody is bound to the port, the kernel could randomly
    > assign it to someone else.

    Just use /proc/sys/sunrpc/{max,min}_resvport interface to restrict the
    range used to a safer one. That's what it is for...

    Trond



    \
     
     \ /
      Last update: 2009-11-10 21:29    [W:0.040 / U:1.204 seconds]
    ©2003-2016 Jasper Spaans. hosted at Digital OceanAdvertise on this site