Mailing List Archive

1 2  View All
[Bug 787] Minor security problem due to use of deprecated NGROUPS_MAX in uidswap.c (sshd) [ In reply to ]
http://bugzilla.mindrot.org/show_bug.cgi?id=787





------- Additional Comments From openssh_bugzilla@hockin.org 2004-02-24 13:05 -------
Well, there are very few bits of code that need hacking to work with 64k groups,
so I have to discount the bit about extra complexity.

Speaking of optimizing for the common case: this is called ONCE (unless I
misread) per process. The real optimization is to use only as much memory as is
strictly needed, though neither you nor I are actually optimizing anything at
all. The runtime of this code is so far away from the fast path of anything
that it's dumb to be arguing about.

I should also mention that sooner or later _SC_NGROUPS_MAX may end up as an
actual tunable in Linux. Again, you don't care what the maximum is, just what
the actual number is. Further, since the patch(es) I proposed are VERY simple
and work reliably, why would you opt AGAINST them, for something that is less
precise AND might not be available on a platform (thereby falling back on
today's buggy behavior). I can't see the reason for arguing that as a win.

But, in the end, it's not my project, right?



------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.
[Bug 787] Minor security problem due to use of deprecated NGROUPS_MAX in uidswap.c (sshd) [ In reply to ]
http://bugzilla.mindrot.org/show_bug.cgi?id=787

djm@mindrot.org changed:

What |Removed |Added
----------------------------------------------------------------------------
Status|ASSIGNED |RESOLVED
Resolution| |FIXED



------- Additional Comments From djm@mindrot.org 2004-02-24 13:10 -------
Simpler patch applied. If necessary, we can revisit this under a different bug
post-release if necessary.

Tim, for a long time software has sized arrays using NGROUPS_MAX and/or sysconf.
By changing NGROUPS_MAX, you break binary compat in scary ways. By making the
baseline _SC_NGROUPS_MAX so high, you waste memory everywhere and force everyone
else to do the work in cleaning up after you.

Hopefully the glibc people will try to shelter userland from this silly and
gratuitous change.



------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.
[Bug 787] Minor security problem due to use of deprecated NGROUPS_MAX in uidswap.c (sshd) [ In reply to ]
http://bugzilla.mindrot.org/show_bug.cgi?id=787





------- Additional Comments From openssh_bugzilla@hockin.org 2004-02-24 13:16 -------
I did not find as many examples of people (mis)using NGROUPS_MAX as you'd like
to believe. Customers demanded more groups. So it had to grow.

As I keep arguing - you DON'T want to know the maximum groups (in 99% of cases).
You want to know the ACTUAL groups. And I am doing what I can to find apps
like openssh that are broken, and help them to see the light. Once it is fixed,
it's fixed.

Cheers.



------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.

1 2  View All