mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-11 23:24:22 -04:00
exfat: Fix potential use after free in exfat_load_upcase_table()
This code calls brelse(bh) and then dereferences "bh" on the next line
resulting in a possible use after free. The brelse() should just be
moved down a line.
Fixes: b676fdbcf4c8 ("exfat: standardize checksum calculation")
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Namjae Jeon <namjae.jeon@samsung.com>
Git-commit: fc961522ddbdf00254dd03b677627139cc1f68bc
Git-repo: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
Signed-off-by: lixiang <lixiang@codeaurora.org>
This commit is contained in:
parent
160b739319
commit
a9516936e5
1 changed files with 1 additions and 1 deletions
|
|
@ -692,8 +692,8 @@ static int exfat_load_upcase_table(struct super_block *sb,
|
|||
index++;
|
||||
}
|
||||
}
|
||||
brelse(bh);
|
||||
chksum = exfat_calc_chksum32(bh->b_data, i, chksum, CS_DEFAULT);
|
||||
brelse(bh);
|
||||
}
|
||||
|
||||
if (index >= 0xFFFF && utbl_checksum == chksum)
|
||||
|
|
|
|||
Loading…
Reference in a new issue