dnssec-signzone crash on Windows 2000

Stefan Puiu stefanpuiu at itcnetworks.ro
Tue Jan 18 14:42:47 UTC 2005


Hello,
I've tried using dnssec-signzone from the Win32 BIND 9.3.0 binary 
distribution to sign a simple zone on Windows 2000 SP4 and failed, the 
app crashing with an access violation. The same operation succeeded on 
Solaris, using the same key and zone files. The zone file and key files 
are attached (they were used for testing purposes only, the zone file 
too - it's bogus).

The command line used was:

dnssec-signzone -v 99 -o ns.itc.ro -t ns.itc.ro.db Kns.itc.ro.+001+24110

I remember experiencing crashes with dnssec-signzone in 9.2.3 when using 
RSA keys. The problem would go away when recompiling BIND. This is also 
true for 9.3.0, as shown below, but we're lucky to have a MS VC++ 6.0 
license, others might not be that lucky.

Here's what a co-worker found when trying to debug this problem:

The stack trace for the crash is:

"First-chance exception in dnssec-signzone.exe (NTDLL.DLL): 0xC0000005: 
Access Violation."

NTDLL! 77f88216()

NTDLL! 77f8819b()

LIBISC! 10012cbf()
----------------------------

Using a debug version, the stack trace becomes:

NTDLL! 77f88216()

NTDLL! 77f8819b()

fprintf(_iobuf * 0x00437ab8, const char * 0x100677a0 `string') line 62 + 
9 bytes

isc_log_doit(isc_log * 0x007fb458, isc_logcategory * 0x1006f9d0, 
isc_logmodule * 0x00691980, int -3, int 0, isc_msgcat * 0x00000000, int 
0, int 0, const char * 0x0066a19c `string', char * 0x0012ec6c) line 1700 
+ 407 bytes

isc_log_vwrite(isc_log * 0x007fb458, isc_logcategory * 0x1006f9d0, 
isc_logmodule * 0x00691980, int -3, const char * 0x0066a19c `string', 
char * 0x0012ec6c) line 846 + 37 bytes

isclog_warn_callback(dns_rdatacallbacks * 0x0012fbe4, const char * 
0x0066a19c `string') line 80 + 36 bytes

load(dns_loadctx * 0x00803da0) line 1771 + 44 bytes

dns_master_loadfile(const char * 0x00d60ed4, dns_name * 0x00802670, 
dns_name * 0x00802670, unsigned short 1, unsigned int 0, 
dns_rdatacallbacks * 0x0012fbe4, isc_mem * 0x00801c80) line 1913 + 9 bytes

dns_db_load(dns_db * 0x00802660, const char * 0x00d60ed4) line 324 + 46 
bytes

loadzone(char * 0x00d60ed4, char * 0x00d60ec7, unsigned short 1, dns_db 
* * 0x0043942c gdb) line 1323 + 15 bytes

main(int 1, char * * 0x00d60e7c) line 1884 + 23 bytes

mainCRTStartup() line 206 + 25 bytes
------------------------------------------------------------

The problem is fixed by altering compilation options for libisc.dll and 
dnssec-signzone.exe and recompiling, namely, under Project Settings -> 
C/C++ -> Code Generation -> Use run-time library -> "Multithreaded DLL" 
instead of "Multithreaded" as in the original dsp - thus using the /MD 
option instead of /MT for the MS compiler for dnssec-signzone and, 
strangely, /MTd instead of /MDd for libisc. The diffs are attached.

I put bind-bugs in the Cc field because I presume this to be a bug, even 
if it's in the project settings and not in the actual source. Can 
somebody please confirm this?


-- Attached file included as plaintext by Ecartis --
-- File: ns.itc.ro.db

$ORIGIN ns.itc.ro.
$TTL 86400
ns.itc.ro. 86400 IN SOA raduda.itcnetworks. liuhg.ligyu. ( 11434 10800 3600 604800 86400 )
ns.itc.ro. IN NS nsns.ns.itc.ro.
ns.itc.ro. IN NS raduda.itcnetworks.
blj.ns.itc.ro. IN A 13.17.0.1
ceva.ns.itc.ro. IN MX 12 ceva.,ceva.

$INCLUDE "Kns.itc.ro.+001+24110.key"


-- Attached file included as plaintext by Ecartis --
-- File: Kns.itc.ro.+001+24110.private

Private-key-format: v1.2
Algorithm: 1 (RSA)
Modulus: vn+EKdm4I5qHtvxLrU/SuvnRjKe6O6ktKf5wj5A49GuKMpcNgjLm3Bw4lVLLgDmM34KgH+5NMRXo2NgzOH7WBEM+IdkjSqR/MNCC1pg00kQfaAbJI3wCC/rXm+dyMYkzM6V7RAjU8BMRK1EjILtwTd37wHeJcHu5JYnKEq9eLpU=
PublicExponent: Aw==
PrivateExponent: fv+tcTvQF7xaef2HyN/h0fvhCG/RfRtzcVRLCmAl+Eexdw9eVsyZ6BLQY4yHqtEIlQHAFUmIy2PwkJAiJankAbCyc6LeE14BFAZ3P8FN6DRPRmPrRZSOBTphrsR7G5lleDO3pHSIvYow6Y5fIWyzoTfCtTH34kurOVxd6dAoqfM=
Prime1: 5+rh6fQDU/15kkdfOzINQV2saKBkLikrR76IYZsZY5lAucI1+ZuLdOOfA37MTj9SKjMV8Hv7KHXmQOimpurfbw==
Prime2: 0keSeuIqQ4AZNIiXuw3otErSCEfW7wPY24aNXx5uv4G+niWXYGxITuQt+BWiSiOJ4CSavBmh4cJpPlSNUDZQOw==
Exponent1: mpyWm/gCN/5RDC+U0iFeK5PIRcBCyXDHhSmwQRIQ7RDV0Swj+70Ho0JqAlSINCo2xsy5Sv1SGvlEK0XEb0c/nw==
Exponent2: jC+2/JbG16q7eFsP0glFzYc2sC/kn1fl568I6hRJ1QEpvsO6QEgwNJgepWPBhsJb6sMR0rvBQSxGKY2zis7gJw==
Coefficient: cJQJyHnVA/q6Fg2qGPe4BQFxfRkyqoi9gI8drRCNDG81OZxBWjo4cRIa7z4rw1nQ2/O1LT595/E4mrv0qfUmdA==


-- Attached file included as plaintext by Ecartis --
-- File: Kns.itc.ro.+001+24110.key

ns.itc.ro. IN DNSKEY 256 3 1 AQO+f4Qp2bgjmoe2/EutT9K6+dGMp7o7qS0p/nCPkDj0a4oylw2CMubc HDiVUsuAOYzfgqAf7k0xFejY2DM4ftYEQz4h2SNKpH8w0ILWmDTSRB9o BskjfAIL+teb53IxiTMzpXtECNTwExErUSMgu3BN3fvAd4lwe7klicoS r14ulQ==


-- Attached file included as plaintext by Ecartis --
-- File: sign.diff

--- bin/dnssec/win32/signzone.dsp	Thu Mar 11 03:02:33 2004
+++ /home/stefanpuiu/tmp/signzone.dsp	Tue Jan 18 16:30:47 2005
@@ -42,7 +42,7 @@
 # PROP Ignore_Export_Lib 0
 # PROP Target_Dir ""
 # ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c
-# ADD CPP /nologo /MT /W3 /GX /O2 /I "./" /I "../../../" /I "../../../lib/isc/win32" /I "../../../lib/isc/win32/include" /I "../../../lib/isc/include" /I "../../../lib/dns/include" /I "../../../lib/dns/sec/dst/include" /D "NDEBUG" /D "__STDC__" /D "WIN32" /D "_CONSOLE" /D "_MBCS" /YX /FD /c
+# ADD CPP /nologo /MD /W3 /GX /O2 /I "./" /I "../../../" /I "../../../lib/isc/win32" /I "../../../lib/isc/win32/include" /I "../../../lib/isc/include" /I "../../../lib/dns/include" /I "../../../lib/dns/sec/dst/include" /D "NDEBUG" /D "__STDC__" /D "WIN32" /D "_CONSOLE" /D "_MBCS" /YX /FD /c
 # ADD BASE RSC /l 0x409 /d "NDEBUG"
 # ADD RSC /l 0x409 /d "NDEBUG"
 BSC32=bscmake.exe


-- Attached file included as plaintext by Ecartis --
-- File: libisc.diff

--- lib/isc/win32/libisc.dsp	Thu Mar 11 07:00:27 2004
+++ /home/stefanpuiu/tmp/libisc.dsp	Tue Jan 18 16:30:57 2005
@@ -70,7 +70,7 @@
 # PROP Ignore_Export_Lib 0
 # PROP Target_Dir ""
 # ADD BASE CPP /nologo /MTd /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "LIBISC_EXPORTS" /YX /FD /GZ /c
-# ADD CPP /nologo /MDd /W3 /Gm /GX /ZI /Od /I "./" /I "../../../" /I "include" /I "../include" /I "win32" /I "../../isccfg/include" /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "__STDC__" /D "_MBCS" /D "_USRDLL" /D "LIBISC_EXPORTS" /FR /YX /FD /GZ /c
+# ADD CPP /nologo /MTd /W3 /Gm /GX /ZI /Od /I "./" /I "../../../" /I "include" /I "../include" /I "win32" /I "../../isccfg/include" /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "__STDC__" /D "_MBCS" /D "_USRDLL" /D "LIBISC_EXPORTS" /FR /YX /FD /GZ /c
 # ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /win32
 # ADD MTL /nologo /D "_DEBUG" /mktyplib203 /win32
 # ADD BASE RSC /l 0x409 /d "_DEBUG"




More information about the bind-users mailing list