+15
−9
Loading
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:<syzbot+3e9cb93e3c5f90d28e19@syzkaller.appspotmail.com> Closes: https://syzkaller.appspot.com/bug?extid=3e9cb93e3c5f90d28e19 Signed-off-by:
Sang-Heon Jeon <ekffu200098@gmail.com> Fixes: acab02ffcd6b ("exfat: support modifying mount options via remount") Tested-by:
<syzbot+3e9cb93e3c5f90d28e19@syzkaller.appspotmail.com> Reviewed-by:
Yuezhang Mo <Yuezhang.Mo@sony.com> Signed-off-by:
Namjae Jeon <linkinjeon@kernel.org>