From: <ssm...@us...> - 2008-05-05 14:44:13
|
Revision: 2876 http://selinux.svn.sourceforge.net/selinux/?rev=2876&view=rev Author: ssmalley Date: 2008-05-05 07:44:10 -0700 (Mon, 05 May 2008) Log Message: ----------- Author: Stephen Smalley Email: sd...@ty... Subject: segfault using dismod when linking modules Date: Fri, 02 May 2008 09:45:12 -0400 On Thu, 2008-05-01 at 16:04 -0400, Eric Paris wrote: > Maybe someone else will know this pretty quickly. I'm attaching a > tiny little base.conf and base.mod and a tiny test.te and test.mod > that I built. When I try to link them together I get a segfault > somewhere through user_fix_callback() -> mls_level_convert() > > Anyway, maybe I'll get to looking at it tomorrow, but if anyone else > who actually understands all of this has a chance to look let me > know.... Looks like mls_level_convert() falls over dead if passed an "empty" user declaration, which appears to happen when you specify a require on it but not a declaration for it in your module, which is what you do in test.te. Patch below will at least fix the symptom - not sure whether it will yield the expected end result though. Modified Paths: -------------- trunk/libsepol/src/link.c Modified: trunk/libsepol/src/link.c =================================================================== --- trunk/libsepol/src/link.c 2008-05-05 14:42:01 UTC (rev 2875) +++ trunk/libsepol/src/link.c 2008-05-05 14:44:10 UTC (rev 2876) @@ -864,6 +864,10 @@ if (!mod->policy->mls) return 0; + /* Required not declared. */ + if (!src->sens) + return 0; + assert(mod->map[SYM_LEVELS][src->sens - 1]); dst->sens = mod->map[SYM_LEVELS][src->sens - 1]; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |