Date: Thu, 3 May 2018 07:28:49 +0000 (UTC) From: Andriy Gapon <avg@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r333198 - stable/10/usr.sbin/mountd Message-ID: <201805030728.w437SnA1097247@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: avg Date: Thu May 3 07:28:49 2018 New Revision: 333198 URL: https://svnweb.freebsd.org/changeset/base/333198 Log: MFC r332559: mountd: fix a crash when getgrouplist reports too many groups Sponsored by: Panzura Modified: stable/10/usr.sbin/mountd/mountd.c Directory Properties: stable/10/ (props changed) Modified: stable/10/usr.sbin/mountd/mountd.c ============================================================================== --- stable/10/usr.sbin/mountd/mountd.c Thu May 3 07:28:04 2018 (r333197) +++ stable/10/usr.sbin/mountd/mountd.c Thu May 3 07:28:49 2018 (r333198) @@ -2955,8 +2955,11 @@ parsecred(char *namelist, struct xucred *cr) } cr->cr_uid = pw->pw_uid; ngroups = XU_NGROUPS + 1; - if (getgrouplist(pw->pw_name, pw->pw_gid, groups, &ngroups)) + if (getgrouplist(pw->pw_name, pw->pw_gid, groups, &ngroups)) { syslog(LOG_ERR, "too many groups"); + ngroups = XU_NGROUPS + 1; + } + /* * Compress out duplicate. */
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201805030728.w437SnA1097247>