[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <CAKYAXd-dTvQSCwMu2qHpb0VEqmQStekb6iFgzgYqi0i_7Bq7_w@mail.gmail.com>
Date: Fri, 30 Dec 2022 10:32:51 +0900
From: Namjae Jeon <linkinjeon@...nel.org>
To: "Yuezhang.Mo@...y.com" <Yuezhang.Mo@...y.com>
Cc: "sj1557.seo@...sung.com" <sj1557.seo@...sung.com>,
"linux-fsdevel@...r.kernel.org" <linux-fsdevel@...r.kernel.org>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
"Andy.Wu@...y.com" <Andy.Wu@...y.com>,
"Wataru.Aoyama@...y.com" <Wataru.Aoyama@...y.com>
Subject: Re: [PATCH v1] exfat: fix reporting fs error when reading dir beyond EOF
2022-12-26 16:23 GMT+09:00, Yuezhang.Mo@...y.com <Yuezhang.Mo@...y.com>:
> Since seekdir() does not check whether the position is valid, the
> position may exceed the size of the directory. We found that for
> a directory with discontinuous clusters, if the position exceeds
> the size of the directory and the excess size is greater than or
> equal to the cluster size, exfat_readdir() will return -EIO,
> causing a file system error and making the file system unavailable.
>
> Reproduce this bug by:
>
> seekdir(dir, dir_size + cluster_size);
> dirent = readdir(dir);
>
> The following log will be printed if mount with 'errors=remount-ro'.
>
> [11166.712896] exFAT-fs (sdb1): error, invalid access to FAT (entry
> 0xffffffff)
> [11166.712905] exFAT-fs (sdb1): Filesystem has been set read-only
>
> Fixes: 1e5654de0f51 ("exfat: handle wrong stream entry size in
> exfat_readdir()")
>
> Signed-off-by: Yuezhang Mo <Yuezhang.Mo@...y.com>
> Reviewed-by: Andy Wu <Andy.Wu@...y.com>
> Reviewed-by: Aoyama Wataru <wataru.aoyama@...y.com>
Applied, Thanks for your patch!
Powered by blists - more mailing lists