Bug 3885

Summary: use after free in imap_session_authenticate()
Product: Claws Mail (GTK 2) Reporter: Tristan Miller <psychonaut>
Component: Folders/IMAPAssignee: users
Status: RESOLVED FIXED    
Severity: normal    
Priority: P3    
Version: 3.15.1   
Hardware: PC   
OS: Linux   
Attachments:
Description Flags
Fix use after free in imap_session_authenticate() none

Description Tristan Miller 2017-08-30 16:19:36 UTC
Created attachment 1798 [details]
Fix use after free in imap_session_authenticate()

The function imap_session_authenticate() in imap.c uses a pointer after freeing it:

		if (acc_pass != NULL) {
			g_free(acc_pass);
			memset(acc_pass, 0, strlen(acc_pass));
		}

Attached is a patch (adapted from an openSUSE patch by Ricardo Mones) to fix the issue.
Comment 1 Paul 2017-08-30 16:36:52 UTC
it was already fixed in git, but thanks anyway :)