Commit 29c06365 authored by Sang-Heon Jeon's avatar Sang-Heon Jeon Committed by Namjae Jeon
Browse files

exfat: combine iocharset and utf8 option setup



Currently, exfat utf8 mount option depends on the iocharset option
value. After exfat remount, utf8 option may become inconsistent with
iocharset option.

If the options are inconsistent; (specifically, iocharset=utf8 but
utf8=0) readdir may reference uninitalized NLS, leading to a null
pointer dereference.

Extract and combine utf8/iocharset setup logic into exfat_set_iocharset().
Then Replace iocharset setup logic to exfat_set_iocharset to prevent
utf8/iocharset option inconsistentcy after remount.

Reported-by: default avatar <syzbot+3e9cb93e3c5f90d28e19@syzkaller.appspotmail.com>
Closes: https://syzkaller.appspot.com/bug?extid=3e9cb93e3c5f90d28e19


Signed-off-by: default avatarSang-Heon Jeon <ekffu200098@gmail.com>
Fixes: acab02ffcd6b ("exfat: support modifying mount options via remount")
Tested-by: default avatar <syzbot+3e9cb93e3c5f90d28e19@syzkaller.appspotmail.com>
Reviewed-by: default avatarYuezhang Mo <Yuezhang.Mo@sony.com>
Signed-off-by: default avatarNamjae Jeon <linkinjeon@kernel.org>
parent e6fd5d3a
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment