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=-6.8 required=3.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH,MAILING_LIST_MULTI, SIGNED_OFF_BY,SPF_HELO_NONE,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 0F0B8C43603 for ; Sat, 7 Dec 2019 12:06:37 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id CFDCC21835 for ; Sat, 7 Dec 2019 12:06:36 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1575720396; bh=YfW3/WX2wrq8Z9VkdvdjAQ7/ux48Wwy6Dqm54nTYttA=; h=Subject:To:Cc:From:Date:List-ID:From; b=e20XKyzneZiF7lyPpQOm4p8yG7Sb6g/ofG1Cdyk41f4I3oeq9uSGp9qbufwBi/LE+ PNV5ufp7uAzHOukhnoQp4a4Cfp6HQCOLnxnQ6HrWv+nw4KBvv0eI08Yz08tgIhLRFQ wYiXP/Puf6JalMpFyRzzwDO41VnYKjX5MjFR0OSM= Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726263AbfLGMGg (ORCPT ); Sat, 7 Dec 2019 07:06:36 -0500 Received: from out3-smtp.messagingengine.com ([66.111.4.27]:54463 "EHLO out3-smtp.messagingengine.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726185AbfLGMGg (ORCPT ); Sat, 7 Dec 2019 07:06:36 -0500 Received: from compute6.internal (compute6.nyi.internal [10.202.2.46]) by mailout.nyi.internal (Postfix) with ESMTP id 65E31227DA; Sat, 7 Dec 2019 07:06:35 -0500 (EST) Received: from mailfrontend2 ([10.202.2.163]) by compute6.internal (MEProxy); Sat, 07 Dec 2019 07:06:35 -0500 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=fm1; bh=oDLmLQ 9+GVg5qM6PlBvSbVOJftauMaeESVkdUaLuSRQ=; b=GMT80e1d5qVEFERJ+Q5aSz o8LT3oX7lIP+msHlw7qcWv+utHyqi1ptJfxbMYOFsyPZkdSqBAWcuMnDURseVLT3 UU8/o5f6YthKYSwF/q6sJ0cIIvh3fgMuQgI5c7AibkkESMTpXQl0g1ozJJUQXGRE htgrAiuG9aAMzsMu+UNr/mdG+bvTSl0IvCbW8lzMspTCwiMzQuwwjVXG42eIOVlg eal+sUqLtd3imfHc1b8gMOd/r9vqRy3xGHDCq53uRMbGjh8av+xZNiZmRVgsfXGr ewKsQm9GP9RuU2y5UjLYGMcweC9LiwT2jmgHsmUW7Tb2cQKAxv7uyu2pAG23qPTQ == X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedufedrudekhedgfeelucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucenucfjughrpefuvffhfffkgggtgfesthekredttd dtlfenucfhrhhomhepoehgrhgvghhkhheslhhinhhugihfohhunhgurghtihhonhdrohhr gheqnecukfhppeekfedrkeeirdekledruddtjeenucfrrghrrghmpehmrghilhhfrhhomh epghhrvghgsehkrhhorghhrdgtohhmnecuvehluhhsthgvrhfuihiivgeptd 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 E7041306036F; Sat, 7 Dec 2019 07:06:34 -0500 (EST) Subject: FAILED: patch "[PATCH] fuse: verify write return" failed to apply to 5.3-stable tree To: mszeredi@redhat.com, stable@vger.kernel.org Cc: From: Date: Sat, 07 Dec 2019 13:06:33 +0100 Message-ID: <157572039317983@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 5.3-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 8aab336b14c115c6bf1d4baeb9247e41ed9ce6de Mon Sep 17 00:00:00 2001 From: Miklos Szeredi Date: Tue, 12 Nov 2019 11:49:04 +0100 Subject: [PATCH] fuse: verify write return Make sure filesystem is not returning a bogus number of bytes written. Fixes: ea9b9907b82a ("fuse: implement perform_write") Cc: # v2.6.26 Signed-off-by: Miklos Szeredi diff --git a/fs/fuse/file.c b/fs/fuse/file.c index db48a5cf8620..795d0f24d8b4 100644 --- a/fs/fuse/file.c +++ b/fs/fuse/file.c @@ -1096,6 +1096,8 @@ static ssize_t fuse_send_write_pages(struct fuse_io_args *ia, ia->write.in.flags = fuse_write_flags(iocb); err = fuse_simple_request(fc, &ap->args); + if (!err && ia->write.out.size > count) + err = -EIO; offset = ap->descs[0].offset; count = ia->write.out.size;