From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from flow-b6-smtp.messagingengine.com (flow-b6-smtp.messagingengine.com [202.12.124.141]) (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 2AE344052DE; Mon, 24 Aug 2026 13:52:51 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=202.12.124.141 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1787579572; cv=none; b=ioKfoQrikHmGz4cT39RAvI2UNUImtIC6n5bPJpi5xkP3qkCDSHDemM3h9Z1oOf2+8wR2DlwtGGGsps3/AAZMlSnX8oCtqUvilo1r8CyQYyH86d6/TrF6WiyrmG8WpEcHkeB7oEVKetD63QwGmbNDLium49j5i9c/vghf+M/Ad34= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1787579572; c=relaxed/simple; bh=fUfjUCkiaM90io/n8Y7zz+NQRpbgcwJgatrGWCPIf2k=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=dHvv8flOyaY6P55/Yi8MzBimD6pWkGHOjfhnkOvhv4WFqgkTH0WNspv61zKhii/Excaxap0VDU655Dob57crl7Im5rz9Iy6qb81Q/HskOg5DGCIgZoJZa91IeW6FHXP2zte975S9TXRrvN4K1CdqaVbhLtaC505pmZmnApwATPk= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=kroah.com; spf=pass smtp.mailfrom=kroah.com; dkim=pass (2048-bit key) header.d=kroah.com header.i=@kroah.com header.b=G6vz/uwB; dkim=pass (2048-bit key) header.d=messagingengine.com header.i=@messagingengine.com header.b=k0OgL+8/; arc=none smtp.client-ip=202.12.124.141 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=kroah.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=kroah.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kroah.com header.i=@kroah.com header.b="G6vz/uwB"; dkim=pass (2048-bit key) header.d=messagingengine.com header.i=@messagingengine.com header.b="k0OgL+8/" Received: from phl-compute-05.internal (phl-compute-05.internal [10.202.2.45]) by mailflow.stl.internal (Postfix) with ESMTP id B3FA01300084; Mon, 24 Aug 2026 09:52:49 -0400 (EDT) Received: from phl-frontend-03 ([10.202.2.162]) by phl-compute-05.internal (MEProxy); Mon, 24 Aug 2026 09:52:50 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kroah.com; h=cc :cc:content-type:content-type:date:date:from:from:in-reply-to :in-reply-to:message-id:mime-version:references:reply-to:subject :subject:to:to; s=fm3; t=1787579569; x=1787586769; bh=zD00BnjS9t sCP+uch931+VaqPVYRemIFkBWowtNOyZA=; b=G6vz/uwBrBJbGD9KPp6R6rpDT4 x9qUAI0yUYMB99QZaRFSRHD+laZWtSFYySDls8y8mZf8XZ9DKONeXHD+E+hyipqj Ex7CKV+D9/04tnWV34dpicZq+0MiUei2BwVL0DRDW2gVpo2ylK+DFcHV9D7idq+1 jQ1IkgagtGlq8dwVz61kcAlg4UCu2ZoHuuEc6ItXouqDjlyNkxshHIpJAcXuv+u5 fqpP9RIH1IlTht5o88+fOD3Rygif/A4VQ8mKht8sEo5E9zMgEGhs1SikLhOyFsTn 2u2YDL63Or60+4xjSOn3/oumODArME5KZVg8mF5xZnocdPxlWm1ccuWPRgsw== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-type:content-type:date:date :feedback-id:feedback-id:from:from:in-reply-to:in-reply-to :message-id:mime-version:references:reply-to:subject:subject:to :to:x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s=fm3; t= 1787579569; x=1787586769; bh=zD00BnjS9tsCP+uch931+VaqPVYRemIFkBW owtNOyZA=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ME-Proxy: Feedback-ID: i787e41f1:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Mon, 24 Aug 2026 09:52:48 -0400 (EDT) Date: Mon, 24 Aug 2026 15:52:45 +0200 From: Greg KH To: "Miguel Gazquez (Schneider Electric)" Cc: stable@vger.kernel.org, Christoph Hellwig , "Darrick J. Wong" , linux-xfs@vger.kernel.org, linux-fsdevel@vger.kernel.org, Thomas Petazzoni , linux-kernel@vger.kernel.org, Joanne Koong , syzbot@syzkaller.appspotmail.com, Brian Foster , Christoph Hellwig , Christian Brauner , Sasha Levin Subject: Re: [PATCH 5.10.y] iomap: adjust read range correctly for non-block-aligned positions Message-ID: <2026082434-freeway-legwarmer-84e6@gregkh> References: <20260820-cve-2025-68974-5-10-v1-1-26ff0db1f8e8@bootlin.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20260820-cve-2025-68974-5-10-v1-1-26ff0db1f8e8@bootlin.com> On Thu, Aug 20, 2026 at 07:03:07PM +0200, Miguel Gazquez (Schneider Electric) wrote: > From: Joanne Koong > > [ Upstream commit 7aa6bc3e8766990824f66ca76c19596ce10daf3e ] > > iomap_adjust_read_range() assumes that the position and length passed in > are block-aligned. This is not always the case however, as shown in the > syzbot generated case for erofs. This causes too many bytes to be > skipped for uptodate blocks, which results in returning the incorrect > position and length to read in. If all the blocks are uptodate, this > underflows length and returns a position beyond the folio. > > Fix the calculation to also take into account the block offset when > calculating how many bytes can be skipped for uptodate blocks. > > Signed-off-by: Joanne Koong > Tested-by: syzbot@syzkaller.appspotmail.com > Reviewed-by: Brian Foster > Reviewed-by: Christoph Hellwig > Signed-off-by: Christian Brauner > Signed-off-by: Sasha Levin > Signed-off-by: Miguel Gazquez (Schneider Electric) > --- > fs/iomap/buffered-io.c | 19 +++++++++++++------ > 1 file changed, 13 insertions(+), 6 deletions(-) Don't we also need this for 5.15.y first? thanks, greg k-h