commit | 0bf9ccffd2f90dfdd6a26814e77750c68d4598e6 | [log] [tgz] |
---|---|---|
author | Namjae Jeon <linkinjeon@kernel.org> | Thu Jul 13 16:40:35 2023 +0900 |
committer | Namjae Jeon <linkinjeon@kernel.org> | Fri Jul 14 17:10:50 2023 +0900 |
tree | 77b8fe697dbea8b767c66ccc26f438344f9498a5 | |
parent | 17c7881225a35acdea24e3ca72ed94ae2918c7d1 [diff] |
exfat: check if filename entries exceeds max filename length exfat_extract_uni_name copies characters from a given file name entry into the 'uniname' variable. This variable is actually defined on the stack of the exfat_readdir() function. According to the definition of the 'exfat_uni_name' type, the file name should be limited 255 characters (+ null teminator space), but the exfat_get_uniname_from_ext_entry() function can write more characters because there is no check if filename entries exceeds max filename length. This patch add the check not to copy filename characters when exceeding max filename length. Cc: stable@vger.kernel.org Cc: Yuezhang Mo <Yuezhang.Mo@sony.com> Reported-by: Maxim Suhanov <dfirblog@gmail.com> Reviewed-by: Sungjong Seo <sj1557.seo@samsung.com> Signed-off-by: Namjae Jeon <linkinjeon@kernel.org>
This is the exfat filesystem for support from the linux 4.1 kernel to the latest kernel.
Install prerequisite package for Fedora, RHEL:
yum install kernel-devel-$(uname -r)
Build step:
make sudo make install
To load the driver manually, run this as root:
modprobe exfat
cd [linux] cp -ar exfat [linux]/fs/
source "fs/fat/Kconfig" +source "fs/exfat/Kconfig" source "fs/ntfs/Kconfig"
obj-$(CONFIG_FAT_FS) += fat/ +obj-$(CONFIG_EXFAT_FS) += exfat/ obj-$(CONFIG_BFS_FS) += bfs/
File systems ---> DOS/FAT/NT Filesystems ---> <M> exFAT filesystem support (utf8) Default iocharset for exFAT
build your kernel