Mantis - MyDNS-NG
Viewing Issue Advanced Details
62 Global crash always 2010-10-13 00:05 2014-08-07 18:54
beuss  
jameno123  
normal  
resolved 1.2.8.27  
fixed  
none    
none 1.2.8.32  
0000062: MyDNS crashes on IPv6 UDP query
When an IPv6 makes an udp request, mydns crashes with segfault (under -01 and up). IPv4 UDP/TCP and IPv6 TCP works fine.
This bug only occurs on i386 platforms.
To reproduce
Set up and ipv6 enabled MyDNS server
dig -6 mydomain.com @MyDNSServer
dig timesout, MyDNS segfaults
? file icon patch-segfault-ipv6-query.patch [^] (771 bytes) 2010-10-13 00:09
Issue History
2010-10-13 00:05 beuss New Issue
2010-10-13 00:09 gradator File Added: patch-segfault-ipv6-query.patch
2010-10-13 00:09 gradator Note Added: 0000165
2011-01-29 23:16 gradator Note Added: 0000188
2011-10-03 18:45 toddr Note Added: 0000189
2012-01-17 05:15 kolas Note Added: 0000192
2014-07-31 05:29 jameno123 Note Added: 0000199
2014-08-04 21:42 jameno123 Note Added: 0000200
2014-08-05 17:49 jameno123 Status new => assigned
2014-08-05 17:49 jameno123 Assigned To => jameno123
2014-08-05 17:50 jameno123 Status assigned => resolved
2014-08-05 17:50 jameno123 Fixed in Version => Trunk
2014-08-05 17:50 jameno123 Resolution open => fixed
2014-08-07 18:54 jameno123 Fixed in Version Trunk => 1.2.8.32
2014-08-07 18:54 jameno123 Target Version => 1.2.8.32

Notes
(0000165)
gradator   
2010-10-13 00:09   
Here is a patch for this bug against 1.2.8.27 release.
(0000188)
gradator   
2011-01-29 23:16   
ohh, 1.2.8.31 was released without this bug fixed :(
(0000189)
toddr   
2011-10-03 18:45   
+1 to adding this patch.
(0000192)
kolas   
2012-01-17 05:15   
the patch fixed my segfaults.. applied against 1.2.8.31
(0000199)
jameno123   
2014-07-31 05:29   
I would agree that the attached patch for this looks clean and should be applied as well. sockaddr_storage can be safely utilized in this context to support both IPv6 and IPv4 correctly. Casting reading data out of sockaddr in IPv6 land will cause crashes for sure. While this patch fixes this specific crash the code should probably be audited for similar situations as well.
(0000200)
jameno123   
2014-08-04 21:42   
Fix committed into git Commit [a8b198]:
https://sourceforge.net/p/mydns-ng/code/ci/a8b19898492692ab00c2a4bdaf3788b5ce3ab023/ [^]