Skip to content

Commit c16100f

Browse files
committed
GHSL-2023-012: Incorrect free when decoding target
Incorrect free when decoding target information (GHSL-2023-012) Fixes defect GHSL-2023-012 found by the GitHub Security Lab team via oss-fuzz. The error condition incorrectly assumed the cb and sh buffers would contain a copy of the data that needed to freed. However that is not the case. This will generally cause an assertion when trying to free a pointer that was never allocated, and potentially memory corruption depending on the contents fo the target_info buffer. This may cause a DoS condition. Signed-off-by: Simo Sorce <simo@redhat.com>
1 parent c753000 commit c16100f

File tree

1 file changed

+0
-2
lines changed

1 file changed

+0
-2
lines changed

src/ntlm.c

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -731,8 +731,6 @@ int ntlm_decode_target_info(struct ntlm_ctx *ctx, struct ntlm_buffer *buffer,
731731

732732
done:
733733
if (ret) {
734-
ntlm_free_buffer_data(&sh);
735-
ntlm_free_buffer_data(&cb);
736734
safefree(nb_computer);
737735
safefree(nb_domain);
738736
safefree(dns_computer);

0 commit comments

Comments
 (0)