
<?xml version="1.0" encoding="utf-8"?>
<?xml-stylesheet type="text/css" href="http://selinuxproject.org/w/skins/common/feed.css?63"?>
<rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/">
	<channel>
		<title>Developer Summit 2007 minutes - Revision history</title>
		<link>http://selinuxproject.org/w/?title=Developer_Summit_2007_minutes&amp;action=history</link>
		<description>Revision history for this page on the wiki</description>
		<language>en</language>
		<generator>MediaWiki 1.10.4</generator>
		<lastBuildDate>Fri, 24 May 2013 20:34:25 GMT</lastBuildDate>
		<item>
			<title>JoshuaBrindle: Developer Summit 2007 minutes initial checkin</title>
			<link>http://selinuxproject.org/w/?title=Developer_Summit_2007_minutes&amp;diff=740&amp;oldid=prev</link>
			<description>&lt;p&gt;Developer Summit 2007 minutes initial checkin&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;Below are the minutes from the developer summit that followed the 2007&lt;br /&gt;
SELinux Symposium.&lt;br /&gt;
&lt;br /&gt;
SELinux developer summit / March 16 2007&lt;br /&gt;
&lt;br /&gt;
= Purpose =&lt;br /&gt;
&lt;br /&gt;
The purpose of the developer summit was to provide a forum for&lt;br /&gt;
focused, detailed technical discussion of ongoing development and&lt;br /&gt;
future plans for SELinux among core SELinux developers and&lt;br /&gt;
contributors.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
= Attendees =&lt;br /&gt;
&lt;br /&gt;
* James Antill, Red Hat&lt;br /&gt;
* Joshua Brindle, Tresys / Gentoo&lt;br /&gt;
* Dave Caplan, Tresys&lt;br /&gt;
* Jim Carter, NSA&lt;br /&gt;
* Darrel Goeddel, TCS&lt;br /&gt;
* Chad Hanson, TCS&lt;br /&gt;
* Trent Jaeger, Penn State Univ&lt;br /&gt;
* KaiGai Kohei, NEC / JSELUG&lt;br /&gt;
* Peter Loscocco, NSA&lt;br /&gt;
* Karl MacMillan, Red Hat&lt;br /&gt;
* Paul Moore, HP&lt;br /&gt;
* James Morris, Red Hat&lt;br /&gt;
* Eric Paris, Red Hat&lt;br /&gt;
* Chris PeBenito, Tresys / Gentoo&lt;br /&gt;
* Chad Sellers, Tresys&lt;br /&gt;
* Stephen Smalley, NSA&lt;br /&gt;
* Brian Sniffen, MITRE&lt;br /&gt;
* Manoj Srivastava, Debian&lt;br /&gt;
* Chris Vance, SPARTA&lt;br /&gt;
* Eamon Walsh, NSA&lt;br /&gt;
* Dan Walsh, Red Hat&lt;br /&gt;
&lt;br /&gt;
= Agenda =&lt;br /&gt;
&lt;br /&gt;
* Opening Session&lt;br /&gt;
* Welcome and introductions.&lt;br /&gt;
* Take any final suggestions for topic or schedule changes.&lt;br /&gt;
* Discuss general topics.&lt;br /&gt;
** Central project site / pan-distribution support.&lt;br /&gt;
** Dealing with different user groups and their needs.&lt;br /&gt;
* Policy Session&lt;br /&gt;
** Policy language/toolchain.&lt;br /&gt;
** Policy tools/infrastructure.&lt;br /&gt;
** Policy configuration.&lt;br /&gt;
* Userland Session&lt;br /&gt;
** Securing the desktop.&lt;br /&gt;
** Improved userland integration.&lt;br /&gt;
** Userspace object managers.&lt;br /&gt;
** Embedded support.&lt;br /&gt;
** MCS&lt;br /&gt;
** User interface / label translation.&lt;br /&gt;
* Networking Session&lt;br /&gt;
** Labeled networking.&lt;br /&gt;
** SECMARK.&lt;br /&gt;
&lt;br /&gt;
= General Topics =&lt;br /&gt;
&lt;br /&gt;
The summit began with an hour-long opening session to introduce the&lt;br /&gt;
participants, take any final suggestions for topic or schedule&lt;br /&gt;
changes, and discuss several general topics.  The main topics that&lt;br /&gt;
were covered during the initial session included a central project&lt;br /&gt;
site for SELinux and dealing with different user groups and their&lt;br /&gt;
needs.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Central Project Site/Pan-Distribution Support ==&lt;br /&gt;
&lt;br /&gt;
The first topic of discussion was on the issue of having a central&lt;br /&gt;
project site for all SELinux-related information and improving&lt;br /&gt;
pan-distribution support.  At present, information and code for&lt;br /&gt;
SELinux is distributed among a disparate collection of web sites and&lt;br /&gt;
repositories (nsa.gov/selinux, selinux.sourceforge.net,&lt;br /&gt;
selinuxnews.org, oss.tresys.com, tresys.com/selinux, kernel.org,&lt;br /&gt;
distribution-specific resources), with no single jumping off point for&lt;br /&gt;
everything related to SELinux.  It was agreed that a centralized wiki&lt;br /&gt;
that could be directly edited by core SELinux developers and&lt;br /&gt;
distribution maintainers would be helpful, but that there was no need&lt;br /&gt;
to centralize all of the SELinux content and repositories.  James&lt;br /&gt;
Morris may set this up eventually, but is also open to someone else&lt;br /&gt;
doing so sooner.  It would require a site that could provide accounts&lt;br /&gt;
for all core participants to enable direct editing.&lt;br /&gt;
&lt;br /&gt;
Related to this topic was the topic of handling the SELinux userland&lt;br /&gt;
patches, which have migrated into the per-distribution packages and&lt;br /&gt;
have no selinux upstream repository presently.  It was agreed that&lt;br /&gt;
extracting the remaining patches from the distribution-specific&lt;br /&gt;
packages, re-basing them against some upstream baseline, and keeping&lt;br /&gt;
them in a form that could be consumed by all the different&lt;br /&gt;
distributions would be very difficult and not maintainable long term.&lt;br /&gt;
Instead, the suggestion was made to simply provide a definitive list&lt;br /&gt;
per distribution of the remaining patches and where they can be found&lt;br /&gt;
via the wiki, and to foster greater communication among the&lt;br /&gt;
distributions about the patches and future changes to them, as well as&lt;br /&gt;
continuing to strive towards upstream acceptance for the remaining&lt;br /&gt;
patches where feasible.  This also requires encouraging package&lt;br /&gt;
maintainers to notify the right people when making changes to the&lt;br /&gt;
selinux userland patches in their packages.  Dan Walsh took the action&lt;br /&gt;
of generating a list of SELinux userland modifications in Fedora.&lt;br /&gt;
&lt;br /&gt;
During the discussion of the userland patches, it was noted that the&lt;br /&gt;
selinux patches have become very intertwined in Fedora with&lt;br /&gt;
MLS/MCS-specific functionality and with audit functionality, so the&lt;br /&gt;
question was raised as to the portability of those patches to other&lt;br /&gt;
distributions.  At present, MLS/MCS functionality is not of interest&lt;br /&gt;
to the Gentoo selinux maintainers but is of interest to the Debian&lt;br /&gt;
selinux maintainers (which are also enabling MCS by default), and&lt;br /&gt;
audit userland support is not yet in Debian and is not up-to-date in&lt;br /&gt;
Gentoo.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Dealing with Different User Groups/Needs ==&lt;br /&gt;
&lt;br /&gt;
The second main topic of discussion was how to deal with different&lt;br /&gt;
user groups (e.g. government vs. corporate, embedded vs. general&lt;br /&gt;
purpose) in a manner that satisfies their needs but doesn't lead to&lt;br /&gt;
trying to impose the same solution on everyone or to fragmentation of&lt;br /&gt;
SELinux into specialized variants.  Dave Caplan noted that most of&lt;br /&gt;
Tresys' work for government customers has not required the use of the&lt;br /&gt;
MLS support at all, as Type Enforcement has met the real need more&lt;br /&gt;
directly and effectively.  Karl MacMillan suggested that the only case&lt;br /&gt;
where the MLS support provided value was when the customer needed&lt;br /&gt;
thousands of categories.  In the common case, the call for MLS was&lt;br /&gt;
simply driven by existing (paper) policy and procedures, customers&lt;br /&gt;
used to legacy systems with certain functionality, and the existing&lt;br /&gt;
(niche) market for &amp;quot;trusted&amp;quot; operating systems.  Nonetheless, it was&lt;br /&gt;
acknowledged that the MLS support would need to be retained long term&lt;br /&gt;
to support such users, and that MLS support in SELinux can serve as an&lt;br /&gt;
enabler for introducing TE to the existing MLS user base.&lt;br /&gt;
&lt;br /&gt;
The need for a general API for certain label manipulation functions to&lt;br /&gt;
support the small set of policy-aware applications was then discussed,&lt;br /&gt;
such as an interface to compute a label that dominates a set of input&lt;br /&gt;
labels or an interface to order a set of labels.  Such an API could be&lt;br /&gt;
provided by libsepol based on a policy file or by libselinux using new&lt;br /&gt;
selinuxfs nodes to query the active kernel policy, although in some&lt;br /&gt;
cases the detailed label logic is hidden in the context translation&lt;br /&gt;
library (as when using the MITRE label encodings library).  It was&lt;br /&gt;
agreed that SELinux should provide general APIs for such functions to&lt;br /&gt;
applications as needed, seeking to encapsulate as much as possible&lt;br /&gt;
(e.g.  acting on entire contexts rather than just the MLS field, even&lt;br /&gt;
though the rest of the context may not presently have any real&lt;br /&gt;
ordering).&lt;br /&gt;
&lt;br /&gt;
If the MLS support is to be sustained long term, it needs to be&lt;br /&gt;
attractive to ordinary users.  Labeled printing was cited as an&lt;br /&gt;
example of functionality that could be useful to non-government users,&lt;br /&gt;
although the current labeled printing support doesn't (yet) support&lt;br /&gt;
preserving the document label.  Desktop integration was cited as&lt;br /&gt;
another example where MLS and/or MCS style functionality could&lt;br /&gt;
potentially be more useful due to more human-meaningful labels.&lt;br /&gt;
However, the inherent limitation of MLS/MCS to confidentiality (not&lt;br /&gt;
integrity) and its inflexible model was noted by Karl MacMillan as a&lt;br /&gt;
fundamental impediment to widespread use, and TE could provide the&lt;br /&gt;
same benefits for labeled printing and desktop operations if types are&lt;br /&gt;
translated to more meaningful labels (using the existing context&lt;br /&gt;
translation facilities already employed for MLS) and made more&lt;br /&gt;
directly accessible to end users. In the end, it wasn't clear that MLS&lt;br /&gt;
support could be made attractive outside of specialized users due to&lt;br /&gt;
its inherent limitations.&lt;br /&gt;
&lt;br /&gt;
One of the aspects of SELinux in general that has been attractive to&lt;br /&gt;
users is labeling data based on what it is, not who can access it&lt;br /&gt;
(unlike ACLs).  Users are also interested in support for roles for&lt;br /&gt;
administrative decomposition, although in practice RBAC is often&lt;br /&gt;
applied at the application level rather than the OS level.&lt;br /&gt;
&lt;br /&gt;
There was some discussion of what MLS offers that TE doesn't do well&lt;br /&gt;
today.  In addition to supporting large numbers of categories (and&lt;br /&gt;
their combinations), the implicit support for hierarchy and ranges in&lt;br /&gt;
MLS and its more direct link back to the user was cited as possible&lt;br /&gt;
advantages.  It was noted that it should be possible to build higher&lt;br /&gt;
level tools and languages for expressing hierarchical relationships&lt;br /&gt;
among types more easily, mapping them down to the low level access&lt;br /&gt;
matrix.  However, particularly with increasing number of roles, the&lt;br /&gt;
number of types and their relationships tend to explode, suggesting&lt;br /&gt;
that we may ultimately need/want more compact ways of expressing&lt;br /&gt;
related types even in the low level representation.  One simple&lt;br /&gt;
example would be easily expressing that a new type should have all of&lt;br /&gt;
the permissions of an existing type plus a specific list of additional&lt;br /&gt;
permissions.  Prototyping such support in a higher level&lt;br /&gt;
representation first and then later assessing whether it should be&lt;br /&gt;
migrated into the userspace policy module format or even down into the&lt;br /&gt;
kernel representation was viewed as the best approach for exploring&lt;br /&gt;
these ideas.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
= Policy Session =&lt;br /&gt;
&lt;br /&gt;
The remainder of the morning was spent in the policy session.  This&lt;br /&gt;
session included discussions on the policy language and toolchain, the&lt;br /&gt;
policy tools and infrastructure, and the policy configuration.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Policy Language/Toolchain ==&lt;br /&gt;
&lt;br /&gt;
This topic began with discussion of the proposed new libsepol policy&lt;br /&gt;
representation aka the policy IR that had been posted to the list as&lt;br /&gt;
an RFC.  There was agreement that such an IR would facilitate a number&lt;br /&gt;
of improvements to the language and toolchain and was desirable.  Karl&lt;br /&gt;
MacMillan requested help in completing the implementation in a timely&lt;br /&gt;
manner, and there will be a followup meeting among Karl, Joshua, and&lt;br /&gt;
Stephen to discuss the current code and approach.  The basic steps are&lt;br /&gt;
to finish the parser, remove the module format support from the&lt;br /&gt;
policydb, generate the policydb from the tree representation, provide&lt;br /&gt;
convertors to and from the tree representation for compatibility, and&lt;br /&gt;
introduce the new binary on-disk format.  The serialization code&lt;br /&gt;
developed for policy management server should largely be unaffected,&lt;br /&gt;
although it may wish to take advantage of the string compression&lt;br /&gt;
support as an optimization.  A branch will be created for joint&lt;br /&gt;
development on sourceforge.&lt;br /&gt;
&lt;br /&gt;
Language support for reference policy interface is still planned, but&lt;br /&gt;
is blocked on the completion of the new policy representation.&lt;br /&gt;
Automatic generation of require statements and deprecation of require&lt;br /&gt;
statements altogether is also still planned.  There was a concern&lt;br /&gt;
about being able to unambiguously distinguish types from attributes,&lt;br /&gt;
although that should be discernible at expand time.&lt;br /&gt;
&lt;br /&gt;
A concern about being able to ship a single policy package (.pp) file&lt;br /&gt;
that can support multiple base policies was raised.  In the past, the&lt;br /&gt;
notion of fat policy packages was considered but rejected.  The&lt;br /&gt;
problem will be partly addressed through link-time expansion of&lt;br /&gt;
interfaces, but there will still be dependencies on particulars of the&lt;br /&gt;
base policies (e.g. MLS vs. non-MLS, particular types defined by a&lt;br /&gt;
given policy, etc).&lt;br /&gt;
&lt;br /&gt;
On the package management front, the plan in Fedora is still to&lt;br /&gt;
install policy packages from %post and restorecon afterward.  The view&lt;br /&gt;
is that restorecon is needed after install regardless due to files&lt;br /&gt;
created from %post scriptlets.  There are still issues to be resolved&lt;br /&gt;
with the installer, such as generating a full file contexts&lt;br /&gt;
configuration during build for use by the installer.  We also need to&lt;br /&gt;
resolve what other files need to be installed by software packages&lt;br /&gt;
beyond the .pp file, such as the interface files (possibly eliminated&lt;br /&gt;
by introduction of link-time expansion of interfaces) and&lt;br /&gt;
help/documentation files.  There was some debate as to whether such&lt;br /&gt;
files belongs in the .pp file itself or as separate auxiliary files.&lt;br /&gt;
It was also noted that package managers still have no way to&lt;br /&gt;
transparently support policy upgrades where the decomposition of&lt;br /&gt;
policy changes, such as moving a policy module in or out of the base.&lt;br /&gt;
Although semodule does support such transactions (e.g. semodule -r&lt;br /&gt;
x.pp -i base.pp), there is no way for the package manager to&lt;br /&gt;
automatically determine the right incantation presently.  Finally,&lt;br /&gt;
removing of types still presents a problem for per-package policy&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Policy Tools/Infrastructure ==&lt;br /&gt;
&lt;br /&gt;
This topic began with discussion of policy generation and development&lt;br /&gt;
tools, with a call to eliminate and avoid duplication among the tools&lt;br /&gt;
efforts, ensure that we are working toward a common goal, and making&lt;br /&gt;
sure that we are reaching the user.  There was a question as to&lt;br /&gt;
whether the use of python by Madison/SEPolgen and other policy tools&lt;br /&gt;
(like Polgen or semanage) is an impediment to integration with other&lt;br /&gt;
tools efforts and whether the use of a scripting language for such&lt;br /&gt;
tools is a security concern for SELinux.  &lt;br /&gt;
&lt;br /&gt;
SLIDE is presently limited to using Madison/SEPolgen via helper&lt;br /&gt;
programs as jython lacks adequate support.  SETools has no problems&lt;br /&gt;
with the use of python.  The larger concern seems to be with the&lt;br /&gt;
stability of the python language.  However, there are no plans to&lt;br /&gt;
move away from python.&lt;br /&gt;
&lt;br /&gt;
The security concerns can be addressed by providing a binary wrapper&lt;br /&gt;
for the python scripts that performs adequate sanitization and ensures&lt;br /&gt;
that the proper script is invoked.  Such a wrapper has already been&lt;br /&gt;
created for the CLIP work from the upstream python, and should be&lt;br /&gt;
integrated into policycoreutils and used as the gate to our python&lt;br /&gt;
scripts.&lt;br /&gt;
&lt;br /&gt;
Tools for generating new types from existing ones with small deltas&lt;br /&gt;
are needed, e.g. creating a new cgi domain that is identical to the&lt;br /&gt;
base one except for adding or removing a small set of permissions, and&lt;br /&gt;
then applying that domain to a particular script.  Similarly for&lt;br /&gt;
firefox, in order to easily construct separate firefox domains for&lt;br /&gt;
e.g. internal vs. external access.&lt;br /&gt;
&lt;br /&gt;
Discussion then moved into policy management tools.  Dan Walsh asked&lt;br /&gt;
whether we should be moving all object context definitions (e.g. port&lt;br /&gt;
contexts) out of the base policy and into semanage as Brickwall has&lt;br /&gt;
done to enable full customizability, rewriting policy to use&lt;br /&gt;
attributes more.  This will require introducing support into&lt;br /&gt;
libsemanage for system definitions of these object contexts separate&lt;br /&gt;
from local definitions or modules (e.g. ports vs. ports.local), as has&lt;br /&gt;
been done for some objects.  There is a concern that rewriting the&lt;br /&gt;
policy in terms of attributes to such an extent could harm&lt;br /&gt;
understandability.&lt;br /&gt;
&lt;br /&gt;
Management of the home directory labeling was noted a crucial problem&lt;br /&gt;
for enabling strict policy and user roles.  Home directories are the&lt;br /&gt;
most common place for labeling problems to manifest, and relabeling&lt;br /&gt;
entire home directories is too expensive.  Joshua noted that we need a&lt;br /&gt;
general facility for per-user types that covers all objects, not just&lt;br /&gt;
user home directories as in genhomedircon.  This is to be taken up on&lt;br /&gt;
list.&lt;br /&gt;
&lt;br /&gt;
Dan noted that allowing setting of specific booleans for a less&lt;br /&gt;
privileged user role is currently impossible because libsemanage&lt;br /&gt;
regenerates the entire policy and resets all booleans, even for&lt;br /&gt;
non-persistent boolean changes.  Some investigation into what is&lt;br /&gt;
happening presently and whether libsemanage needs to be refactored is&lt;br /&gt;
required.&lt;br /&gt;
&lt;br /&gt;
Dan also noted that non-modular configuration files such as the&lt;br /&gt;
default_contexts file and default_type files pose a problem for fully&lt;br /&gt;
modular policy and adding roles.  We need to support specification and&lt;br /&gt;
manipulation of such data via semanage or in the .pp files or in the&lt;br /&gt;
policy module sources.&lt;br /&gt;
&lt;br /&gt;
The policy management server (PMS) RFC release was discussed.  One of&lt;br /&gt;
the immediate potential applications of the server, delegation of&lt;br /&gt;
access to booleans, isn't presently supportable since the current&lt;br /&gt;
boolean controls are based on file-level labeling and access control.&lt;br /&gt;
Karl recommended just emulating the file-based checks in the server.&lt;br /&gt;
The PMS patches will be coordinated with the new policy representation&lt;br /&gt;
patches.&lt;br /&gt;
&lt;br /&gt;
[editorial note: Moved some discussion notes down to the Policy&lt;br /&gt;
Configuration section as they fit under it more cleanly.]&lt;br /&gt;
&lt;br /&gt;
It was agreed that front-end tools for policy could be included in the&lt;br /&gt;
&amp;quot;upstream&amp;quot; selinux.  system-config-selinux needs to be cleaned up and&lt;br /&gt;
converted over to executing helper programs rather than directly using&lt;br /&gt;
python bindings to ensure that the security relevant functionality&lt;br /&gt;
runs in its own domain.  Management of local policy modules should be&lt;br /&gt;
integrated into such tools to help users with preserving the results&lt;br /&gt;
of prior modules.  Integration with Madison/SEPolgen is planned.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Policy Configuration ==&lt;br /&gt;
&lt;br /&gt;
This topic began with discussion of the hierarchical apache policy RFC&lt;br /&gt;
was discussed.  The hierarchical type system provides a way for a&lt;br /&gt;
higher level administrator to define a broad container type with a&lt;br /&gt;
maximal set of permissions to the rest of the system that he is&lt;br /&gt;
willing to delegate to a subordinate administrator, and then allow the&lt;br /&gt;
subordinate administrator to subdivide that container type into any&lt;br /&gt;
number of specific types, and the hierarchical apache policy is a&lt;br /&gt;
rewrite of the apache policy with no functional changes that provides&lt;br /&gt;
such a decomposition.  Applications of the approach could include&lt;br /&gt;
delegation to application administrators, representation of a&lt;br /&gt;
meta-policy for a virtualized platform with multiple policies being&lt;br /&gt;
enforced by the hypervisor and individual guest OSes, enabling users&lt;br /&gt;
to craft more limited policies for user cgis bounded by the general&lt;br /&gt;
cgi policy, etc.&lt;br /&gt;
&lt;br /&gt;
Several concerns about the practical applicability of the hierarchical&lt;br /&gt;
type scheme were raised, such as whether the abstract container types&lt;br /&gt;
would effectively grow to effectively being unconfined, whether policy&lt;br /&gt;
writers can effectively predefine the right set of container types for&lt;br /&gt;
end administrators, and whether end administrators can make effective&lt;br /&gt;
use of such a mechanism.  Karl argued that real administrators would&lt;br /&gt;
either require subordinates to pass policy changes through them for&lt;br /&gt;
review and committing or only use very coarse-grained delegation&lt;br /&gt;
(e.g. at the machine/VM level). He also expressed concern that the&lt;br /&gt;
meta-policy will quickly grow to being as complex as normal policy if&lt;br /&gt;
we go beyond very coarse-grained container types, reducing management&lt;br /&gt;
of meta-policy to the same level as regular policy.&lt;br /&gt;
&lt;br /&gt;
The question was raised as to whether there would be any objection to&lt;br /&gt;
merging the hierarchical apache policy into reference policy, as it&lt;br /&gt;
should be functionally equivalent to the original apache policy, in&lt;br /&gt;
order to retain a worked example of how to use the type hierarchy for&lt;br /&gt;
users.  The only concern was compatibility due to the current practice&lt;br /&gt;
of tying the hierarchy to the type names.  Although type aliases are&lt;br /&gt;
defined in the hierarchical apache policy to preserve compatibility,&lt;br /&gt;
the kernel will always use the primary type names when reporting the&lt;br /&gt;
contexts to users via kernel interfaces and audit logs, so the new&lt;br /&gt;
hierarchical type names would be user-visible.  As specific type names&lt;br /&gt;
have become well-known to users, particularly for dealing with apache&lt;br /&gt;
policy and other targeted domains, we no longer have the freedom to&lt;br /&gt;
arbitrarily change them even with type aliases.  However, if the&lt;br /&gt;
hierarchy can be defined explicitly separate from the naming, there is&lt;br /&gt;
no fundamental objection to merging the hierarchical apache policy.  &lt;br /&gt;
Language support for such hierarchy definition needs to be done.&lt;br /&gt;
&lt;br /&gt;
Discussion then moved on to improving the security of the policy.  Dan&lt;br /&gt;
argued that we need to move away from high level interfaces in&lt;br /&gt;
reference policy because they foster poor policy writing - users will&lt;br /&gt;
always pick the most abstract interface that meets their needs, and&lt;br /&gt;
thus the most permissive.  When users had to always write policy&lt;br /&gt;
manually, such high level interfaces were required, but with tools&lt;br /&gt;
like SEPolgen that can generate interface calls based on need and&lt;br /&gt;
loadable module support, we can migrate back to using the lowest level&lt;br /&gt;
interfaces and building up from the bottom.  Dan was also concerned&lt;br /&gt;
that the hierarchical type system would lead to misuse of the abstract&lt;br /&gt;
container types by users in the same manner.  We need to ensure that&lt;br /&gt;
reference policy is providing the right set of primitive interfaces&lt;br /&gt;
and that tools favor least privilege.  Dan suggested that we need some&lt;br /&gt;
lower level primitives than apache_template and user_template.  Dan&lt;br /&gt;
also argued that we can begin tightening reference policy&lt;br /&gt;
significantly since users now have the tools they need to generate&lt;br /&gt;
their own local policy easily, and get the system into a&lt;br /&gt;
secure-by-default state instead of shipping a relatively open policy&lt;br /&gt;
and requiring users to manually tighten it via booleans or other&lt;br /&gt;
mechanisms.&lt;br /&gt;
&lt;br /&gt;
Plans for merging of strict and targeted policy were discussed, using&lt;br /&gt;
presence of the unconfined module as the selector.  unconfined_u, _r,&lt;br /&gt;
_t would be added by the module. A boolean/tunable may be needed for&lt;br /&gt;
other unconfined domains under targeted.  Handling of user home&lt;br /&gt;
directory labeling is still being worked out; the current idea is to&lt;br /&gt;
introduce a new user role and types for confined users under targeted&lt;br /&gt;
so that no change is required for existing unconfined users.&lt;br /&gt;
&lt;br /&gt;
The last topic under the policy session was on how to improve policy&lt;br /&gt;
QA to minimize regressions.  A large part of the problem is simply&lt;br /&gt;
getting packagers to test with SELinux prior to releasing new or&lt;br /&gt;
updated packages.  It was noted that Red Hat has a QA process for RHEL&lt;br /&gt;
that checks for the presence of AVC messages, mislabeled files,&lt;br /&gt;
devices left in device_t, processes left in initrc_t, etc.  It would&lt;br /&gt;
be beneficial to have something similar for Fedora and other&lt;br /&gt;
distributions.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
= Userland Session =&lt;br /&gt;
&lt;br /&gt;
The afternoon began with a session on userland issues.  This session&lt;br /&gt;
included discussions on securing the desktop, improved userland&lt;br /&gt;
integration, userspace object managers, embedded support,&lt;br /&gt;
Multi-Category Security (MCS), user interface, and label translation&lt;br /&gt;
issues.&lt;br /&gt;
&lt;br /&gt;
On the desktop front, XACE/XSELinux work is progressing well and on&lt;br /&gt;
target for upstreaming.  There is some uncertainty as to the optimal&lt;br /&gt;
window manager / desktop environment for continuing the work.&lt;br /&gt;
metacity / GNOME would be advantageous from a user base / technology&lt;br /&gt;
transfer point of view, but there are concerns with the size,&lt;br /&gt;
complexity, level of interactions among components, and vibrancy of&lt;br /&gt;
the development community (seemingly little activity on public lists).&lt;br /&gt;
Dan Walsh recommended talking to the head of the desktop team at Red&lt;br /&gt;
Hat, and will provide a POC to Eamon and Jim.  With continued&lt;br /&gt;
migration over to D-BUS, things should be well positioned for SELinux&lt;br /&gt;
to control.&lt;br /&gt;
&lt;br /&gt;
Another concern for the desktop work is the lack of robust error&lt;br /&gt;
handling in X clients, primarily due to Xlib.  As a result, permission&lt;br /&gt;
denials have destructive effects on applications.&lt;br /&gt;
&lt;br /&gt;
Handling cut-and-paste is still planned, but there are some problems&lt;br /&gt;
with the existing mechanism, and a number of applications implement&lt;br /&gt;
their own custom mechanisms for cut-and-paste that might also need to&lt;br /&gt;
be addressed.  Some in the X community have proposed starting over&lt;br /&gt;
fresh with a new approach to cut-and-paste functionality.&lt;br /&gt;
&lt;br /&gt;
Related to the desktop, Karl mentioned the ConsoleKit and PolicyKit&lt;br /&gt;
work on freedesktop.  They are creating their own infrastructure to&lt;br /&gt;
support simple policies over actions like the ability to mount usb&lt;br /&gt;
drives.  Karl has tried to encourage them to leverage SELinux, but the&lt;br /&gt;
problem is that they need to support some form of access control on&lt;br /&gt;
all distributions, so they can't bind to SELinux alone.  We need a&lt;br /&gt;
LSM-like framework for ConsoleKit and/or PolicyKit to enable them to&lt;br /&gt;
achieve their goals (e.g. via an ACL module) without precluding proper&lt;br /&gt;
integration with SELinux (e.g. via a Flask/SELinux module).  Eamon and&lt;br /&gt;
Jim will try to talk with them further, although they can't scale to&lt;br /&gt;
handle all such applications.&lt;br /&gt;
&lt;br /&gt;
It was also discussed whether something like the userspace security&lt;br /&gt;
server could enable broader use of SELinux access controls in&lt;br /&gt;
userspace without requiring full use of SELinux underneath.  However,&lt;br /&gt;
one would still need some underlying support for e.g. getpeercon&lt;br /&gt;
functionality, and one would still need SELinux policy and tools for&lt;br /&gt;
the application policies, so it isn't clear that such an approach is&lt;br /&gt;
useful.&lt;br /&gt;
&lt;br /&gt;
Discussion then turned to userspace object managers, in particular the&lt;br /&gt;
SEPostgreSQL work by KaiGai Kohei.  KaiGai discussed issues he had&lt;br /&gt;
encountered in his work, such as the need to create a custom userspace&lt;br /&gt;
AVC for performance reasons (avoid indirection through AVC SID table&lt;br /&gt;
when the object manager needs to directly deal with contexts e.g. for&lt;br /&gt;
persistent labeling), to enable sharing of the AVC (via shared memory)&lt;br /&gt;
and the netlink thread among all PostgreSQL instances.  He also&lt;br /&gt;
discussed the need to deal with contexts invalidated by a policy&lt;br /&gt;
reload, as the userspace AVC presently has no way to detect such&lt;br /&gt;
contexts easily (security_compute_av just returns EINVAL) or to remap&lt;br /&gt;
them to an unlabeled context (as the kernel does).  It was agreed that&lt;br /&gt;
the userspace AVC in libselinux should be extended to better support&lt;br /&gt;
such functionality, and discussion will follow up on the list.&lt;br /&gt;
&lt;br /&gt;
KaiGai still plans to work on converting to dynamic lookup of classes&lt;br /&gt;
and permissions for SEPostgreSQL, using the libselinux interfaces that&lt;br /&gt;
presently just use the generated tables internally.  The file format&lt;br /&gt;
issues were also discussed, but James Antill of Red Hat noted that&lt;br /&gt;
PostgreSQL file format changes are not uncommon and are not a&lt;br /&gt;
fundamental obstacle.&lt;br /&gt;
&lt;br /&gt;
Next KaiGai presented work done by JSELUG on SEBusybox and SEDiet.&lt;br /&gt;
The SEBusybox work is proceeding well.  There was a proposed solution&lt;br /&gt;
to busybox domain transitions using dynamic context transitions, but&lt;br /&gt;
this approach has been discarded in favor of the wrapper binary or&lt;br /&gt;
decomposition approach due to its lack of real separation.&lt;br /&gt;
&lt;br /&gt;
SEDiet is a new activity by JSELUG to work on reducing the resource&lt;br /&gt;
requirements of SELinux to facilitate embedded use.  libsepol and&lt;br /&gt;
policy are of particular concern.  They have some patches to reduce&lt;br /&gt;
the need for libsepol, which they should submit for discussion on&lt;br /&gt;
list.  One point of uncertainty was what was meant by removing&lt;br /&gt;
libsepol, as libsepol (or some subset of it) is required for loading&lt;br /&gt;
policy, and if using shared libraries, it shouldn't require more than&lt;br /&gt;
one instance of the library code.  Karl also noted that libsepol is&lt;br /&gt;
expected to get smaller through the new policy representation.  It is&lt;br /&gt;
also likely that libsepol can be reduced through eliminating legacy&lt;br /&gt;
functionality (e.g. see prior RFC on Dropping setlocaldefs support&lt;br /&gt;
from list), although that raises a question for the embedded SELinux&lt;br /&gt;
community as to whether they still need such support for handling&lt;br /&gt;
local booleans without needing libsemanage.  Discussion should follow&lt;br /&gt;
up on list.&lt;br /&gt;
&lt;br /&gt;
The SEDiet effort also proposed a couple ways of reducing policy size,&lt;br /&gt;
both of which leveraged greater use of type attributes.  The first&lt;br /&gt;
approach (aggregation of macros) replaced multiple macro calls with a&lt;br /&gt;
series of typeattribute declarations followed by a single macro call&lt;br /&gt;
on the attribute.  The preferred approach there is to instead perform&lt;br /&gt;
the typeattribute statement in the macro/interface, and continue to&lt;br /&gt;
call the macro/interface on each type in the policy.  Such an approach&lt;br /&gt;
has already been leveraged in refpolicy for unconfined and could be&lt;br /&gt;
applied to other frequently used interfaces, such as the one for using&lt;br /&gt;
shared libraries.&lt;br /&gt;
&lt;br /&gt;
The second approach (replacing allow rules with typeattributes)&lt;br /&gt;
proposed converting series of allow rules with the same accesses to a&lt;br /&gt;
series of typeattribute statements with a single allow rule, possibly&lt;br /&gt;
using a tool that would analyze and rewrite binary policy&lt;br /&gt;
automatically.  The consensus was that we should instead focus on&lt;br /&gt;
applying such improvements at the source level in reference policy,&lt;br /&gt;
except possibly for certain specialized optimizations that cannot be&lt;br /&gt;
done effectively in the sources, such as optimization of allow rules&lt;br /&gt;
with type set exclusions (e.g. { a -b -c }) and rearranging the types&lt;br /&gt;
to put the most frequently used ones near the beginning in an effort&lt;br /&gt;
to shrink the ebitmaps in the binary representation.&lt;br /&gt;
&lt;br /&gt;
There are also a number of improvements that can still be applied to&lt;br /&gt;
libsemanage for space optimization, such as removing files after&lt;br /&gt;
installation and incorporating bzip2 support.  These have been&lt;br /&gt;
discussed on list but need to be brought to completion.&lt;br /&gt;
&lt;br /&gt;
Discussion then moved onto Multi-Category Security (MCS).  Points of&lt;br /&gt;
agreement here include the desire to improve general SELinux userland&lt;br /&gt;
integration, make TE more accessible and usable to end users, and keep&lt;br /&gt;
the MLS engine viable for its user community.  Whether or not MCS will&lt;br /&gt;
or will not ultimately prove useful remains uncertain at this point,&lt;br /&gt;
but we are unlikely to know for sure until we have greater userland&lt;br /&gt;
integration.  Hence, it was suggested that we leave MCS intact,&lt;br /&gt;
continue to work toward better SELinux userland integration (in&lt;br /&gt;
general, not limited to MCS), and let the users decide.  A concern was&lt;br /&gt;
raised however about a lack of a common user experience for SELinux&lt;br /&gt;
since not all distributions enable the MLS engine or use MCS.  On the&lt;br /&gt;
one hand, this helps ensure that both MLS and non-MLS code paths are&lt;br /&gt;
being tested by users, but on the other hand, it yields a different&lt;br /&gt;
user interface, could create confusion, and could yield applications&lt;br /&gt;
that work in one environment but not another.  One option here would&lt;br /&gt;
be to take the next logical step for the MLS engine, having already&lt;br /&gt;
moved from a compile-time option to a runtime option, and make it&lt;br /&gt;
always enabled in SELinux&lt;br /&gt;
&lt;br /&gt;
It was also suggested that MCS integration would serve as a proof of&lt;br /&gt;
concept for integration for MLS later (although there are issues with&lt;br /&gt;
such an approach, particularly in the discretionary MCS model, as what&lt;br /&gt;
works for MCS may very well break under MLS) and as a stepping stone&lt;br /&gt;
to greater functionality.  Some believe that MLS/MCS labels are&lt;br /&gt;
inherently more understandable to end users and transferable across&lt;br /&gt;
systems than TE types, while others believe that TE types can and&lt;br /&gt;
should be made understandable and transferable.&lt;br /&gt;
&lt;br /&gt;
Related to this discussion, it was noted that the user interface&lt;br /&gt;
necessarily exposes policy-specific knowledge, such as what types mean&lt;br /&gt;
(e.g. httpd_sys_content_t).  We need tools and conventions for how a&lt;br /&gt;
tool or user can find out what types are accessible, what they mean,&lt;br /&gt;
etc.  Discussion also touched on the abstract label translation work&lt;br /&gt;
prototyped at Tresys for crossing administrative domains, and on the&lt;br /&gt;
need for a policy-driven translation service for SELinux, used by&lt;br /&gt;
everything that imports or exports labeled data.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
= Networking Session =&lt;br /&gt;
&lt;br /&gt;
The last session focused on networking issues.  This session&lt;br /&gt;
included discussions on improving the labeled networking support&lt;br /&gt;
and enabling use of SECMARK.&lt;br /&gt;
&lt;br /&gt;
The first topic was labeled networking improvements.  These fell into&lt;br /&gt;
two categories: labeling of network buffers over loopback, and&lt;br /&gt;
handling packet forwarding.  On loopback, the basic need is to&lt;br /&gt;
propagate the security label with the sk_buff.  In CIPSO, this is&lt;br /&gt;
effectively faked by putting the label in the payload/data, but the&lt;br /&gt;
same approach doesn't work for labeled IPSEC.  Attempts were made to&lt;br /&gt;
enable labeled IPSEC over loopback, but various problems arose,&lt;br /&gt;
including with the IKE daemon.  Paul Moore suggested adding code in&lt;br /&gt;
the loopback driver to add another pseudo header on top of the&lt;br /&gt;
ethernet header to convey the information.  Pete suggested creating a&lt;br /&gt;
fake IP security option for loopback.  James Morris suggested&lt;br /&gt;
hijacking the MAC address.  Paul Moore will follow up.&lt;br /&gt;
&lt;br /&gt;
For forwarding, Paul Moore suggested introducing a mechanism that&lt;br /&gt;
would be exclusive of SECMARK, using preroute, postroute, and&lt;br /&gt;
forwarding hooks.  The forwarding hook can look at the label on the&lt;br /&gt;
packet and should know where it is going, so it should be able to&lt;br /&gt;
apply a check at that time.&lt;br /&gt;
&lt;br /&gt;
On enabling use of SECMARK, a number of concerns were raised with the&lt;br /&gt;
usability of SECMARK today, including impact on users who disable&lt;br /&gt;
iptables, bad interactions with management tools and user&lt;br /&gt;
customizations, understandability, synchronization of updates with&lt;br /&gt;
policy, and possible performance implications.  Red Hat would like a&lt;br /&gt;
boolean for every domain to switch between allowing all network&lt;br /&gt;
traffic and only allowing secmark-labeled traffic, although there was&lt;br /&gt;
some question as to whether that was truly desirable vs. the existing&lt;br /&gt;
compat_net global.  netfilter_contexts is presently built from&lt;br /&gt;
refpolicy and shipped in policy packages (.pp files), including&lt;br /&gt;
libsemanage support, yet completely unused today.  The short term plan&lt;br /&gt;
is to stop generating and shipping netfilter_contexts (possibly&lt;br /&gt;
deprecating it and removing it altogether if it cannot be integrated)&lt;br /&gt;
and simply allow users who wish to use secmark to manually enable it&lt;br /&gt;
and manage it using the usual iptables tools.  James Morris will follow up&lt;br /&gt;
on list with some ideas for enabling more effective use of secmark.&lt;/div&gt;</description>
			<pubDate>Tue, 20 Oct 2009 15:15:42 GMT</pubDate>			<dc:creator>JoshuaBrindle</dc:creator>			<comments>http://selinuxproject.org/page/Talk:Developer_Summit_2007_minutes</comments>		</item>
	</channel>
</rss>