diff options
| author | Olivier Certner <olce@FreeBSD.org> | 2025-10-09 17:03:11 +0000 |
|---|---|---|
| committer | Olivier Certner <olce@FreeBSD.org> | 2025-10-09 17:06:57 +0000 |
| commit | 75eb6846269bb9bec1eaf4f0ad93d7525715b550 (patch) | |
| tree | dbd4e6059e971e6f22edb8952bab7f39e6d94611 | |
| parent | 0dc634d48fcca9e88c3fb12cdffab4ddbc657f99 (diff) | |
nfsuserd: Fix OOB access on membership of too many groups, take 2
Forgot to reset 'ngroup' after one of the calls to getgrouplist() in the
previous commit with same title (referenced also below).
MFC after: 1 hour
Fixes: e6c623c86ab4 ("Add support for the "-manage-gids" option to the nfsuserd daemon.")
Fixes: bb339adfb2a2 ("nfsuserd: Fix OOB access on membership of too many groups")
Sponsored by: The FreeBSD Foundation
| -rw-r--r-- | usr.sbin/nfsuserd/nfsuserd.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/usr.sbin/nfsuserd/nfsuserd.c b/usr.sbin/nfsuserd/nfsuserd.c index 0e5c9c8f1e50..058253beaf95 100644 --- a/usr.sbin/nfsuserd/nfsuserd.c +++ b/usr.sbin/nfsuserd/nfsuserd.c @@ -629,6 +629,7 @@ nfsuserdsrv(struct svc_req *rqstp, SVCXPRT *transp) syslog(LOG_ERR, "Group list of user '%s' too big", pwd->pw_name); + ngroup = NGROUPS; } nid.nid_ngroup = ngroup; nid.nid_grps = grps; |
