kernel-ark/net/netlabel
Paul Moore 4b8feff251 netlabel: fix the horribly broken catmap functions
The NetLabel secattr catmap functions, and the SELinux import/export
glue routines, were broken in many horrible ways and the SELinux glue
code fiddled with the NetLabel catmap structures in ways that we
probably shouldn't allow.  At some point this "worked", but that was
likely due to a bit of dumb luck and sub-par testing (both inflicted
by yours truly).  This patch corrects these problems by basically
gutting the code in favor of something less obtuse and restoring the
NetLabel abstractions in the SELinux catmap glue code.

Everything is working now, and if it decides to break itself in the
future this code will be much easier to debug than the code it
replaces.

One noteworthy side effect of the changes is that it is no longer
necessary to allocate a NetLabel catmap before calling one of the
NetLabel APIs to set a bit in the catmap.  NetLabel will automatically
allocate the catmap nodes when needed, resulting in less allocations
when the lowest bit is greater than 255 and less code in the LSMs.

Cc: stable@vger.kernel.org
Reported-by: Christian Evans <frodox@zoho.com>
Signed-off-by: Paul Moore <pmoore@redhat.com>
Tested-by: Casey Schaufler <casey@schaufler-ca.com>
2014-08-01 11:17:17 -04:00
..
Kconfig
Makefile doc: Update the email address for Paul Moore in various source files 2011-08-01 17:58:33 -07:00
netlabel_addrlist.c netlabel: Fix FSF address in file headers 2013-12-06 12:37:56 -05:00
netlabel_addrlist.h netlabel: Fix FSF address in file headers 2013-12-06 12:37:56 -05:00
netlabel_cipso_v4.c netlabel: Fix FSF address in file headers 2013-12-06 12:37:56 -05:00
netlabel_cipso_v4.h netlabel: Fix FSF address in file headers 2013-12-06 12:37:56 -05:00
netlabel_domainhash.c netlabel: Fix FSF address in file headers 2013-12-06 12:37:56 -05:00
netlabel_domainhash.h netlabel: Fix FSF address in file headers 2013-12-06 12:37:56 -05:00
netlabel_kapi.c netlabel: fix the horribly broken catmap functions 2014-08-01 11:17:17 -04:00
netlabel_mgmt.c netlabel: Fix FSF address in file headers 2013-12-06 12:37:56 -05:00
netlabel_mgmt.h netlabel: Fix FSF address in file headers 2013-12-06 12:37:56 -05:00
netlabel_unlabeled.c netlabel: Fix FSF address in file headers 2013-12-06 12:37:56 -05:00
netlabel_unlabeled.h netlabel: Fix FSF address in file headers 2013-12-06 12:37:56 -05:00
netlabel_user.c netlabel: Fix FSF address in file headers 2013-12-06 12:37:56 -05:00
netlabel_user.h netlabel: Fix FSF address in file headers 2013-12-06 12:37:56 -05:00