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 910F0C43603 for ; Sat, 7 Dec 2019 12:06:47 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 6906721835 for ; Sat, 7 Dec 2019 12:06:47 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1575720407; bh=hhPT0hpAE2Q2THO1trrxZFMbPYmSQ+1UFlnEYqoXNu0=; h=Subject:To:Cc:From:Date:List-ID:From; b=noPQHBdAhdq48eZAz90LRFApcKJybIXhV4a74E3jesUB0znmcqD2N9YtQeb73z0ti QfIwlNLusgOzdbMPrw27oeZ1kuflpWV7OTqTOjwimD62CpWDV0DhqOcq3khJ6VnYA4 aREjp/5lD51dbqoaoJwOZv5bpdpZZDtSjuXD6CBs= Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726371AbfLGMGr (ORCPT ); Sat, 7 Dec 2019 07:06:47 -0500 Received: from out3-smtp.messagingengine.com ([66.111.4.27]:57025 "EHLO out3-smtp.messagingengine.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726185AbfLGMGr (ORCPT ); Sat, 7 Dec 2019 07:06:47 -0500 Received: from compute6.internal (compute6.nyi.internal [10.202.2.46]) by mailout.nyi.internal (Postfix) with ESMTP id 098F8227D5; Sat, 7 Dec 2019 07:06:46 -0500 (EST) Received: from mailfrontend2 ([10.202.2.163]) by compute6.internal (MEProxy); Sat, 07 Dec 2019 07:06:46 -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=oqTFGg QZNsFswHBHRjkEI/Ll/5X2XylSuIbA6PqQT+U=; b=gSLSJvkHOrG9YxeFYlKNVN sS/27ylrB6syoENyS9PTSSa8AZcsSrs1R1f3q+qKJAKorZNM6tW7MXnp1KJpyLlO BZmwhhJtW9HrcC2jottLGbcNgdElakfU/94MyuTr5Z0iczkxlBukn0Lxc+SJhozf W2YMkHfVgqEl1E/JU+g+3Fq9Vc8czdmOFBsMaQzXIUY8CZvK6Xnf1CQL/Kyevc62 yHHEdKVIQHMHQv0iWpg1R87za20GEV5v69sH4vTtxiMfWxc2RgOUb7LtxSdmxHdH NQ/Ap7/VpQ76Q8h56v9L+x0WTBA9DzMEDeRmEhAW7REOmHq8WpxnTdk6t4Pj4Lbg == X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedufedrudekhedgfeelucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucenucfjughrpefuvffhfffkgggtgfesthekredttd dtlfenucfhrhhomhepoehgrhgvghhkhheslhhinhhugihfohhunhgurghtihhonhdrohhr gheqnecukfhppeekfedrkeeirdekledruddtjeenucfrrghrrghmpehmrghilhhfrhhomh epghhrvghgsehkrhhorghhrdgtohhmnecuvehluhhsthgvrhfuihiivgepvd 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 9F4A03060405; Sat, 7 Dec 2019 07:06:45 -0500 (EST) Subject: FAILED: patch "[PATCH] fuse: verify write return" failed to apply to 4.4-stable tree To: mszeredi@redhat.com, stable@vger.kernel.org Cc: From: Date: Sat, 07 Dec 2019 13:06:34 +0100 Message-ID: <1575720394254248@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.4-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;