From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-alma10-1.taild15c8.ts.net [100.103.45.18]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id BDEAF3C8C75 for ; Mon, 15 Jun 2026 15:34:07 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=100.103.45.18 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1781537648; cv=none; b=H/NdHh7DZzt0XeM3Bza11zSTjgpWigljMUFySkA9Pd3JmWj/gZ/dMrlOhHSYnZIayiNLK6d3v8nFbfe0q9b9dmuVdVQJmgC2QQSfp4/Xpe54PcUZrE+1C9D5A8ErLNzDb3zRa3GffP9yJ1cygKOJo1DHxAsdafDcsfgBuG1dsLQ= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1781537648; c=relaxed/simple; bh=D5CNotpvpoxn1qQQEefSLHZqGWMDRS+ninSk5keLHV4=; h=Subject:To:Cc:From:Date:Message-ID:MIME-Version:Content-Type; b=M5EVzc6DmyWTWAuT+5ByRa0K1KkEq+Sw6d9LH+2reUvu/QkeXh9xsaWIZUamxt6gATd3zm/YX7YM8x+02X3rj7xNd/k2TBEGXye4UHwAFv5LmbfOx6sQAs79BDVtoNTr1rmCZ6IKo63Rey8ldBz+/KO8zEZ9TeEYjdqpywPEr30= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=V2RzgX3e; arc=none smtp.client-ip=100.103.45.18 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b="V2RzgX3e" Received: by smtp.kernel.org (Postfix) with ESMTPSA id BF15A1F000E9; Mon, 15 Jun 2026 15:34:06 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linuxfoundation.org; s=korg; t=1781537647; bh=KABSs6wSwdZCrFWfOe6nPDC4NWShRsnk7zKiJDc+hAU=; h=Subject:To:Cc:From:Date; b=V2RzgX3ee6gMin9/zvs8/xFjZq/tjTZibEyqixmy5sio9Ky1aBq/V2nRv8bpgpmRX HzcMFRzK1EsJSmXwJMnLkHG2i/WctBOS5XYOBPC9OxmwMxextJIl+jZ421yActB2eV 1xNWUpPeGJBpfmNDA6dLCdCglMbQi0CNKkHQ9dbc= Subject: FAILED: patch "[PATCH] fuse: limit FUSE_NOTIFY_RETRIEVE to uptodate folios" failed to apply to 5.15-stable tree To: jannh@google.com,brauner@kernel.org,mszeredi@redhat.com Cc: From: Date: Mon, 15 Jun 2026 16:55:29 +0200 Message-ID: <2026061529-bobtail-crispy-2d65@gregkh> Precedence: bulk X-Mailing-List: stable@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=ANSI_X3.4-1968 Content-Transfer-Encoding: 8bit The patch below does not apply to the 5.15-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 . To reproduce the conflict and resubmit, you may use the following commands: git fetch https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/ linux-5.15.y git checkout FETCH_HEAD git cherry-pick -x 4e3d1b2c48ca6c55f1e9ca7f8dccc76f120f276c # git commit -s git send-email --to '' --in-reply-to '2026061529-bobtail-crispy-2d65@gregkh' --subject-prefix 'PATCH 5.15.y' HEAD^.. Possible dependencies: thanks, greg k-h ------------------ original commit in Linus's tree ------------------ >From 4e3d1b2c48ca6c55f1e9ca7f8dccc76f120f276c Mon Sep 17 00:00:00 2001 From: Jann Horn Date: Tue, 19 May 2026 16:40:34 +0200 Subject: [PATCH] fuse: limit FUSE_NOTIFY_RETRIEVE to uptodate folios FUSE_NOTIFY_RETRIEVE must be limited to uptodate folios; !uptodate folios can contain uninitialized data. Since FUSE_NOTIFY_RETRIEVE is intended to only return data that is already in the page cache and not wait for data from the FUSE daemon, treat !uptodate folios as if they weren't present. This only has security impact on systems that don't enable automatic zero-initialization of all page allocations via CONFIG_INIT_ON_ALLOC_DEFAULT_ON or init_on_alloc=1. Cc: stable@kernel.org Fixes: 2d45ba381a74 ("fuse: add retrieve request") Signed-off-by: Jann Horn Link: https://patch.msgid.link/20260519-fuse-retrieve-uptodate-v1-1-a7a1912a37f9@google.com Acked-by: Miklos Szeredi Signed-off-by: Christian Brauner (Amutable) diff --git a/fs/fuse/dev.c b/fs/fuse/dev.c index 5dda7080f4a9..08d364ed7d6c 100644 --- a/fs/fuse/dev.c +++ b/fs/fuse/dev.c @@ -1912,6 +1912,10 @@ static int fuse_retrieve(struct fuse_mount *fm, struct inode *inode, folio = filemap_get_folio(mapping, index); if (IS_ERR(folio)) break; + if (!folio_test_uptodate(folio)) { + folio_put(folio); + break; + } folio_offset = offset_in_folio(folio, pos); nr_bytes = min(folio_size(folio) - folio_offset, num);