Received: by 2002:ac0:a5a7:0:0:0:0:0 with SMTP id m36-v6csp250272imm; Thu, 26 Jul 2018 02:56:24 -0700 (PDT) X-Google-Smtp-Source: AAOMgpeNGXUBLEXB/G64bNolzaUc6PB2ufKzP29YQu91Ne6eUF8pBdVRJXtN/3eeUgaopU+CYXBq X-Received: by 2002:a63:1a20:: with SMTP id a32-v6mr1280009pga.446.1532598984756; Thu, 26 Jul 2018 02:56:24 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1532598984; cv=none; d=google.com; s=arc-20160816; b=fE+01jwuBFU1V/njxh4vsF6dYsaj+MaUzvlTEhK9bCKooy3eqAhm+7HwqbHdCx7OwV BkzrNySkWGlmkcCVGih5Md5HNZjZjdT4mwG2pNtvDY2FoSCkdMtmPpoif1JxS6+LEj5Q TyXyJjC2zaJrtqfFOjkGsDCxC5Q4WA9TbJgCJ2BHPKtq4WAFY2KqqC7XGX3ay6YJl/jN toECcvrWIcv0jEKUpZ98BjkCRV6j77FSe9PhS4OjjxYerqtiibdXRuj/ou1+LDVJVJcu QokUblNoSmlS2Ahx2IGtFu2CEHS1TRq94nAyFyCW4EjkSBMyjs4zLHj46V+NujRcPAcj s4JQ== 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=9nMhknhIfuD5vGUWbHq4oAU1nSJWeTVBGyl65/cSTFk=; b=OpG2CJr3z2gr1zh8ZNlOlcjGjambc77D6e2qYQY6pQpoo4f00P+tDzj5dr0dVQO5gC cHpCn+YYVoFtf1KWp8HTNBKv6z73VNzeL3z9srDG5YGgKT3QeM+1j7KKlQxlqaoerTo/ Ut9cFYXUvMiu9Q+0ZOGA7blHBXFQxRVggJK5NnXQR7O3RceRn8yMlmWuZ/pjcYGtBSng mDqvRkoyjq5aC+b1/jr9ZNq1sRckbrAIMtp6ILApjzW1lXvCJHiyTaCYij8Lz4JmRfmN ZP6yld1gZC/igV95ZkMQ98d2548oHi7EVF1K9b7AQE8cYEx9q1caZMMTSuLRFkaBiYIx G1+A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20161025 header.b=ikW4vcOz; 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=REJECT sp=REJECT dis=NONE) header.from=google.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id 71-v6si996939pfl.220.2018.07.26.02.56.10; Thu, 26 Jul 2018 02:56:24 -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=@google.com header.s=20161025 header.b=ikW4vcOz; 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=REJECT sp=REJECT dis=NONE) header.from=google.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729329AbeGZLLF (ORCPT + 99 others); Thu, 26 Jul 2018 07:11:05 -0400 Received: from mail-pl0-f65.google.com ([209.85.160.65]:39310 "EHLO mail-pl0-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728899AbeGZLLF (ORCPT ); Thu, 26 Jul 2018 07:11:05 -0400 Received: by mail-pl0-f65.google.com with SMTP id m1-v6so601315plt.6 for ; Thu, 26 Jul 2018 02:55:00 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20161025; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=9nMhknhIfuD5vGUWbHq4oAU1nSJWeTVBGyl65/cSTFk=; b=ikW4vcOzBKqgKn3+SFAfH7Im1enmmLZ76SwG8JX8oqU/U3MyzmfhxPRGj64wU9IjAJ +pKGXtbLT+J/rWI6Vz2zUeQGRix285x8jCsiV5bWxa/weG7TCmzmTIFen3Ics3UEgo0+ iAG83VJ5+NZRdO1oJNgMDj6XTD6oePntvJbv8YzaaM6k4lxCZXHEUEvBQ7Rmc+Ub7xQl DkkcJleruFpHxzTP6Vm4Bxry+95F9HG7M4YQf00/MPX2AaypDY0Mih281rp8/BvX4u7U o7SA0PaDXirc1f7WIY5B8GTR5fgkXAEx18qhEf32iIKq0JvVgPzv7FDAy8z3bCjloLPO QNXQ== 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=9nMhknhIfuD5vGUWbHq4oAU1nSJWeTVBGyl65/cSTFk=; b=U8fYbnAwaWuQtx9Izjiy7OuZaD7KT3qybW/4EZ+/MeL8vduzVjWDr4kBeXGn4qBEcn PxDstLoRCroVWMqeFwuy4hoPg4uPlkU1C3QTnR4LReS7LFSApQcYnp9T0hHuyyMV+tNG knHk45UQeeCeGRkl+Plf+Y3dpsuiiU5od09R8Bc62NEAIBRwZ9Y1+c5L1HYon8CVnbCq S5kzVvYYS9g8iqdEn0GaNrGMhbA7RybIgj3pkP2ABCunLmW07+c/HHMaJFzEOYWzZLIu oQ2456eVcRcHsi9dtLtmzh3wjzFwJoq65+J0XCTwH5dLmqeA5IJK8ZoPu2ljv+vuWl4z f8kQ== X-Gm-Message-State: AOUpUlEA/xBwpkNrWZQKboi55uDaEMWWDq9dsn/4LdILeF2lCUztR6M+ MMW3lOHjJjZLD1gTJ2tdDsqeFr6D23MT6O8l+ZWCBg== X-Received: by 2002:a17:902:b48c:: with SMTP id y12-v6mr1277259plr.97.1532598900312; Thu, 26 Jul 2018 02:55:00 -0700 (PDT) MIME-Version: 1.0 Received: by 2002:a17:90a:ac14:0:0:0:0 with HTTP; Thu, 26 Jul 2018 02:54:39 -0700 (PDT) In-Reply-To: <20180726094849.GA18334@nautica> References: <20180726081049.10527-1-tomasbortoli@gmail.com> <20180726081727.GA6699@nautica> <20180726094849.GA18334@nautica> From: Dmitry Vyukov Date: Thu, 26 Jul 2018 11:54:39 +0200 Message-ID: Subject: Re: [PATCH] 9p: fix NULL pointer dereferences To: Dominique Martinet Cc: Tomas Bortoli , David Miller , v9fs-developer@lists.sourceforge.net, netdev , LKML , syzkaller Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Jul 26, 2018 at 11:48 AM, 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! (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.. and just crashed > my laptop trying because of the (fixed) trans put bug.. I have yet to > see anyone actually doing this) I don't really know any real-world cases, but 9p over fd it looks like a kind of fuse, so perhaps somebody uses it this way. Also, fd allows to use something like sctp socket, and if I am not mistaken, trans=tcp can't even do ipv6 tcp (?). > On the other hand, virtio, rdma and xen all have the same problem, so > Thomas, please fix them instead :)