Received: by 2002:a05:6902:102b:0:0:0:0 with SMTP id x11csp451667ybt; Fri, 10 Jul 2020 04:13:56 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwDBWWO4wQgDfh7OEiVNv6I15eufjksaildBYpfFrg05sFcm4GK2oFODvvE01XTlhLuw3Wc X-Received: by 2002:aa7:c808:: with SMTP id a8mr76468653edt.259.1594379636258; Fri, 10 Jul 2020 04:13:56 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1594379636; cv=none; d=google.com; s=arc-20160816; b=C3AHsBr8PdNe+0+uyKz4mJecwt8WH30nQnC2XYDq5uoL4CPaRhvx/kO+OaGYPu2c8h KmzmUO6gmzcPsEuTw5qBYjMZdAzn+zy6N9icwMENyJ9VUqYUZlCYTS3PaEsumTlOkR/2 zAbxryDB757WXrg9G8aVA/JRgYFGzD5BVrTDtT7VDcp0GGmVtmRNGD2oEuI7rfwCDNaw LHt3BEuXlH8GXyfSRm8ldADT7HvEqGeyjv1vzqcqmLncoUs7iWPb3HhiHxIdS1Q1LbNE 5uQYfz7xzHAAT5kvakVIjYE8CmCR5W60Daj8wPrwovHJt3XzUvG4/NpHHVZnvPjn2etu strA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date; bh=qR7h0r+FFvoLhQgeL8bJG/QF49ckG8Ymtq+tC5uDzRs=; b=oOYUxCNc68yCsaDCzBGEtS1q1OApep5dlfPPuqL8sIWFls1j97MwsP8x3Ry7eeeMQf Eh8B+jxVhoLUrFBRV11eXPd9wwRIN+lo44HX473T22NAe6+6bZcKOHZ+B/xDbQNCt4ls 80PVUj7MVEG4tSeNtGrSY7PWC0F1cBx057wle/1BA+pCYIHtJLz8y1I8nGTnAiHDMHmT rSbPktqqPEwC8I2InoOQu8Xk+bJxfVnw5RVj8hdDO4PR7x0uwH+M2nhyVX4kxVRX8Esq GzS+lXJevVRDr/7y3JndnrLAAkWF/0OPJL3SXb3Xm8ftDTc+6QZKQtRQJ3IasDSIOF9E E0yw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id n16si3639740edt.25.2020.07.10.04.13.33; Fri, 10 Jul 2020 04:13:56 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728051AbgGJLMt (ORCPT + 99 others); Fri, 10 Jul 2020 07:12:49 -0400 Received: from nautica.notk.org ([91.121.71.147]:48350 "EHLO nautica.notk.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727003AbgGJLMt (ORCPT ); Fri, 10 Jul 2020 07:12:49 -0400 Received: by nautica.notk.org (Postfix, from userid 1001) id A3B2DC009; Fri, 10 Jul 2020 13:12:47 +0200 (CEST) Date: Fri, 10 Jul 2020 13:12:32 +0200 From: Dominique Martinet To: Christoph Hellwig Cc: ericvh@gmail.com, lucho@ionkov.net, v9fs-developer@lists.sourceforge.net, netdev@vger.kernel.org, linux-kernel@vger.kernel.org, syzbot+e6f77e16ff68b2434a2c@syzkaller.appspotmail.com Subject: Re: [PATCH] net/9p: validate fds in p9_fd_open Message-ID: <20200710111232.GC17924@nautica> References: <20200710085722.435850-1-hch@lst.de> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <20200710085722.435850-1-hch@lst.de> User-Agent: Mutt/1.5.21 (2010-09-15) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Christoph Hellwig wrote on Fri, Jul 10, 2020: > p9_fd_open just fgets file descriptors passed in from userspace, but > doesn't verify that they are valid for read or writing. This gets > cought down in the VFS when actually attemping a read or write, but a > new warning added in linux-next upsets syzcaller. > > Fix this by just verifying the fds early on. > > Reported-by: syzbot+e6f77e16ff68b2434a2c@syzkaller.appspotmail.com > Signed-off-by: Christoph Hellwig Looks good to me, I'll pick it up shortly. -- Dominique