An error about IPC permission checking

李尚杰 at
Sun Jul 23 09:31:34 UTC 2006

in the source code kern/sysv_shm.c:

729         error = ipcperm(td, &shmseg->u.shm_perm, mode);
730 #ifdef MAC
731         error = mac_check_sysv_shmget(td->td_ucred, shmseg, uap->shmflg);
732         if (error != 0)
733                 MPRINTF(("mac_check_sysv_shmget returned %d\n", error));
734 #endif
735         if (error)
736                 return (error);

The return value of ipcperm() call is not be checked in time, and
interrupted by mac checking, if Mac is enabled.

|Best regards.
|Shangjie, Li (Ph.D candidate)
|Institute of Software, Chinese Academy of Sciences,
|P.O. Box 8718, Beijing 100080, CHINA
|Phone: (8610)62561197/62635158-1008(O), 82680528(H)
|Email: shangjie02 at

More information about the freebsd-hackers mailing list