Received: by 10.192.165.148 with SMTP id m20csp2535836imm; Sun, 22 Apr 2018 09:04:15 -0700 (PDT) X-Google-Smtp-Source: AIpwx4/cvCTv1qlNYaPKhjKGlyEbT4EIZdljQksyt4XyLXksoSTxmKb2ZP4FCzFIwgrWVF767geO X-Received: by 10.99.177.5 with SMTP id r5mr14077979pgf.186.1524413054953; Sun, 22 Apr 2018 09:04:14 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1524413054; cv=none; d=google.com; s=arc-20160816; b=aGXrKM3XGXCafg6VhWSE/VhwIUArjpvGiEjFAC8Uln2LPBzox8If67pcopS7wZxIha pBfDgcege1sQHfXwSLq3P4chJNTcPmJpKKTgNMyyeWYyZE9hE7nzNk+DH8jRMbuLK1Uw oWhJZYTgDEmWIeknuafCByJXvj6MB1HQYLnllWuSx5i2srMgs1umRCgnZ6OcrsQfsWnQ jJrOKZVwh+Wjfw5CwHFHyF7ggKLzUOJ5uDO7ivMh3e52b2iXjtWxTk7VYihCkgP318yB /YZwhIpLbc5oaKqdLOD42ZfY1FDQLmkyYlsG5NVtCuKF1iRrYNxpvuUo1GRBytu0B4Uc DbjQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:user-agent:references :in-reply-to:message-id:date:subject:cc:to:from :arc-authentication-results; bh=rH9jI40FsD13etsZIa1uMIMIreP0graKX0Whsi29Xf8=; b=hluMNgaEJbCGjtzkaCyDUpFMszetcjdda4SGpmlig6dp/kt8TOYU+EGMuWgnQzwkS5 CwKdkV/yxGuO56PGlKFs91ds2F+157yUXv9n5Xv+kZ7XMtmJx0a40TtuME9bbdEsSO7Q nGqC2XLknSV9ItAaM0UFsB+MDUcU1rMa8Fs5PQVIt+8JAbh8IHiFbyoZ3KCqXfcxwRna 6DIIRrymZOcpiu9CmoeJGdp1HrGfEYSXoARB5bHoOYBnm87NYLZumbZNIJLVI5rE/3Mn /ZitAhZtmccLAc1t6hrlLnjgAsgU2IOJXqPSBpnolJWvG86SV3TqfzYTP1HJYWXMLo4M KU5w== 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 m9si2128086pgn.665.2018.04.22.09.04.00; Sun, 22 Apr 2018 09:04:14 -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 S1754315AbeDVQC4 (ORCPT + 99 others); Sun, 22 Apr 2018 12:02:56 -0400 Received: from mail.linuxfoundation.org ([140.211.169.12]:46058 "EHLO mail.linuxfoundation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751301AbeDVN6E (ORCPT ); Sun, 22 Apr 2018 09:58:04 -0400 Received: from localhost (LFbn-1-12247-202.w90-92.abo.wanadoo.fr [90.92.61.202]) by mail.linuxfoundation.org (Postfix) with ESMTPSA id 55A6CCD8; Sun, 22 Apr 2018 13:58:03 +0000 (UTC) From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Steve French , Pavel Shilovsky Subject: [PATCH 4.16 047/196] Tree connect for SMB3.1.1 must be signed for non-encrypted shares Date: Sun, 22 Apr 2018 15:51:07 +0200 Message-Id: <20180422135106.507450484@linuxfoundation.org> X-Mailer: git-send-email 2.17.0 In-Reply-To: <20180422135104.278511750@linuxfoundation.org> References: <20180422135104.278511750@linuxfoundation.org> User-Agent: quilt/0.65 X-stable: review MIME-Version: 1.0 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 4.16-stable review patch. If anyone has any objections, please let me know. ------------------ From: Steve French commit 6188f28bf608ddecc2377663b0f2f709440c19ba upstream. SMB3.1.1 tree connect was only being signed when signing was mandatory but needs to always be signed (for non-guest users). See MS-SMB2 section 3.2.4.1.1 Signed-off-by: Steve French Reviewed-by: Pavel Shilovsky CC: Stable Signed-off-by: Greg Kroah-Hartman --- fs/cifs/smb2pdu.c | 5 +++++ 1 file changed, 5 insertions(+) --- a/fs/cifs/smb2pdu.c +++ b/fs/cifs/smb2pdu.c @@ -1280,6 +1280,11 @@ SMB2_tcon(const unsigned int xid, struct iov[1].iov_base = unc_path; iov[1].iov_len = unc_path_len; + /* 3.11 tcon req must be signed if not encrypted. See MS-SMB2 3.2.4.1.1 */ + if ((ses->server->dialect == SMB311_PROT_ID) && + !encryption_required(tcon)) + req->sync_hdr.Flags |= SMB2_FLAGS_SIGNED; + rc = smb2_send_recv(xid, ses, iov, 2, &resp_buftype, flags, &rsp_iov); cifs_small_buf_release(req); rsp = (struct smb2_tree_connect_rsp *)rsp_iov.iov_base;