[Bug 234622] [libc] getgrent() issue with large NIS groups
bugzilla-noreply at freebsd.org
bugzilla-noreply at freebsd.org
Sun Jan 13 22:12:52 UTC 2019
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=234622
Jilles Tjoelker <jilles at FreeBSD.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |jilles at FreeBSD.org
Status|New |Open
--- Comment #1 from Jilles Tjoelker <jilles at FreeBSD.org> ---
This patch looks conceptually correct: if getgrent_r() returns ERANGE, it must
not advance the iterator. Apparently it is acceptable to call yp_first() or
yp_next() with the same key multiple times.
The code in FreeBSD head advances the iterator when ERANGE is returned, so the
excessively long group is discarded (but following groups will use a larger
buffer).
Potential issue in the patch: reading *errnop in if (*errnop == ERANGE) {
without ensuring it is meaningful by checking rv == NS_RETURN may not be
correct.
--
You are receiving this mail because:
You are the assignee for the bug.
More information about the freebsd-bugs
mailing list