Tinc crashes when node with identical configuration is present twice

Guus Sliepen guus at tinc-vpn.org
Fri Jun 4 16:15:18 CEST 2010


On Fri, Jun 04, 2010 at 02:35:25PM +0200, Guus Sliepen wrote:

> > Today we observed an interesting scenario. By mistake, one node with
> > identical configuration was present twice inside our tinc network, logged in
> > from a different dialup connection. (This happened after a migration from an
> > old PC to a new one, as the tinc-directory was simply copied to the new PC.)

After analysis of the debug log sent, it happened because the two nodes
fighting each other about their edges triggered a race condition:

> > 1275644063 tinc[31243]: Error while translating addresses: ai_family not supported
> > 1275644063 tinc[31243]: Got unexpected signal 8 (Floating point exception)

What happened was that both nodes claimed the other was not connected to the
supernodes, which made the supernodes forget about their addresses. However, at
the same time a request for a session key was sent, and the supernodes
helpfully tried to add a reflexive UDP address to the request to help with NAT
traversal. However, since there was no known address anymore, this triggered
the exception.

I've commited a fix to the git repository, if you want you can try checking out
the latest version and test it.

> > Although I understand having the same node twice inside the network
> > is clearly a hefty configuration error, maybe there is a way to make
> > tinc a bit more robust against such a situation? After all, our
> > mistake may accidentially occur in other setups as well.

I've also added code that might detect such situations, and will make one of
the offending nodes quit with an error message.

-- 
Met vriendelijke groet / with kind regards,
     Guus Sliepen <guus at tinc-vpn.org>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 198 bytes
Desc: Digital signature
URL: <http://www.tinc-vpn.org/pipermail/tinc/attachments/20100604/6c997048/attachment.pgp>


More information about the tinc mailing list