[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <YAe1EYzFWWxAK2I/@mit.edu>
Date: Tue, 19 Jan 2021 23:44:01 -0500
From: "Theodore Ts'o" <tytso@....edu>
To: Luis Henriques <lhenriques@...e.de>
Cc: linux-ext4@...r.kernel.org
Subject: Re: [PATCH] filefrag: handle invalid st_dev and blksize cases
On Wed, Oct 28, 2020 at 03:55:50PM +0000, Luis Henriques wrote:
> It is possible to crash filefrag with a "Floating point exception" in
> two different scenarios:
>
> 1. When fstat() returns a device ID set to 0
> 2. When FIGETBSZ ioctl returns a blocksize of 0
>
> In both scenarios a divide-by-zero will occur in frag_report() because
> variable blksize will be set to zero.
>
> I've managed to trigger this crash with an old CephFS kernel client,
> using xfstest generic/519. The first scenario has been fixed by kernel
> commit 75c9627efb72 ("ceph: map snapid to anonymous bdev ID"). The
> second scenario is also fixed with commit 8f97d1e99149 ("vfs: fix
> FIGETBSZ ioctl on an overlayfs file").
>
> However, it is desirable to handle these two scenarios gracefully by
> checking these conditions explicitly.
>
> Signed-off-by: Luis Henriques <lhenriques@...e.de>
Thanks, applied.
- Ted
Powered by blists - more mailing lists