Received: by 2002:ac0:a582:0:0:0:0:0 with SMTP id m2-v6csp1364521imm; Tue, 2 Oct 2018 07:08:22 -0700 (PDT) X-Google-Smtp-Source: ACcGV61ft4mLgMWJbzcNvG2JKgC8mJ6qyvt3NLUT0L0KxFE2XpJer8sCA6W9JtwD0n4/uaAKGE24 X-Received: by 2002:a17:902:3c5:: with SMTP id d63-v6mr16808273pld.145.1538489302106; Tue, 02 Oct 2018 07:08:22 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1538489301; cv=none; d=google.com; s=arc-20160816; b=S/xG71e10ZLsPbUYGsOQ2ItU50M/sWaNjk+dhVu8ZUGjaltRgl28X3pWu/ELDmAuLv SlnTjCNvpniLmk/B6hdHk9GwpzlWusiOPRb+VNmxHT4vkcS/m9S5VKkDCEj1u9e9WCaT iTrqEJfAE5fTlB/5mhurqnT2/6aBBkimcbYbV305aU2lVaIAwb4dlJiQDqlYvi+GOwc8 ax1BLz4QWTT64C/aLYWQgaoGPdNZUKT144asp7VWBkuvB5MyPb0i4eL27B8at6mHfqCb c2uWV3zDtgPJwRnsXwy4vcoTKZBTTyTsYKFgwsuWhDckJHWTE6CubftmWSRhtmhGiHxJ s/Yg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from; bh=MAGsQkX2OILPOOLD8ak589sKoWWiDLTB0haD+0RbawU=; b=ecw0EI5e1dm3ZigiCYHcw5E9xgS2bQWBK09Lstzq5uP8Lov+AipsTg28v87uRhgZTE 4Fn15fO5ON2M3sy3pJAu/wLSF5BNiXnqBzykyro6CNi4Rz+jzxPlYOYMRogQZ4hdFsxl oFJsFYysZE9nP/UD648MyzIbu7pEzBdlpnow4vxaIMH8wALUsaoTLmGeZVqzQxMWBKQR c5gjQIfhVtTsH9aTgb9YCxgsAQN4wGmcOVMeVrAXbO6MUfXb9mw4qAl+yBUv4oWeo960 MNxSWQmnTr7NF99qXGiPwYCQli/1nu44TF2NtaKsSOo9pKhTgKKayFpcV5ZcsVU2Zj01 cREA== ARC-Authentication-Results: i=1; mx.google.com; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id 23-v6si15130050pgs.356.2018.10.02.07.08.06; Tue, 02 Oct 2018 07:08:21 -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; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729515AbeJBUME (ORCPT + 99 others); Tue, 2 Oct 2018 16:12:04 -0400 Received: from mail.linuxfoundation.org ([140.211.169.12]:32828 "EHLO mail.linuxfoundation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726955AbeJBUMD (ORCPT ); Tue, 2 Oct 2018 16:12:03 -0400 Received: from localhost (24-104-73-23-ip-static.hfc.comcastbusiness.net [24.104.73.23]) by mail.linuxfoundation.org (Postfix) with ESMTPSA id 356BF266; Tue, 2 Oct 2018 13:28:41 +0000 (UTC) From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Jeff Layton , "J. Bruce Fields" , Sasha Levin Subject: [PATCH 4.18 117/228] nfsd: fix corrupted reply to badly ordered compound Date: Tue, 2 Oct 2018 06:23:34 -0700 Message-Id: <20181002132507.304892457@linuxfoundation.org> X-Mailer: git-send-email 2.19.0 In-Reply-To: <20181002132459.032960735@linuxfoundation.org> References: <20181002132459.032960735@linuxfoundation.org> User-Agent: quilt/0.65 X-stable: review MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 4.18-stable review patch. If anyone has any objections, please let me know. ------------------ From: "J. Bruce Fields" [ Upstream commit 5b7b15aee641904ae269be9846610a3950cbd64c ] We're encoding a single op in the reply but leaving the number of ops zero, so the reply makes no sense. Somewhat academic as this isn't a case any real client will hit, though in theory perhaps that could change in a future protocol extension. Reviewed-by: Jeff Layton Signed-off-by: J. Bruce Fields Signed-off-by: Sasha Levin Signed-off-by: Greg Kroah-Hartman --- fs/nfsd/nfs4proc.c | 1 + 1 file changed, 1 insertion(+) --- a/fs/nfsd/nfs4proc.c +++ b/fs/nfsd/nfs4proc.c @@ -1726,6 +1726,7 @@ nfsd4_proc_compound(struct svc_rqst *rqs if (status) { op = &args->ops[0]; op->status = status; + resp->opcnt = 1; goto encode_op; }