Blame SOURCES/0038-exfat-Fix-potential-use-after-free-in-exfat_load_upc.patch
|
Kmods SIG |
50e2b3 |
From fc961522ddbdf00254dd03b677627139cc1f68bc Mon Sep 17 00:00:00 2001
|
|
Kmods SIG |
50e2b3 |
From: Dan Carpenter <dan.carpenter@oracle.com>
|
|
Kmods SIG |
50e2b3 |
Date: Mon, 8 Jun 2020 17:16:29 +0300
|
|
Kmods SIG |
50e2b3 |
Subject: [Backport fc961522ddbd] exfat: Fix potential use after free in
|
|
Kmods SIG |
50e2b3 |
exfat_load_upcase_table()
|
|
Kmods SIG |
50e2b3 |
|
|
Kmods SIG |
50e2b3 |
This code calls brelse(bh) and then dereferences "bh" on the next line
|
|
Kmods SIG |
50e2b3 |
resulting in a possible use after free. The brelse() should just be
|
|
Kmods SIG |
50e2b3 |
moved down a line.
|
|
Kmods SIG |
50e2b3 |
|
|
Kmods SIG |
50e2b3 |
Fixes: b676fdbcf4c8 ("exfat: standardize checksum calculation")
|
|
Kmods SIG |
50e2b3 |
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
|
|
Kmods SIG |
50e2b3 |
Signed-off-by: Namjae Jeon <namjae.jeon@samsung.com>
|
|
Kmods SIG |
50e2b3 |
---
|
|
Kmods SIG |
50e2b3 |
src/nls.c | 2 +-
|
|
Kmods SIG |
50e2b3 |
1 file changed, 1 insertion(+), 1 deletion(-)
|
|
Kmods SIG |
50e2b3 |
|
|
Kmods SIG |
50e2b3 |
diff --git a/src/nls.c b/src/nls.c
|
|
Kmods SIG |
50e2b3 |
index c1ec05695497445934ac8f2d537ccd131e5d7f5c..57b5a7a4d1f7a18b1854348bd6841ea7bc9c466a 100644
|
|
Kmods SIG |
50e2b3 |
--- a/src/nls.c
|
|
Kmods SIG |
50e2b3 |
+++ b/src/nls.c
|
|
Kmods SIG |
50e2b3 |
@@ -692,8 +692,8 @@ static int exfat_load_upcase_table(struct super_block *sb,
|
|
Kmods SIG |
50e2b3 |
index++;
|
|
Kmods SIG |
50e2b3 |
}
|
|
Kmods SIG |
50e2b3 |
}
|
|
Kmods SIG |
50e2b3 |
- brelse(bh);
|
|
Kmods SIG |
50e2b3 |
chksum = exfat_calc_chksum32(bh->b_data, i, chksum, CS_DEFAULT);
|
|
Kmods SIG |
50e2b3 |
+ brelse(bh);
|
|
Kmods SIG |
50e2b3 |
}
|
|
Kmods SIG |
50e2b3 |
|
|
Kmods SIG |
50e2b3 |
if (index >= 0xFFFF && utbl_checksum == chksum)
|
|
Kmods SIG |
50e2b3 |
--
|
|
Kmods SIG |
50e2b3 |
2.31.1
|
|
Kmods SIG |
50e2b3 |
|