Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F144310924
D53389.id165214.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
783 B
Referenced Files
None
Subscribers
None
D53389.id165214.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
Sun, Feb 8, 7:07 PM (5 h, 39 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
28486592
Default Alt Text
D53389.id165214.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