<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
		>
<channel>
	<title>Comments on: Subject &amp; Object Tranquility (part 2)</title>
	<atom:link href="http://beyondabstraction.net/2005/11/07/subject-object-tranquility-part-2/feed/" rel="self" type="application/rss+xml" />
	<link>http://beyondabstraction.net/2005/11/07/subject-object-tranquility-part-2/</link>
	<description>Meanderings and Such...</description>
	<lastBuildDate>Fri, 27 Aug 2010 09:14:09 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3</generator>
	<item>
		<title>By: spencer</title>
		<link>http://beyondabstraction.net/2005/11/07/subject-object-tranquility-part-2/comment-page-1/#comment-156</link>
		<dc:creator>spencer</dc:creator>
		<pubDate>Fri, 14 Jul 2006 12:45:13 +0000</pubDate>
		<guid isPermaLink="false">#comment-156</guid>
		<description>&lt;blockquote&gt;
This is incorrect. The process address space is created by fork(), the execve overwrites the application data only, not the environment (glibc atsecure removes some environment variables that affect the linker) but there is a significant chunk of data that is non-tranquil. Imagine doing a domain transition on a perl script, how many environment variables can affect the execution of the perl script that wonâ€™t be cleansed across the execve().
&lt;/blockquote&gt;
True.  I probably should have corrected this.  It should read: Yes evil but necessary in the Linux environment since the environment (et al) is relabeled during the transition.  One way around this would be to do a full copy of the memory space on exec but I doubt the kernel maintainers would be interested.  I&#039;ll leave the old content in take but add a note to this effect.


&lt;blockquote&gt;The primary revocation issue is memory, shared memory and mmap()â€™d files are not able to be revoked when a new policy is loaded. &lt;/blockquote&gt;

Yup shoulda went with this example anyways.... thats the more interesting case.  

Notice both the subject tranquility and mmap/shm issues that crop are due to the memory susbsystem.  Someone correct me if I&#039;m wrong but SELinux could have maintained subject tranquility if the entire task struct was copied  instead of overwritten on execve.  All the data could have been copied to the new task struct, but the new task struct would contain the new sid.  Given the lightweight nature of Linux process fork/execs I don&#039;t it is worth the tradeoff.  

Still, it is a relabel by definition thus violating the laws of tranquility but at the same time, I would argue, presents no revocation issues and doesn&#039;t introduce the complexity of time into analysis.  We trust the kernel to not begin execution of the program until the security context is correct.  Without being a kernel expert, I would assume other processes on the system can&#039;t interact with this process until the kernel actually runs it, and intuition tells us that a non-running application can&#039;t really initiate any type of communication.  Thus, during analysis we assume that the process and all it&#039;s &quot;metadata&quot; has that label for it&#039;s entire lifetime.  Still a relabel is a relabel, one second the policy means one thing about a segment of memory, and the next it says another.

As for the mmap/shm issue I&#039;ll actually update the entry to avoid scaring people about file relabels...</description>
		<content:encoded><![CDATA[<blockquote><p>
This is incorrect. The process address space is created by fork(), the execve overwrites the application data only, not the environment (glibc atsecure removes some environment variables that affect the linker) but there is a significant chunk of data that is non-tranquil. Imagine doing a domain transition on a perl script, how many environment variables can affect the execution of the perl script that wonâ€™t be cleansed across the execve().
</p></blockquote>
<p>True.  I probably should have corrected this.  It should read: Yes evil but necessary in the Linux environment since the environment (et al) is relabeled during the transition.  One way around this would be to do a full copy of the memory space on exec but I doubt the kernel maintainers would be interested.  I&#8217;ll leave the old content in take but add a note to this effect.</p>
<blockquote><p>The primary revocation issue is memory, shared memory and mmap()â€™d files are not able to be revoked when a new policy is loaded. </p></blockquote>
<p>Yup shoulda went with this example anyways&#8230;. thats the more interesting case.  </p>
<p>Notice both the subject tranquility and mmap/shm issues that crop are due to the memory susbsystem.  Someone correct me if I&#8217;m wrong but SELinux could have maintained subject tranquility if the entire task struct was copied  instead of overwritten on execve.  All the data could have been copied to the new task struct, but the new task struct would contain the new sid.  Given the lightweight nature of Linux process fork/execs I don&#8217;t it is worth the tradeoff.  </p>
<p>Still, it is a relabel by definition thus violating the laws of tranquility but at the same time, I would argue, presents no revocation issues and doesn&#8217;t introduce the complexity of time into analysis.  We trust the kernel to not begin execution of the program until the security context is correct.  Without being a kernel expert, I would assume other processes on the system can&#8217;t interact with this process until the kernel actually runs it, and intuition tells us that a non-running application can&#8217;t really initiate any type of communication.  Thus, during analysis we assume that the process and all it&#8217;s &#8220;metadata&#8221; has that label for it&#8217;s entire lifetime.  Still a relabel is a relabel, one second the policy means one thing about a segment of memory, and the next it says another.</p>
<p>As for the mmap/shm issue I&#8217;ll actually update the entry to avoid scaring people about file relabels&#8230;</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Joshua Brindle</title>
		<link>http://beyondabstraction.net/2005/11/07/subject-object-tranquility-part-2/comment-page-1/#comment-155</link>
		<dc:creator>Joshua Brindle</dc:creator>
		<pubDate>Fri, 14 Jul 2006 00:23:26 +0000</pubDate>
		<guid isPermaLink="false">#comment-155</guid>
		<description>&lt;blockquote&gt;If dynamic transitions are evil shouldnâ€™t all domain transitions be evil since they destroy tranquility?
No because normal domain transitions maintain tranquility. As stated above, the transitions happen on the execve call and the type is kept for the lifetime of the application. This means there is the complexity of time is never introduced. When one process starts another process one of three things can occur:&lt;/blockquote&gt;


This is incorrect. The process address space is created by fork(), the execve overwrites the application data only, not the environment (glibc atsecure removes some environment variables that affect the linker) but there is a significant chunk of data that is non-tranquil. Imagine doing a domain transition on a perl script, how many environment variables can affect the execution of the perl script that won&#039;t be cleansed across the execve().



&lt;blockquote&gt;So what about files? Can we just relabel files since revocation is fairly instantaneous?
No! Bad! First of all buffered reads and buffered writes could still complete (policy says one thing, the system is enforcing something else). Second of all time is an issue, how the heck can you analyze policy when one moment the policy means one thing and the next moment it means something else. &lt;/blockquote&gt;

Also erroneous. By definition when revocation occurs the policy says one thing at one moment and another thing at another moment. The only affect here is a possible delay between when the old policy is enforcing and when the new policy takes affect. 

Granted there are revocation issues but you aren&#039;t covering any of them here. The primary revocation issue is memory, shared memory and mmap()&#039;d files are not able to be revoked when a new policy is loaded.</description>
		<content:encoded><![CDATA[<blockquote><p>If dynamic transitions are evil shouldnâ€™t all domain transitions be evil since they destroy tranquility?<br />
No because normal domain transitions maintain tranquility. As stated above, the transitions happen on the execve call and the type is kept for the lifetime of the application. This means there is the complexity of time is never introduced. When one process starts another process one of three things can occur:</p></blockquote>
<p>This is incorrect. The process address space is created by fork(), the execve overwrites the application data only, not the environment (glibc atsecure removes some environment variables that affect the linker) but there is a significant chunk of data that is non-tranquil. Imagine doing a domain transition on a perl script, how many environment variables can affect the execution of the perl script that won&#8217;t be cleansed across the execve().</p>
<blockquote><p>So what about files? Can we just relabel files since revocation is fairly instantaneous?<br />
No! Bad! First of all buffered reads and buffered writes could still complete (policy says one thing, the system is enforcing something else). Second of all time is an issue, how the heck can you analyze policy when one moment the policy means one thing and the next moment it means something else. </p></blockquote>
<p>Also erroneous. By definition when revocation occurs the policy says one thing at one moment and another thing at another moment. The only affect here is a possible delay between when the old policy is enforcing and when the new policy takes affect. </p>
<p>Granted there are revocation issues but you aren&#8217;t covering any of them here. The primary revocation issue is memory, shared memory and mmap()&#8217;d files are not able to be revoked when a new policy is loaded.</p>
]]></content:encoded>
	</item>
</channel>
</rss>

