Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp3717339imu; Mon, 7 Jan 2019 08:13:34 -0800 (PST) X-Google-Smtp-Source: ALg8bN4ppvYLSrId25IycQAFt2tWaAOU5Y2s/Fi1kXCCT0HiiUaeWK/J9mzDhgdkys5u58gmEgfn X-Received: by 2002:a17:902:d68c:: with SMTP id v12mr61128579ply.4.1546877614236; Mon, 07 Jan 2019 08:13:34 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1546877614; cv=none; d=google.com; s=arc-20160816; b=eq/PyLl7EMRa25b9C+dFyFG1+eYvrPRoI2bAuFdrucTmUKOfy/slX8rZ7iF51l4jDi HkSQ7fho9wt5Dv6em8B5/EuqM9ybfZ3XaUm1yCMBVuxdOrUGKNHZTrFKYgyGlza/Yn9h y3Il5nhR8rR24P2icf7Dy08f5ghp93uXH0iCbwJIwqtESEJ8zZ85Rhb/EKTGBJJHBcpK hnarLs2wY2gaeCAzHHoeIrv/0zeLUkkVJ0paE/7XhZPDuglOTm41hKcShbKICoYlQcQJ TMOa441Vn8HbYmfIDVmvf0WJrny0ge5XiBo+T518x81Zi4u/Cgge4w9i8L0Mw5Tp0xuq te7g== 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:dkim-signature; bh=3JOrvzg4vR0ruJthqRFrx93ugxk64MYgy9Ow6h+hDFM=; b=Ca769Gm7OoOVd+38RBbue9jrfYy6QswbMsdVwz/U/8df6QX8ufwjRI+I02/MRttneU mIodw0SAZ1GA747KDBAlLCVht/wGYboe8f3qkitHlLnjXq1r8PtC/mHJocUSvC1KsWvo HWVuhTgzBKgaGpiYNEBkwyJnuRigE17Ee1a9eJr3C6Oa+BZof8KVgzYjm3xgSuo6+Oac h0QGZRaLFRNX8fWSPncwAWahdQZvvSw24pjyR1Ij+gNRumKcpaO5yGmAiGQ85c7DCV/3 UnGnIMt+RllmKt/Kb9I4DHu9aE6DSZ3hezemgkrd+nzFnbX0aajqDcOvqUo6FupQPMnX MaFg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=VOEpOpu1; 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 q73si8554627pfi.205.2019.01.07.08.13.18; Mon, 07 Jan 2019 08:13:34 -0800 (PST) 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=@kernel.org header.s=default header.b=VOEpOpu1; 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 S1730028AbfAGM6l (ORCPT + 99 others); Mon, 7 Jan 2019 07:58:41 -0500 Received: from mail.kernel.org ([198.145.29.99]:46258 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730018AbfAGM6j (ORCPT ); Mon, 7 Jan 2019 07:58:39 -0500 Received: from localhost (5356596B.cm-6-7b.dynamic.ziggo.nl [83.86.89.107]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 57615206BB; Mon, 7 Jan 2019 12:58:38 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1546865918; bh=uC8bQhr7vA1U0vobe1Xh0Rmjk/lAhtyZ2vdWrv44/EY=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=VOEpOpu1Li81kvESJQjIXvL4Tup4x/mc4+D+BUzhRYR6ncHQRN6AHUxauouZv76lN pLIx2/9MUWwk9MhpyAbm3HGntEHy/fBXyL8uA8QhwbAU4TUfSSDjwozc/xn1DXSikb SeAqWhHITRrX5VEDsyxRXwywp48N6rUVrCjx/UR0= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Paul Aurich , Yves-Alexis Perez , Steve French , Ronnie Sahlberg Subject: [PATCH 4.19 158/170] smb3: fix large reads on encrypted connections Date: Mon, 7 Jan 2019 13:33:05 +0100 Message-Id: <20190107104511.589810428@linuxfoundation.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20190107104452.953560660@linuxfoundation.org> References: <20190107104452.953560660@linuxfoundation.org> User-Agent: quilt/0.65 X-stable: review X-Patchwork-Hint: ignore 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.19-stable review patch. If anyone has any objections, please let me know. ------------------ From: Paul Aurich commit 6d2f84eee098540ae857998fe32f29b9e2cd9613 upstream. When passing a large read to receive_encrypted_read(), ensure that the demultiplex_thread knows that a MID was processed. Without this, those operations never complete. This is a similar issue/fix to lease break handling: commit 7af929d6d05ba5564139718e30d5bc96bdbc716a ("smb3: fix lease break problem introduced by compounding") CC: Stable # 4.19+ Fixes: b24df3e30cbf ("cifs: update receive_encrypted_standard to handle compounded responses") Signed-off-by: Paul Aurich Tested-by: Yves-Alexis Perez Signed-off-by: Steve French Reviewed-by: Ronnie Sahlberg Signed-off-by: Greg Kroah-Hartman --- fs/cifs/smb2ops.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) --- a/fs/cifs/smb2ops.c +++ b/fs/cifs/smb2ops.c @@ -3184,8 +3184,10 @@ smb3_receive_transform(struct TCP_Server } /* TODO: add support for compounds containing READ. */ - if (pdu_length > CIFSMaxBufSize + MAX_HEADER_SIZE(server)) + if (pdu_length > CIFSMaxBufSize + MAX_HEADER_SIZE(server)) { + *num_mids = 1; return receive_encrypted_read(server, &mids[0]); + } return receive_encrypted_standard(server, mids, bufs, num_mids); }