Tons of "Failed to decrypt and verify packet"

Julien Muchembled jm at jmuchemb.eu
Mon Apr 7 02:36:10 CEST 2014


Le 04/07/14 01:50, Pedro Côrte-Real a écrit :
> On Sun, Apr 6, 2014 at 8:58 PM, Julien Muchembled <jm at jmuchemb.eu> wrote:
>> I tried to bisect. Last good revision is
>>> e42bd60 Fix typos in the documentation.
>> And I get errors with
>>> c1703ea Remove an unused variable.
> 
> Sorry to chime in the middle. Maybe a clue. This sounds like something
> is writing beyond bounds in the stack. Removing an unused variable on
> the stack would change the part of the stack that is "safe" to
> overwrite to.

So I continued to bisect.
Commit 0da0728 ("Use AES-256-GCM for the SPTPS protocol") is really the first bad commit.

> Maybe Guus and Julien are not testing on the same architecture and
> thus the stack doesn't grow the same way and doesn't show the same
> symptoms. I had the same issue when coding with a friend that was
> using a PPC mac a few years ago. Something that was a crashing for me
> was only a memory corruption for him or vice versa.

I'm testing on x86_64, which is the most common architecture today.

> Looking at the code I see:
> 
> fd = accept(sock, &sa.sa, &len);
> 
> where len is actually sizeof(sa) and not sizeof(sa.sa). Is that correct?

I'd say it does not matter. But probably less confusing to change sizeof(sa) into sizeof(sa.sa)


More information about the tinc mailing list