This is the mail archive of the libc-alpha@sourceware.cygnus.com mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: [han.holl@pobox.com] libc/1172: rresvport should avoid well known ports



Hello,

On Fri, Jun 25, Andreas Jaeger wrote:

> 
> We've received the appended bug report.  I understand the problem the
> user has but I'm not sure that we should follow the suggestion.
> 
> Could you please comments on this?

I would say programs which uses fixed port numbers between 512 - 1023 are 
broken. For this, we have the numbers less 512.
512 - 1023 are reserved for dynamically used privileged ports.

  Thorsten

> Date: Fri Jun 25 18:55:23 1999
> From: han.holl@pobox.com
> Subject: libc/1172: rresvport should avoid well known ports
> 
> Topics:
>    libc/1172: rresvport should avoid well known ports (from /etc/services)
> 
> 
> ----------------------------------------------------------------------
> 
> Date: Sun, 20 Jun 1999 14:57:56 -0400
> From: han.holl@pobox.com
> To: bugs@gnu.org
> Subject: libc/1172: rresvport should avoid well known ports (from /etc/services)
> Message-Id: <199906201857.OAA24203@delysid.gnu.org>
> 
> 
> >Number:         1172
> >Category:       libc
> >Synopsis:       rresvport should avoid well known ports (from /etc/services)
> >Confidential:   no
> >Severity:       non-critical
> >Priority:       medium
> >Responsible:    libc-gnats
> >State:          open
> >Class:          sw-bug
> >Submitter-Id:   unknown
> >Arrival-Date:   Sun Jun 20 15:00:01 EDT 1999
> >Last-Modified:
> >Originator:     han.holl@pobox.com
> >Organization:
> net
> >Release:        2.0.7
> >Environment:
> 
> >Description:
> If you start (for instance) rpc.mountd, it obtains, more or less random,
> a port between 600 and 1024.
> This makes is hazardous to start a server at a well known address between
> 600 and 1024, like rsyncd and several kerberos servers, because rresvport
> _could_ already have doled out these weel known ports.
> 
> The fix is easy: let rresvport() check with getservbyport() whether the port
> is in /etc/services, and avoid these ports.
> (Having to start rsyncd _before_ rpc.mountd is a error prone kludge).
> 
> Regards,
> 
> Han Holl
> >How-To-Repeat:
> Just read the source of rresvport(). It uses the PID modulo #PORTS, so
> repeating isn't too easy
> >Fix:
> >Audit-Trail:
> >Unformatted:
> 
> 
> ------------------------------
> 
> End of forwardyKAKaC Digest
> ***************************

> 
> -- 
>  Andreas Jaeger   aj@arthur.rhein-neckar.de    jaeger@informatik.uni-kl.de
>   for pgp-key finger ajaeger@aixd1.rhrk.uni-kl.de


-- 
Thorsten Kukuk      http://www.suse.de/~kukuk/        kukuk@suse.de
SuSE GmbH           Schanzaeckerstr. 10             90443 Nuernberg
Linux is like a Vorlon.  It is incredibly powerful, gives terse,
cryptic answers and has a lot of things going on in the background.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]