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 0F0F7C10F0E for ; Mon, 15 Apr 2019 08:31:16 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id D452620833 for ; Mon, 15 Apr 2019 08:31:15 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1555317075; bh=7w3Fe82jca01K12cOdPzc6IYV2rK6E3rSMTLzCn3/mw=; h=Subject:To:Cc:From:Date:List-ID:From; b=D6EJJ1cEOEeSfGaOa+Bot+4iO3TjQiKxQv5X7BG4/3rqxCziE16qWrOrVJDdNUM10 GnlJPLqjs0SpLQIbxpAiUbVXen4o40BRUJlLIvpHBKsZ3wqppNbM6Xyc4B7IBzmk0K OxxhQpPe1eqiaUoNqZzEkYvXEZnrLaJ3ck9HuCWk= Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1725794AbfDOIbP (ORCPT ); Mon, 15 Apr 2019 04:31:15 -0400 Received: from out1-smtp.messagingengine.com ([66.111.4.25]:46805 "EHLO out1-smtp.messagingengine.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725972AbfDOIbP (ORCPT ); Mon, 15 Apr 2019 04:31:15 -0400 Received: from compute6.internal (compute6.nyi.internal [10.202.2.46]) by mailout.nyi.internal (Postfix) with ESMTP id 7D80525C9F; Mon, 15 Apr 2019 04:31:14 -0400 (EDT) Received: from mailfrontend1 ([10.202.2.162]) by compute6.internal (MEProxy); Mon, 15 Apr 2019 04:31:14 -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=kbyeDX 589cCQpl0e0MweWCrPIWkoMY9Uy4/c3DQXkJc=; b=avzZ9L4fw509uL5UKKuizr bCn68hK7kCASyUNYI2B1HTMBwjfLGU8NEtcaeYpbAtOcmmi1atcp1GKsc+tHAxTp bKb+V0lhpty2XTLl5pk+fb1RTbLQNEVHmRP82zLNSI/aIgSqLdI8SRL9SNezDff2 eCjhVi8yWHpCEooM24JxiKmhSdDmr5YYyUgwg0gti2KhUEKks9QIu+BvC/yhBE5X N6mO3m7vm3VjCP8QoRHG6l2XQXvrL6ttEixFmwu0O4/e7mG+KxVQfCzTqp3gdww8 lcWhZmjxiLQPIpBX0FSn07GrfiWOQQzxXnDvLAcLlTHbvpb4McgdqaqzQTaZ3ing == 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 00454E4210; Mon, 15 Apr 2019 04:31:13 -0400 (EDT) Subject: FAILED: patch "[PATCH] cifs: a smb2_validate_and_copy_iov failure does not mean the" failed to apply to 4.19-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:11 +0200 Message-ID: <15553170711023@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.19-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);