Received: by 2002:ac0:a5a7:0:0:0:0:0 with SMTP id m36-v6csp535284imm; Thu, 26 Jul 2018 07:51:11 -0700 (PDT) X-Google-Smtp-Source: AAOMgpeSZboUAhkFKjo3w0a7L5g7SZuM2SItVpp/4sPTjvQYuHnHbHGfB8MdO83xam4q9LF7Egtv X-Received: by 2002:a17:902:780d:: with SMTP id p13-v6mr2213442pll.119.1532616671731; Thu, 26 Jul 2018 07:51:11 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1532616671; cv=none; d=google.com; s=arc-20160816; b=g63y8ieqqMvbjRX9UpDyhxVIM0KCHGCJm+wHO9+Wp3clroCwRBgQNm0T9IwY3G0wNy hnb5YPJUcxsvHqMMGmvtMZNIXAx9ZuMBiSR0amc5uErFWvprqdxgXpH6cohQGTkzIWFm Sn+iT4s2yxcxTw9vhUEbwaw+9pQ7/rjgH/qok3C/0UqchcJih4K1JinxBu+iqR2dnvg2 sKc6zcUCH+DoIHJ2WIal0qryNQhnVSevf1NvkXnqwCcnj7Q4GeieOJX0KKYMh3K7Y1jt t+PATVYD3oAtQAHkqExc0B8dSjizcI1liEwQfFVoYiTNk8xOcwj9j0w+TO6TSIi6N4U8 I6LQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :references:in-reply-to:mime-version:dkim-signature :arc-authentication-results; bh=fsGNVxV/wENo4yCkOhBo+cgGdDWsUdYDRs6lNc+j42w=; b=NOFrCaZhfpPZxzTtHfZABjDhpchYB1UEMchhQonRweQjSZIMseJ8ST7Sk1qFoahesT nNuK1h93mo9tpVDOI6CJB8LagMbZjMGL1LCwCgZ+pE7stmff2T4AToSUYC/tPl7JG7Mf ExjpX4TVK4k9d3rgdKzB6xzF4lltFZ+3Ls/MLqMYov0Wjay6Co+dQcJzXNMTB0/wVWyw dT+XAoknC0JvD1eUtP+eMGJgs6/Hgvxs3hmICmTfmkNzGq4q6zFRoGS/KtOtMmzzEq1C 0UpXnPVlGaoN28Xum/yvSof3NUub9jerz7PDhCXeEivjQrd733/RpJWw7jlP22mPPQsV 8Vng== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=uAGGs2K4; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id i124-v6si1586976pfc.110.2018.07.26.07.50.56; Thu, 26 Jul 2018 07:51:11 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=uAGGs2K4; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1731307AbeGZQGD (ORCPT + 99 others); Thu, 26 Jul 2018 12:06:03 -0400 Received: from mail-yb0-f196.google.com ([209.85.213.196]:43998 "EHLO mail-yb0-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729801AbeGZQGD (ORCPT ); Thu, 26 Jul 2018 12:06:03 -0400 Received: by mail-yb0-f196.google.com with SMTP id x10-v6so731665ybl.10; Thu, 26 Jul 2018 07:48:51 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=fsGNVxV/wENo4yCkOhBo+cgGdDWsUdYDRs6lNc+j42w=; b=uAGGs2K47O7SqcsY1Cj2vEn5Ok1OXzxiCLYr+jThGTH57xRbdDxEl3SEFlwrPJQUaA MQtF5WLc42TNCn2oxOAQ6XtqfyFfRK/0vkk1YwDqMqywwyPTotQRfQsiIMkD5YFTaNyJ qzkAXmcXEIQMrE6BaXpF+tfh+nyFeeTryTuB2z0YtqJreweD57CX70NG1wzepBvNRo8j g6h9CYnkTBA7MiaRHd4Y8vW4rOHEsJAVxM/aA/p5aUryLwg/po7RFRL8ug8133KpPP0k PXEVGVRbCsG9mE7xQ4hreBGMvkbuFPecwSnyDmE12lwdvNwVR5JjCxKKMYc99PCccMTN +s2A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=fsGNVxV/wENo4yCkOhBo+cgGdDWsUdYDRs6lNc+j42w=; b=CUwFZo52J2fsrX6sMOF25DijKhFwM+BlVwssx6Xe+e42o8aO8vhzmOYPDi8cE84a91 uPDMDOFsr7CDGBK0TxRTWkS+WhNIbxiZzC+x7cGzXJ7b7hHqsKN/aM5VcgqmZnMgp5fQ sFxVTGB0RlAb8lAxqVB7eoSyUyruhhGtMgHWRmZm0TZx3JFPLfBObwuVKEd+va0ajulk 3fIxFLtHGYJDvMM2mkSQNUCmNmHVeJGC3eh5Dc78gZStfS9fQ61BZhWE8hNMD3AKngpW PG/INRRrKwPr5SCUiLwtMaRk3GUw40Q8YwfbswRFi/lyR8ybk8dNSYcpOg3S558VwHtG qhIA== X-Gm-Message-State: AOUpUlHGAmGK7GkYQyqqA/3dSseGcGuSY8f+lsCV8p3lLjBR72BNdP3r Kja7JM0Tt1pR2S0d7EvXEVI9cK/uktQyVk0PiQ== X-Received: by 2002:a25:5c41:: with SMTP id q62-v6mr1212327ybb.332.1532616530615; Thu, 26 Jul 2018 07:48:50 -0700 (PDT) MIME-Version: 1.0 Received: by 2002:a25:e0c7:0:0:0:0:0 with HTTP; Thu, 26 Jul 2018 07:48:50 -0700 (PDT) In-Reply-To: <20180726094849.GA18334@nautica> References: <20180726081049.10527-1-tomasbortoli@gmail.com> <20180726081727.GA6699@nautica> <20180726094849.GA18334@nautica> From: sqweek Date: Thu, 26 Jul 2018 22:48:50 +0800 Message-ID: Subject: Re: [V9fs-developer] [PATCH] 9p: fix NULL pointer dereferences To: Dominique Martinet Cc: Dmitry Vyukov , netdev , LKML , syzkaller , V9FS Developers , Tomas Bortoli , David Miller Content-Type: multipart/alternative; boundary="000000000000e261cb0571e817f5" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org --000000000000e261cb0571e817f5 Content-Type: text/plain; charset="UTF-8" On 26 July 2018 at 17:48, Dominique Martinet wrote: > Dmitry Vyukov wrote on Thu, Jul 26, 2018: > > > Let's refuse that at much higher level, like v9fs_mount() in > > > fs/9p/vfs_super.c > > > > > > I can't think of any valid reason for dev_name to be NULL, it's the > > > target IP or virtio handle. > > > > But I think trans=fd allows NULL addr today, no? > > Ah, right, I read the patch too fast and read unix_create as fd_create, > I never realized there was a unix_create variant... > > fd legitimately doesn't need a name, you are correct. > > I'm really curious if anyone ever uses the unix/fd variants for "real" > stuff though! I definitely used the unix variant for mounting plan9port servers (which all listen for 9p requests via unix sockets). A long time ago I also experimented with mounting p9p servers from remote machines and I think I might have combined socat with -o trans=fd at one point. But I gave up on it in the end because having a process blocked in read() was preventing my laptop from going to sleep for the duration. And since I was trying to read /event type files the Tread could block for quite some time if no events were posted. I believe 9pfuse had the same issue, so the problem be deeper than v9fs. But anyway I'm on quite a tangent already so I'll stop distracting you all from the work at hand. It's been nice to see 9p still kicking recently! :) > (not meaning syzbot isn't real, but I have yet to see > anything take advantage of this, even if I could imagine some fun > applications by piping the wmii libixp server socket.. > Wait woahhhhh, there's another wmii user left? I thought I was the last one! -sqweek --000000000000e261cb0571e817f5 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
On 26 July 2018 at 17:48, Dominique Martinet <asmade= us@codewreck.org> wrote:
Dmitry= Vyukov wrote on Thu, Jul 26, 2018:
> > Let's refuse that at much higher level, like v9fs_mount() in<= br> > > fs/9p/vfs_super.c
> >
> > I can't think of any valid reason for dev_name to be NULL, it= 's the
> > target IP or virtio handle.
>
> But I think trans=3Dfd allows NULL addr today, no?

Ah, right, I read the patch too fast and read unix_create as fd_crea= te,
I never realized there was a unix_create variant...

fd legitimately doesn't need a name, you are correct.

I'm really curious if anyone ever uses the unix/fd variants for "r= eal"
stuff though!

I definitely used the unix variant for mounting plan9port servers (whi= ch all listen for 9p requests via unix sockets).

A long time ago I also experimented with mounting p9p servers from remote machines and I think I might have combined socat with -o trans=3Dfd at=20 one point. But I gave up on it in the end because having a process blocked = in read() was preventing my laptop from going to sleep for the duration. An= d since I was trying to read /event type files the Tread could block for qu= ite some time if no events were posted.

I believe = 9pfuse had the same issue, so the problem be deeper than v9fs. But anyway I= 'm on quite a tangent already so I'll stop distracting you all from= the work at hand. It's been nice to see 9p still kicking recently! :)<= br>
=C2=A0
(not meaning syzbot isn't re= al, but I have yet to see
anything take advantage of this, even if I could imagine some fun
applications by piping the wmii libixp server socket..

Wait woahhhhh, there's another wmii user left? I thoug= ht I was the last one!
-sqweek


=
--000000000000e261cb0571e817f5--