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 CB11EC43603 for ; Sat, 7 Dec 2019 12:06:44 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 9CADD21835 for ; Sat, 7 Dec 2019 12:06:44 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1575720404; bh=Hw2membLNmAgjhpfIvQgMbFPeq7/Gas1ox14oMY8yR4=; h=Subject:To:Cc:From:Date:List-ID:From; b=VGc9MiiFH/Qj019uClIY7pn+iS9zi0gybyfagklcRvqB7Zkz/QiVyUJuxygwxm+Ya EGIs81GWOJChAOMeEfnBHpwDD7YWwNMcAUQ79jb5miCCGbkqlUJ7U3KhPQE8VHEuTX /626yuUeTW5P7VLZBcUV13CDI6SR2lKGAYRKvvjs= Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726289AbfLGMGo (ORCPT ); Sat, 7 Dec 2019 07:06:44 -0500 Received: from out3-smtp.messagingengine.com ([66.111.4.27]:53535 "EHLO out3-smtp.messagingengine.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726185AbfLGMGo (ORCPT ); Sat, 7 Dec 2019 07:06:44 -0500 Received: from compute6.internal (compute6.nyi.internal [10.202.2.46]) by mailout.nyi.internal (Postfix) with ESMTP id 389C8227DF; Sat, 7 Dec 2019 07:06:43 -0500 (EST) Received: from mailfrontend2 ([10.202.2.163]) by compute6.internal (MEProxy); Sat, 07 Dec 2019 07:06:43 -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=oNGTzK 64nE6g0JpClNeaHIqjpK4m1JY4WPSXBh33jto=; b=mIERyxd7qWHTi8o9rF8aD2 HVnuObbPw+7uB1yaicnqjFbw6KWsXA+wpyYnz3keGSE0Z1XZmT8q9tUSifTiUE+k 3WqvqYJoPPRxfwwjwmvnbiKMVTNYqRdUgJIJzMLf009ChlF940bPwQ06LBqIVg1f z6cCFkoOlCyusIoNaBv7QeNFucaXFLodA0y2OkkO05PQPJOVkTps/iJSTofXcuqJ Z3nUrWMyc3yh+LZ7ADV7wFOea4q3mxveFQNixkcbME8uU5Covmp5j2k45A6td95l hF78VhtUBih6ctbyTsNUIbka6HGTJ0c8AGls07OegV/7si5svylDTNFevbnLUzyQ == X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedufedrudekhedgfeelucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucenucfjughrpefuvffhfffkgggtgfesthekredttd dtlfenucfhrhhomhepoehgrhgvghhkhheslhhinhhugihfohhunhgurghtihhonhdrohhr gheqnecukfhppeekfedrkeeirdekledruddtjeenucfrrghrrghmpehmrghilhhfrhhomh epghhrvghgsehkrhhorghhrdgtohhmnecuvehluhhsthgvrhfuihiivgepud 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 CE288306035B; Sat, 7 Dec 2019 07:06:42 -0500 (EST) Subject: FAILED: patch "[PATCH] fuse: verify write return" failed to apply to 4.19-stable tree To: mszeredi@redhat.com, stable@vger.kernel.org Cc: From: Date: Sat, 07 Dec 2019 13:06:33 +0100 Message-ID: <157572039319182@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 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;