Package: ntfs-3g / 1:2022.10.3-1+deb12u2

Metadata

Package Version Patches format
ntfs-3g 1:2022.10.3-1+deb12u2 3.0 (quilt)

Patch series

view the series file
Patch File delta Description
0001 Fix_use after free_in_ntfs_uppercase_mbs.patch | (download)

libntfs-3g/unistr.c | 3 2 + 1 - 0 !
1 file changed, 2 insertions(+), 1 deletion(-)

 [patch] unistr.c: fix use-after-free in 'ntfs_uppercase_mbs'.

If 'utf8_to_unicode' throws an error due to an invalid UTF-8 sequence,
then 'n' will be less than 0 and the loop will terminate without storing
anything in '*t'. After the loop the uppercase string's allocation is
freed, however after it is freed it is unconditionally accessed through
'*t', which points into the freed allocation, for the purpose of NULL-
terminating the string. This leads to a use-after-free.
Fixed by only NULL-terminating the string when no error has been thrown.

Thanks for Jeffrey Bencteux for reporting this issue:
https://github.com/tuxera/ntfs-3g/issues/84