public inbox for libc-hacker@sourceware.org
 help / color / mirror / Atom feed
From: Ulrich Drepper <drepper@redhat.com>
To: "libc-ha >> GNU libc hacker" <libc-hacker@sources.redhat.com>
Cc: Tim Hockin <thockin@sun.com>
Subject: more NGROUPS hacking
Date: Thu, 26 Feb 2004 19:28:00 -0000	[thread overview]
Message-ID: <403E48C0.60005@redhat.com> (raw)

I've changed some of the RPC code which made use of NGROUPS.  Boy, that
code is screwed.  Of more correctly, the users of that code are screwed.

The array passed to authdes_getucred() must be large enough for the
values read from NIS or wherever.  But no size argument is available.
So netname2user() will scribble happily over the array boundaries should
the size of the array be too small.  Also, the output parameter for the
number of groups is an short.  I.e., this is too small even for the
default maximum number the Linux kernel now handles.

Anyway, the libc side should be fine now.  If something crashes it's
because the array passed in is too small.  Some platforms apparently
document that the netname2user() function never writes more than NGROUPS
values.  This might be one way out, but a limiting one.

The best advise is as before: avoid RPC like the plague.


(I wonder if the criminally reckless people who "designed" these
interfaces still work for Sun and can be held responsible...)

-- 
➧ Ulrich Drepper ➧ Red Hat, Inc. ➧ 444 Castro St ➧ Mountain View, CA ❖

                 reply	other threads:[~2004-02-26 19:28 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=403E48C0.60005@redhat.com \
    --to=drepper@redhat.com \
    --cc=libc-hacker@sources.redhat.com \
    --cc=thockin@sun.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).