From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-7.0 required=3.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH,MAILING_LIST_MULTI, SIGNED_OFF_BY,SPF_PASS autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 36CD8C10F0E for ; Mon, 15 Apr 2019 08:31:18 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 061C020651 for ; Mon, 15 Apr 2019 08:31:18 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1555317078; bh=xZytR+zcPaQb7NQ4lkxOYnFhfwrfrhOqG4KxWuIBmi8=; h=Subject:To:Cc:From:Date:List-ID:From; b=z1pE7VxPkLK5TdtzfUrZgANYWrr2Xxxm7utN9EYXCb/RIbC2Z5muYTtLdR/P++DQQ 2yd9BWHm5JROHj+yF11rwv7kiM8NgNweYInJ5z7qL5eCYB8GhSpu2wUrclb0zj3qcm 1gGiejAejy3W+QUrYyl/a2Ccnjl52Cw+YAIH78Go= Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1725972AbfDOIbR (ORCPT ); Mon, 15 Apr 2019 04:31:17 -0400 Received: from out1-smtp.messagingengine.com ([66.111.4.25]:34693 "EHLO out1-smtp.messagingengine.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725779AbfDOIbR (ORCPT ); Mon, 15 Apr 2019 04:31:17 -0400 Received: from compute6.internal (compute6.nyi.internal [10.202.2.46]) by mailout.nyi.internal (Postfix) with ESMTP id 5835C22331; Mon, 15 Apr 2019 04:31:16 -0400 (EDT) Received: from mailfrontend1 ([10.202.2.162]) by compute6.internal (MEProxy); Mon, 15 Apr 2019 04:31:16 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-transfer-encoding:content-type :date:from:message-id:mime-version:subject:to:x-me-proxy :x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s=fm2; bh=Qgo7cD qayaWIKpscxj/ONRzSX52Ex++dNJJ3SrWkFG4=; b=ZHRwBlm+Bj6/YzyZyosrbv MkXd2Fmaj5H/C+u1H8QV0+x8vc+1+szs1YLYXH6XlmH1XewGkjta6utzS6eK5VlF EkgZyuTnp6LHL4KE3RVdxuVh7NUmBKS1TWCNekyjVzfM55WZ4IuPsdlb/peWzulS cbF2finK6Ub4ZFjRVXrzyW8TfbpA51CRIRZ+ZbUZJBWfO7c8VJrAE+PU6KxOrDs2 FIaCyZLYJ9YtFPWhwO/F9633eoeh5Bw9Ism/Go90cZ07QFVveSQbV6FrHxMDL59p t/WLn9lEBN5wC90YczTj35y/v18b11XXQ/lcjNn32MaWLfiEWqMZfmw2fXd5+wDQ == X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeduuddrvdelgddtgecutefuodetggdotefrodftvf curfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfghnecu uegrihhlohhuthemuceftddtnecunecujfgurhepuffvhfffkfggtgfgsehtkeertddttd flnecuhfhrohhmpeeoghhrvghgkhhhsehlihhnuhigfhhouhhnuggrthhiohhnrdhorhhg qeenucfkphepkeefrdekiedrkeelrddutdejnecurfgrrhgrmhepmhgrihhlfhhrohhmpe hgrhgvgheskhhrohgrhhdrtghomhenucevlhhushhtvghrufhiiigvpeeg X-ME-Proxy: Received: from localhost (83-86-89-107.cable.dynamic.v4.ziggo.nl [83.86.89.107]) by mail.messagingengine.com (Postfix) with ESMTPA id B2259E409D; Mon, 15 Apr 2019 04:31:15 -0400 (EDT) Subject: FAILED: patch "[PATCH] cifs: a smb2_validate_and_copy_iov failure does not mean the" failed to apply to 4.14-stable tree To: lsahlber@redhat.com, pshilov@microsoft.com, stable@vger.kernel.org, stfrench@microsoft.com Cc: From: Date: Mon, 15 Apr 2019 10:31:12 +0200 Message-ID: <155531707222061@kroah.com> MIME-Version: 1.0 Content-Type: text/plain; charset=ANSI_X3.4-1968 Content-Transfer-Encoding: 8bit Sender: stable-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: stable@vger.kernel.org The patch below does not apply to the 4.14-stable tree. If someone wants it applied there, or to any other stable or longterm tree, then please email the backport, including the original git commit id to . thanks, greg k-h ------------------ original commit in Linus's tree ------------------ >From 4811e3096daaa56e145a1d2bec45e2e9fe790729 Mon Sep 17 00:00:00 2001 From: Ronnie Sahlberg Date: Mon, 1 Apr 2019 09:53:44 +1000 Subject: [PATCH] cifs: a smb2_validate_and_copy_iov failure does not mean the handle is invalid. It only means that we do not have a valid cached value for the file_all_info structure. CC: Stable Signed-off-by: Ronnie Sahlberg Signed-off-by: Steve French Reviewed-by: Pavel Shilovsky diff --git a/fs/cifs/smb2ops.c b/fs/cifs/smb2ops.c index b22be10ee980..00225e699d03 100644 --- a/fs/cifs/smb2ops.c +++ b/fs/cifs/smb2ops.c @@ -733,14 +733,12 @@ int open_shroot(unsigned int xid, struct cifs_tcon *tcon, struct cifs_fid *pfid) qi_rsp = (struct smb2_query_info_rsp *)rsp_iov[1].iov_base; if (le32_to_cpu(qi_rsp->OutputBufferLength) < sizeof(struct smb2_file_all_info)) goto oshr_exit; - rc = smb2_validate_and_copy_iov( + if (!smb2_validate_and_copy_iov( le16_to_cpu(qi_rsp->OutputBufferOffset), sizeof(struct smb2_file_all_info), &rsp_iov[1], sizeof(struct smb2_file_all_info), - (char *)&tcon->crfid.file_all_info); - if (rc) - goto oshr_exit; - tcon->crfid.file_all_info_is_valid = 1; + (char *)&tcon->crfid.file_all_info)) + tcon->crfid.file_all_info_is_valid = 1; oshr_exit: mutex_unlock(&tcon->crfid.fid_mutex);