<br><br><div class="gmail_quote">On Thu, Apr 29, 2010 at 9:29 AM, Jeff Layton <span dir="ltr">&lt;<a href="mailto:jlayton@samba.org">jlayton@samba.org</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<div><div></div><div class="h5">On Thu, 29 Apr 2010 22:12:16 +0800<br>
Eugene Teo &lt;<a href="mailto:eugeneteo@kernel.sg">eugeneteo@kernel.sg</a>&gt; wrote:<br>
<br>
&gt; On Thu, Apr 29, 2010 at 9:51 PM, Shirish Pargaonkar<br>
&gt; &lt;<a href="mailto:shirishpargaonkar@gmail.com">shirishpargaonkar@gmail.com</a>&gt; wrote:<br>
&gt; &gt; On Thu, Apr 29, 2010 at 6:16 AM, Jeff Layton &lt;<a href="mailto:jlayton@samba.org">jlayton@samba.org</a>&gt; wrote:<br>
&gt; &gt;&gt; On Thu, 29 Apr 2010 15:56:02 +0530<br>
&gt; &gt;&gt; Suresh Jayaraman &lt;<a href="mailto:sjayaraman@suse.de">sjayaraman@suse.de</a>&gt; wrote:<br>
&gt; &gt;&gt;<br>
&gt; &gt;&gt;&gt; On 04/09/2010 01:28 AM, Jeff Layton wrote:<br>
&gt; &gt;&gt;&gt; &gt; On Thu, 8 Apr 2010 14:40:47 -0500<br>
&gt; &gt;&gt;&gt; &gt; Shirish Pargaonkar &lt;<a href="mailto:shirishpargaonkar@gmail.com">shirishpargaonkar@gmail.com</a>&gt; wrote:<br>
&gt; &gt;&gt;&gt; &gt;<br>
&gt; &gt;&gt;&gt; &gt;&gt; On Thu, Apr 8, 2010 at 2:34 PM, Jeff Layton &lt;<a href="mailto:jlayton@samba.org">jlayton@samba.org</a>&gt; wrote:<br>
&gt; &gt;&gt;&gt; &gt;&gt;&gt; On Wed, �7 Apr 2010 11:19:10 -0500<br>
&gt; &gt;&gt;&gt; &gt;&gt;&gt; <a href="mailto:shirishpargaonkar@gmail.com">shirishpargaonkar@gmail.com</a> wrote:<br>
&gt; &gt;&gt;&gt; &gt;&gt;&gt;<br>
&gt; &gt;&gt;&gt; &gt;&gt;&gt;&gt; While creating a file on a server which supports unix extensions<br>
&gt; &gt;&gt;&gt; &gt;&gt;&gt;&gt; such as Samba, if a file is being created which does not supply<br>
&gt; &gt;&gt;&gt; &gt;&gt;&gt;&gt; nameidata (i.e. nd is null), cifs client can oops when calling<br>
&gt; &gt;&gt;&gt; &gt;&gt;&gt;&gt; cifs_posix_open.<br>
&gt; &gt;&gt;&gt; &gt;&gt;&gt;&gt;<br>
&gt; &gt;&gt;&gt; &gt;&gt;&gt;&gt; Signed-off-by: Shirish Pargaonkar &lt;<a href="mailto:shirishpargaonkar@gmail.com">shirishpargaonkar@gmail.com</a>&gt;<br>
&gt; &gt;&gt;&gt; &gt;&gt;&gt;&gt; Reported-by: Eugene Teo &lt;<a href="mailto:eugeneteo@kernel.sg">eugeneteo@kernel.sg</a>&gt;<br>
&gt; &gt;&gt;&gt;<br>
&gt; &gt;&gt;&gt; &gt;<br>
&gt; &gt;&gt;&gt; &gt; We&#39;ll need to take this patch in the interim though to fix the<br>
&gt; &gt;&gt;&gt; &gt; immediate oops.<br>
&gt; &gt;&gt;&gt; &gt;<br>
&gt; &gt;&gt;&gt;<br>
&gt; &gt;&gt;&gt; Do we need to Cc -stable as well as the issue seem to be reproducible on<br>
&gt; &gt;&gt;&gt; kernel versions &gt; 2.6.29-rc6?<br>
&gt; &gt;&gt;&gt;<br>
&gt; &gt;&gt;&gt; Thanks,<br>
&gt; &gt;&gt;&gt;<br>
&gt; &gt;&gt;<br>
&gt; &gt;&gt; Can someone clarify how to reproduce this oops? I think that the only<br>
&gt; &gt;&gt; place where this function gets called with NULL nameidata is from nfsd<br>
&gt; &gt;&gt; and the export ops for cifs are just stubs. Has this actually been seen<br>
&gt; &gt;&gt; in the field or was it just found via inspection?<br>
&gt; &gt;&gt;<br>
&gt; &gt;&gt; --<br>
&gt; &gt;&gt; Jeff Layton &lt;<a href="mailto:jlayton@samba.org">jlayton@samba.org</a>&gt;<br>
&gt; &gt;<br>
&gt; &gt; As far as I know, by inspection.<br>
&gt; &gt; Eugene, can you please comment on this?<br>
&gt;<br>
&gt; It was found by inspection. Did not attempt to reproduce the issue.<br>
&gt;<br>
&gt; Eugene<br>
&gt;<br>
<br>
</div></div>Ok. I don&#39;t think this is actually exploitable. Certainly something<br>
that should be fixed in case CIFS ever is exportable via nfsd, but not<br>
worthy of a CVE.<br>
<br></blockquote><div><br>Yes - that is what we talked about earlier.    Looks like nfs client<br>has the same problem too (dereferences, potentially null nd)<br>but in practice can&#39;t get there (nfsd over nfs)<br> </div>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
On a related note... the sb-&gt;s_export_ops ought to be NULL in all cases<br>
until CIFS actually has export ops that are functional. The current<br>
situation probably tricks nfsd into thinking that CIFS is exportable<br>
when it really isn&#39;t. That&#39;s likely to be very confusing for users.<br>
<font color="#888888"><br>
</font></blockquote></div><br>I don&#39;t think it matters much, the use case is nfs server<br>reexporting resources over cifs mounts on servers that don&#39;t<br> have nfs (via a cifs mount) - not sure if it is worth just<br>
doing this in smb2 (where we have persistent file ids anyway,<br>which may be useful for this) or should do it in both<br clear="all"><br>-- <br>Thanks,<br><br>Steve<br>