[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <aJnHw78dwyEL4F7U@infradead.org>
Date: Mon, 11 Aug 2025 03:36:51 -0700
From: Christoph Hellwig <hch@...radead.org>
To: liuhuan01@...inos.cn
Cc: cem@...nel.org, djwong@...nel.org, linux-xfs@...r.kernel.org,
linux-kernel@...r.kernel.org
Subject: Re: [PATCH v1] xfs: prevent readdir infinite loop with billions
subdirs
On Fri, Aug 01, 2025 at 04:41:46PM +0800, liuhuan01@...inos.cn wrote:
> From: liuh <liuhuan01@...inos.cn>
>
> When a directory contains billions subdirs, readdir() repeatedly
> got same data and goes to infinate loop.
> The root cause is that the pos gets truncated during assignment.
> Fix it.
This got added in:
15440319767942a363f282d6585303d3d75088ba
Author: Christoph Hellwig <hch@...radead.org>
Date: Thu Jan 8 14:00:00 2009 -0500
[XFS] truncate readdir offsets to signed 32 bit values
I promised to come up with something better back them, but I could for
the fear of my life not remember what that would be.
I guess the most compatible thing we could do would be to make the
truncation dependent on is_compat_task(). You'd still get the same
issue on 32-bit systems, but I don't really see what else we could
do for them.
Powered by blists - more mailing lists