[asterisk-dev] [Code Review] IAX2 retransmit with encryption enabled fix
David Vossel
dvossel at digium.com
Wed Mar 11 09:19:26 CDT 2009
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
http://reviewboard.digium.com/r/192/#review540
-----------------------------------------------------------
/trunk/channels/chan_iax2.c
<http://reviewboard.digium.com/r/192/#comment1266>
i'm not sure if this is actually correct. this decrypt key might not correspond to the encrypt key causing the frame to be decrypted incorrectly during update. i'll look into it.
- David
On 2009-03-10 21:59:32, David Vossel wrote:
>
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> http://reviewboard.digium.com/r/192/
> -----------------------------------------------------------
>
> (Updated 2009-03-10 21:59:32)
>
>
> Review request for Asterisk Developers and Russell Bryant.
>
>
> Summary
> -------
>
> If an iax channel is encrypted, and a retransmit frame is sent, that packet's iseqno is updated while it is encrypted. This causes the entire frame to be corrupted. When the corrupted frame is sent, the other side decrypts it and sends a VNAK back because the decrypted frame doesn't make any sense. When we get the VNAK, we look through the sent queue and send the same corrupted frame causing a loop.
>
> To fix this, encrypted frames requiring retransmission are decrypted, updated, then re-encrypted. Since key-rotation may change the key held by the pvt struct, the keys used for encryption/decryption are held within the iax_frame to guarantee they remain correct.
>
>
> This addresses bug 0014607.
> http://bugs.digium.com/view.php?id=0014607
>
>
> Diffs
> -----
>
> /trunk/channels/iax2-parser.h 180714
> /trunk/channels/chan_iax2.c 180714
>
> Diff: http://reviewboard.digium.com/r/192/diff
>
>
> Testing
> -------
>
>
> Thanks,
>
> David
>
>
More information about the asterisk-dev
mailing list