Questions with 'MPASS(ngrp <= ngroups_max)' assertion in kern_setgroups()

Tiwei Bie btw at mail.ustc.edu.cn
Sun Oct 26 13:47:29 UTC 2014


Hello, Mateusz!

The check in kern_setgroups's callers is:

	if (gidsetsize > ngroups_max + 1)
		return (EINVAL);

So, gidsetsize could be (ngroups_max + 1). And under this condition, the assertion

	MPASS(ngrp <= ngroups_max);

in kern_setgroups() will fail. One of them should be fixed.

Tiwei Bie



More information about the freebsd-hackers mailing list