git: 75eb6846269b - main - nfsuserd: Fix OOB access on membership of too many groups, take 2
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Thu, 09 Oct 2025 17:07:41 UTC
The branch main has been updated by olce: URL: https://cgit.FreeBSD.org/src/commit/?id=75eb6846269bb9bec1eaf4f0ad93d7525715b550 commit 75eb6846269bb9bec1eaf4f0ad93d7525715b550 Author: Olivier Certner <olce@FreeBSD.org> AuthorDate: 2025-10-09 17:03:11 +0000 Commit: Olivier Certner <olce@FreeBSD.org> CommitDate: 2025-10-09 17:06:57 +0000 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 --- usr.sbin/nfsuserd/nfsuserd.c | 1 + 1 file changed, 1 insertion(+) 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;