Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F144620194
D53389.1775824719.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Flag For Later
Award Token
Size
783 B
Referenced Files
None
Subscribers
None
D53389.1775824719.diff
View Options
diff --git a/sys/fs/nfs/nfs_commonsubs.c b/sys/fs/nfs/nfs_commonsubs.c
--- a/sys/fs/nfs/nfs_commonsubs.c
+++ b/sys/fs/nfs/nfs_commonsubs.c
@@ -4192,10 +4192,15 @@
nidp->nid_namelen);
if (error == 0 && nidp->nid_ngroup > 0 &&
(nidp->nid_flag & NFSID_ADDUID) != 0) {
- grps = malloc(sizeof(gid_t) * nidp->nid_ngroup, M_TEMP,
- M_WAITOK);
- error = copyin(nidp->nid_grps, grps,
- sizeof(gid_t) * nidp->nid_ngroup);
+ grps = NULL;
+ if (nidp->nid_ngroup > NGROUPS_MAX)
+ error = EINVAL;
+ if (error == 0) {
+ grps = malloc(sizeof(gid_t) * nidp->nid_ngroup, M_TEMP,
+ M_WAITOK);
+ error = copyin(nidp->nid_grps, grps,
+ sizeof(gid_t) * nidp->nid_ngroup);
+ }
if (error == 0) {
/*
* Create a credential just like svc_getcred(),
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Fri, Apr 10, 12:38 PM (17 h, 43 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
28315962
Default Alt Text
D53389.1775824719.diff (783 B)
Attached To
Mode
D53389: nfs_commonsubs.c: Add a sanity check for nid_ngroup
Attached
Detach File
Event Timeline
Log In to Comment