Received: by 2002:a05:6a10:5bc5:0:0:0:0 with SMTP id os5csp655387pxb; Thu, 21 Oct 2021 07:03:24 -0700 (PDT) X-Google-Smtp-Source: ABdhPJypESnciJm57HtcG4GZN0hakTYmWS/jouVcL0GWbveGMbF+bO33ySI1WDZ+jLXdFPL8XyZs X-Received: by 2002:a17:902:6b0c:b0:13f:aaf4:3db4 with SMTP id o12-20020a1709026b0c00b0013faaf43db4mr5373642plk.46.1634825004101; Thu, 21 Oct 2021 07:03:24 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1634825004; cv=none; d=google.com; s=arc-20160816; b=xcxKiPcIk5V7HXJRv9r0CceNnY+J6BHW5he1tj9VnF+JGFcBSrz5/RRaO3pvy1Rfxe rE2B6Jhi12j8+9RqJegOVK6+v8QmL1fYToJ7ulfS2D+QaquPnM4qzx/dqBBi0TBkO+zo kI+PXx9J50UZSrhqWzjWuuxsOLEMQ8ZzLTW004b+IKWz/d9TI9nKbK5dSsIH7xdKT/v7 Z+oRVjuCRwnQ9eLf2xWkVQzR2SpJOOZIeqlxxzc/dnjAff1CHusJGPjoMbRlERXzUo3L mnYqRwYr4oWlmxjdpSVBFWeOc6TTrtpNAkkHl10Lg4yDkDdGWBAIQN2z+dab1CW+tNOS MNFA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:user-agent:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date :dkim-signature:dkim-filter; bh=s3dy4Ehxo8S4MO7AqhWht9Cy3DylkZkhu0SEN5aynSw=; b=arAq+nP2X6xB3SviGVa72MTfcCXWTLuZUPpy4mjqBN3Y+3l6UFz/mEc3YLTXt7SgO7 L936r4h6UquOYcQgr4ucQaUC8FDFUrm/c2szSsrJGBiB7BZQjvzcmrfZlfrHHOLxtmJM P/+JCQoBr49wc0rKoB/6wqRJpEl+r5/NSfyFCH27rBMrwZwv0p6P85AfmUUyTKNDh4z3 swaFNVxYWmoG/Ys3JebO0kx4JCMT6avb97MH1pW7IBvPzfjZYn8fBS54OLntQVVP5f+G Gg5SvIGPsw6ZuEfrL8WMLG/W0iSTy+liuGTZYkhjFs/t3PL8n65vBS1kJcJUpoWsb1mA tOeQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@fieldses.org header.s=default header.b="y42Iu/O5"; spf=pass (google.com: domain of linux-nfs-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-nfs-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 z19si7607633pgi.588.2021.10.21.07.02.47; Thu, 21 Oct 2021 07:03:24 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-nfs-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@fieldses.org header.s=default header.b="y42Iu/O5"; spf=pass (google.com: domain of linux-nfs-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-nfs-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230072AbhJUOFB (ORCPT + 99 others); Thu, 21 Oct 2021 10:05:01 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:33188 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229878AbhJUOFB (ORCPT ); Thu, 21 Oct 2021 10:05:01 -0400 Received: from fieldses.org (fieldses.org [IPv6:2600:3c00:e000:2f7::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id E53D5C0613B9 for ; Thu, 21 Oct 2021 07:02:43 -0700 (PDT) Received: by fieldses.org (Postfix, from userid 2815) id 57D5E647C; Thu, 21 Oct 2021 10:02:43 -0400 (EDT) DKIM-Filter: OpenDKIM Filter v2.11.0 fieldses.org 57D5E647C DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=fieldses.org; s=default; t=1634824963; bh=s3dy4Ehxo8S4MO7AqhWht9Cy3DylkZkhu0SEN5aynSw=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=y42Iu/O5T1L4jUd9IHveATzXP7ppE/FksMuGjNLS6ruMN4ag9FIuPrN8YWiLmyxPP 4lBNsWVZ1DPdnm1wOXTRTSlEEGBoDlJHTVFYDt5C4xcAybwvv0Jq2amF/gZKOI/A9u 6IMT8nYs93fk1v1ChyMxvcxO/EX9IDuxBLICIKhE= Date: Thu, 21 Oct 2021 10:02:43 -0400 From: Bruce Fields To: dai.ngo@oracle.com Cc: Linux NFS Mailing List , Steve Dickson , Olga Kornievskaia , Chuck Lever Subject: Re: server-to-server copy by default Message-ID: <20211021140243.GB25711@fieldses.org> References: <20211020155421.GC597@fieldses.org> <18E32DF5-3F1D-4C23-8C2F-A7963103CF8C@oracle.com> <8b1eb564-974d-00b6-397a-d92f301df7d8@oracle.com> <20211020202907.GF597@fieldses.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.21 (2010-09-15) Precedence: bulk List-ID: X-Mailing-List: linux-nfs@vger.kernel.org Thanks for the persistence: On Wed, Oct 20, 2021 at 10:00:41PM -0700, dai.ngo@oracle.com wrote: > The attack can come from the replies of the source server or requests > from the source server to the destination server via the back channel. > One of possible attack in the reply is BAD_STATEID which was handled > by the client code as mentioned by Olga. > > Here is the list of NFS requests made from the destination to the > source server: > > EXCHANGE_ID > CREATE_SESSION > RECLAIM_COMLETE > SEQUENCE > PUTROOTFH > PUTHF > GETFH > GETATTR > READ/READ_PLUS > DESTROY_SESSION > DESTROY_CLIENTID > > Do you think we should review all replies from these requests to make > sure error replies do not cause problems for the destination server? That's the exactly the sort of analysis I was curious to see, yes. (I doubt the PUTROOTFH, PUTFH, GETFH, and GETATTR are really necessary, I wonder if there's any way we could just bypass them in our case. I don't know, maybe that's more trouble than it's worth.) > same for the back channel ops: > > OP_CB_GETATTR > OP_CB_RECALL > OP_CB_LAYOUTRECALL > OP_CB_NOTIFY > OP_CB_PUSH_DELEG > OP_CB_RECALL_ANY > OP_CB_RECALLABLE_OBJ_AVAIL > OP_CB_RECALL_SLOT > OP_CB_SEQUENCE > OP_CB_WANTS_CANCELLED > OP_CB_NOTIFY_LOCK > OP_CB_NOTIFY_DEVICEID > OP_CB_OFFLOAD There shouldn't be any need for callbacks at all. We might be able to get away without even setting up a backchannel. But, yes, if the server tries to send one anyway, it'd be good to know we do something reasonable. --b.