GNU bug report logs - #31946
27.0.50; The NSM should warn about more TLS problems

Previous Next

Package: emacs;

Reported by: Lars Ingebrigtsen <larsi <at> gnus.org>

Date: Sat, 23 Jun 2018 10:39:02 UTC

Severity: normal

Tags: fixed, security

Found in version 27.0.50

Fixed in version 27.1

Done: Lars Ingebrigtsen <larsi <at> gnus.org>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: Eli Zaretskii <eliz <at> gnu.org>
To: Andy Moreton <andrewjmoreton <at> gmail.com>
Cc: 31946 <at> debbugs.gnu.org
Subject: bug#31946: 27.0.50; The NSM should warn about more TLS problems
Date: Mon, 26 Aug 2019 19:07:13 +0300
> From: Andy Moreton <andrewjmoreton <at> gmail.com>
> Date: Mon, 26 Aug 2019 14:13:18 +0100
> 
> On Mon 26 Aug 2019, Lars Ingebrigtsen wrote:
> 
> > The netsec branch has now been merged into the trunk and I'm closing
> > this bug report.
> 
> After this merge, the network tests fail on 64 bit windows (MSYS2), and
> using any network functionality results in crashes.
> 
> >From emacs --no-desktop under gdb, running list-packages pops upo the
> NSM "Certificate information" window and asks "Continue comnecting?".
> Any of the asnwer for this question result in a crash.
> 
> warning: HEAP[emacs.exe]: 
> warning: Invalid address specified to RtlFreeHeap( 0000000002720000, 0000000006037150 )
> 
> Thread 1 received signal SIGTRAP, Trace/breakpoint trap.
> 0x00007ff9199863b7 in ntdll!RtlpNtMakeTemporaryKey () from C:\WINDOWS\SYSTEM32\ntdll.dll
> (gdb) #0  0x00007ff9199863b7 in ntdll!RtlpNtMakeTemporaryKey () from C:\WINDOWS\SYSTEM32\ntdll.dll
> No symbol table info available.
> #1  0x00007ff919941467 in ntdll!memset () from C:\WINDOWS\SYSTEM32\ntdll.dll
> No symbol table info available.
> #2  0x00007ff919985290 in ntdll!RtlpNtMakeTemporaryKey () from C:\WINDOWS\SYSTEM32\ntdll.dll
> No symbol table info available.
> #3  0x00007ff9199356b8 in ntdll!memset () from C:\WINDOWS\SYSTEM32\ntdll.dll
> No symbol table info available.
> #4  0x00007ff9198c07a0 in ntdll!RtlGetCurrentServiceSessionId () from C:\WINDOWS\SYSTEM32\ntdll.dll
> No symbol table info available.
> #5  0x00007ff9198bfba1 in ntdll!RtlFreeHeap () from C:\WINDOWS\SYSTEM32\ntdll.dll
> No symbol table info available.
> #6  0x000000040029e7aa in free_after_dump (ptr=0x6037150) at C:/emacs/git/emacs/master/src/w32heap.c:504
> No locals.
> #7  0x000000040018b7f4 in xfree (block=0x6037150) at C:/emacs/git/emacs/master/src/alloc.c:748
> No locals.
> #8  0x0000000400227bb0 in Fgnutls_format_certificate (cert=XIL(0xd97ad24)) at C:/emacs/git/emacs/master/src/gnutls.c:1616

That's because any memory allocated by GnuTLS cannot be freed by Emacs
via 'free' or 'xfree', it needs to be freed by calling 'gnutls_free'
(the GnuTLS manual clearly says that, btw).  That crashes, because on
Windows we use our own implementation of 'free', which uses a
different heap.

Please try the latest master, I tried to fix that.  Also, please tell
which tests specifically crashed/failed for you, I'd like to run them
here.

Thanks.




This bug report was last modified 5 years and 328 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.