lkml.org 
[lkml]   [2018]   [Jul]   [27]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
Date
SubjectRe: [PATCH] tracing: do not leak kernel addresses
<div dir="ltr">Any system can chose to change the permissions of a sysfs node, default, DAC (and MAC) is just layers of multi-level security (or lack thereof). As well intentioned as a default DAC is in the kernel, leaking kernel addresses is still an attack surface that we want to close tightly.<div><br></div><div>For instance on Android:</div><div><br></div><div>     chmod 0755 /sys/kernel/debug/tracing</div><div><br></div><div>is in the common init.rc file ...</div><div><div><br></div><div>If DAC has been adjusted at runtime to permit access to the node, I would think that if the caller does not have all the credentials/capabilities, we do want the addresses to be abstracted by the kernel.</div></div><div><br></div><div>-- Mark</div></div><div class="gmail_extra"><br><div class="gmail_quote">On Fri, Jul 27, 2018 at 11:31 AM, Steven Rostedt <span dir="ltr">&lt;<a href="mailto:rostedt@goodmis.org" target="_blank">rostedt@goodmis.org</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><span class="">On Fri, 27 Jul 2018 11:13:51 -0700<br>
Nick Desaulniers &lt;<a href="mailto:ndesaulniers@google.com">ndesaulniers@google.com</a>&gt; wrote:<br>
<br>
&gt; I found the internal bug report (reported Jan &#39;17, you&#39;ll have to<br>
&gt; forgive me if my memory of the issue is hazy, or if the fix used at<br>
&gt; the time wasn&#39;t perfect), which was reported against the Nexus 6.<br>
&gt; &gt;From the report, it was possible to `cat  <br>
&gt; /sys/kernel/debug/tracing/<wbr>printk_formats` without being root, which I<br>
&gt; can&#39;t do on my workstations much more modern kernel (Nexus 6 was<br>
&gt; 3.10).  So I guess the question is what governs access to files below<br>
&gt; /sys/kernel/debug, and why was it missing from those kernels?  I<br>
&gt; assume some check was added, but either not backported to 3.10 stable<br>
&gt; (or more likely not pulled in to Nexus 6&#39;s kernel through stable;<br>
&gt; Android is now in a much better place for that kind of issue).<br>
<br>
</span>As of commit 82aceae4f0d4 (&quot;debugfs: more tightly restrict default<br>
mount mode&quot;) /sys/kernel/debug has been default mounted as 0700 (root<br>
only). But that was introduced in 3.7. Not sure why your 3.10 kernel<br>
didn&#39;t have that. Perhaps there&#39;s another commit that fixed<br>
permissions not being inherited?<br>
<br>
-- Steve<br>
<div class="HOEnZb"><div class="h5"><br>
-- <br>
You received this message because you are subscribed to the Google Groups &quot;kernel-team&quot; group.<br>
To unsubscribe from this group and stop receiving emails from it, send an email to <a href="mailto:kernel-team%2Bunsubscribe@android.com">kernel-team+unsubscribe@<wbr>android.com</a>.<br>
<br>
</div></div></blockquote></div><br></div>
\
 
 \ /
  Last update: 2018-07-27 20:41    [W:0.046 / U:0.236 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site