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: Fwd: Bug#21810: libc6: rexec call dumps core with user="string" and password=NULL


Mark Kettenis wrote:
> 
> One should probably use rcmd() instead.

mmm...  Requires root though.

> If you really want to use rexec() you'll have to do the .netrc parsing
> yourself, ...

Oh I'm OK - I just make sure .netrc is valid.  If it isn't I remove
./core and try again!

But right now, /usr/bin/rexec can drop core in surprising ways and
nobody is fixing it.  At the risk of quoting myself: "It's all a bit of
a mess".

At the least I suggest rexec(3) be taught to not dereference NULL under
these circumstances.


--- rexec.c     Thu Jul 16 15:45:29 1998
+++ new-rexec.c Tue Nov  2 00:34:34 1999
@@ -137,6 +137,9 @@
                }
                *fd2p = s3;
        }
+
+       if (name == 0)
+               goto bad;
        (void) __write(s, name, strlen(name) + 1);
        /* should public key encypt the password here */
        (void) __write(s, pass, strlen(pass) + 1);

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