mirror of
https://github.com/torvalds/linux.git
synced 2024-11-22 20:22:09 +00:00
706fdcac00
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:
|
||
---|---|---|
.. | ||
balloc.c | ||
cache.c | ||
dir.c | ||
exfat_fs.h | ||
exfat_raw.h | ||
fatent.c | ||
file.c | ||
inode.c | ||
Kconfig | ||
Makefile | ||
misc.c | ||
namei.c | ||
nls.c | ||
super.c |