Received: by 2002:ac0:a5a7:0:0:0:0:0 with SMTP id m36-v6csp229777imm; Thu, 26 Jul 2018 02:29:24 -0700 (PDT) X-Google-Smtp-Source: AAOMgpfFBBwfB5ueP5vGGLtS8Rv24Di0sQeO6kISDHT+VBMdF4yAcuPx0PTLN9ok0N83Mp0N06hE X-Received: by 2002:a62:5f82:: with SMTP id t124-v6mr1295366pfb.223.1532597364496; Thu, 26 Jul 2018 02:29:24 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1532597364; cv=none; d=google.com; s=arc-20160816; b=kMkQrPQGgVJg/B/I0ysL463mGzNKWYJDClduYgkAfam3vir5U0xjBtP6HHUfVhy82U XXtqq4TzfaM/TROjRXNx9jY+tDGvsa/1lLkFaztVPqo5UT8uZd4fj3XvlXh0lb6XgJkV XYJCh5pRsZgGVlARmP2tL/opAHiglAxQ82P6jPYBMGs7vAMgudtevHQDaTHWLXndkCku 8GROlJjRX+WPSo+aA48G4V3q1mQIDdseb6UYlQYMlAru1O8fMLhH7RU3pPJShf07Hiah Xp8k0BTMvxqijIVBjkWoFobngFlB7WP2pYnszM8Q3L8ftR/8YaFTHJEJxDRMeGHJdfnS dK8A== 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=NoFDYHcbVaj1tOogJjEarKpuJ6WsCYKtNVsiPLendDE=; b=piGDMC96tK1+d3ZhMRuzthgRuFiYMkPhZaJ+ITimnM1RU06qnc8p89LzIDlpOJP/6r RuxF3e995cFOV4dLf/+LeHmIQGps3yrcu6vb5QfWExyI0LvEJzuNVzF6zXDkaHruTN/o wOHh9WN3ZvQFMUZUZc0gyLuiKmfzdDqpr4ZhI3prdrOSV8xDgPy8ENJ6TUyKZc73DmuJ XjoyJuf1TAJ8j98yZ4H+sCKHFxT2elhCsrtWhEAPdjsqoDkiyaRpg4dDxUnUNEOsPV8X tgSqy6UweISIA1sE7qU+qoGrtdrMV+192ClTFMlOgOfKqwevQqKCf2dEA9YSrQ1Es+/e bhDQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20161025 header.b=dCP1zEGy; 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 d38-v6si914077pgl.88.2018.07.26.02.29.09; Thu, 26 Jul 2018 02:29: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=dCP1zEGy; 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 S1729158AbeGZKoT (ORCPT + 99 others); Thu, 26 Jul 2018 06:44:19 -0400 Received: from mail-pg1-f193.google.com ([209.85.215.193]:40680 "EHLO mail-pg1-f193.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728688AbeGZKoS (ORCPT ); Thu, 26 Jul 2018 06:44:18 -0400 Received: by mail-pg1-f193.google.com with SMTP id x5-v6so790013pgp.7 for ; Thu, 26 Jul 2018 02:28:20 -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=NoFDYHcbVaj1tOogJjEarKpuJ6WsCYKtNVsiPLendDE=; b=dCP1zEGyeRmSFbFI9AF+c5WGm/d92Tz1IAf/WSxy5IhpJL+Y+QrThk04eBRVnGV6A8 BsqWZKhpLeh6x/XzRwV1/QBZOS6D2nUvVC6/rGrGyg3lcvHhOMMxwbFPV6UO6lo1MUsK IOT2Y1kquu8E8BCvtFkC/qbBI92rVpI/x+yjY86VchMJN/BUgT8P9UaXc9xq73RPHAnD 3I6uzAppTD1zp0kcLDTPnxhpCeepttRFsfO+Rghl6Y1wP2S/B30hwefGIJXzUNvFy1yf N3zAZ0ueZY5haxpaUstN9+vP+bP8O1+1WFfahNAKPg0GH4N50VJU7qUB8JJ+PHSynAhh /P4Q== 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=NoFDYHcbVaj1tOogJjEarKpuJ6WsCYKtNVsiPLendDE=; b=uLFCpzU4D3WQcvI8E74o3oo+t+DgosK+9Yforf+DaK+RxImJ9kW7ZJTKBVMlFT56zU zqm/uclFyNsVXEdZ0sKnlGBnjWOk1+Kdsd1smlDed8BjhWdcs3zlXT+66+Q/euOonpw2 7lCHakKRDRh3n0NOUy5LESqpX+BmwjsejKta0+tIlpF+s1PcGTIRaiqfq2w6m6oejqrc nx7ektJLgn2Nslm4bomBmd68T31NOfwIELM8pYBPkfKdk2oi1Ys5z3wWNZu+Cu8KM+jW tlOwdDeGNQ762MIF+mLMj/uA3IYQJvWx9rNiAmoNeaadNCd6by/zNojD/Zk9UQ4kKzHi c4Dw== X-Gm-Message-State: AOUpUlHLeN/VYNVyTw6dmbSvUaSb4a0YzZThg/+QXzD/zxuusVTj29Pc bl7t5huxvTah94wkykk/hp72T8PPWRSufkT9tV1cQQ== X-Received: by 2002:a62:3184:: with SMTP id x126-v6mr1314811pfx.49.1532597299881; Thu, 26 Jul 2018 02:28:19 -0700 (PDT) MIME-Version: 1.0 Received: by 2002:a17:90a:ac14:0:0:0:0 with HTTP; Thu, 26 Jul 2018 02:27:59 -0700 (PDT) In-Reply-To: <20180726081727.GA6699@nautica> References: <20180726081049.10527-1-tomasbortoli@gmail.com> <20180726081727.GA6699@nautica> From: Dmitry Vyukov Date: Thu, 26 Jul 2018 11:27:59 +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 10:17 AM, Dominique Martinet wrote: > Tomas Bortoli wrote on Thu, Jul 26, 2018: >> In p9_fd_create_tcp() and p9_fd_create_unix() it is possible to get >> a NULL value in the addr parameter. Return -EINVAL in such cases. > > 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?