The usr.sbin/mountd/mountd.c:parsecred() function has the following mistakes: 1. It has buffer overflow if number of GIDs of some user is greater than the XU_NGROUPS value, incorrect usage of getgrouplist(3). 2. It incorrectly gets group lists for a user given without groups: it forgets about a single group of a user or forgets about the first supplementary group of a user. 3. If a user is unknown it silently uses -2:-2 credentials and this does not correspond to exports(5) rules. 4. If a group is unknown, then it ignores this group and this does not correspond to exports(5) rules. 5. It uses atoi(3) function to parse UID and GID, and does not check any mistakes in numbers. Fix: [ patch elided - gavin@ ]
State Changed From-To: open->closed PR closed at request of submitter.