Skip to content

Commit 1f3d972

Browse files
committed
exfat: fix double free in delayed_free
The double free could happen in the following path. exfat_create_upcase_table() exfat_create_upcase_table() : return error exfat_free_upcase_table() : free ->vol_utbl exfat_load_default_upcase_table : return error exfat_kill_sb() delayed_free() exfat_free_upcase_table() <--------- double free This patch set ->vol_util as NULL after freeing it. Reported-by: Jianzhou Zhao <[email protected]> Signed-off-by: Namjae Jeon <[email protected]>
1 parent 0ff41df commit 1f3d972

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

fs/exfat/nls.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -801,4 +801,5 @@ int exfat_create_upcase_table(struct super_block *sb)
801801
void exfat_free_upcase_table(struct exfat_sb_info *sbi)
802802
{
803803
kvfree(sbi->vol_utbl);
804+
sbi->vol_utbl = NULL;
804805
}

0 commit comments

Comments
 (0)