Thread (1 message) 1 message, 1 author, 2016-11-25

Re: [scr265482] ip_tunnel.c

From: Eric Dumazet <edumazet@google.com>
Date: 2016-11-25 02:27:45

On Thu, Nov 24, 2016 at 5:39 PM, Liyang Yu (于立洋1) [off-list ref] wrote:






BTW:

   Which RFC suggests UINT_MAX as GRE sequence number?  Can you show me?





RFC 2890

In any cases, this is absolutely not a security issue nor a CVE candidate.
Please remove security@kernel.org from CC, no need to spam security guys,
they have enough on their plate.

Please send text messages, no HTML is allowed on netdev

Nobody sane uses GRE sequence numbers, precisely because GRE has
no documented way to synchronize the source and destination of the tunnel.
Basically, if you use GRE sequence numbers, you must re-start other side
of the tunnel if one side had to restart, or risk dropping up to 2^31 packets.

Really, this is not something that can be solved by using
'a different initial sequence number'

linux GRE sequence number support is a joke, it does not support SMP
for a start.




On Wed, Nov 23, 2016 at 11:45 PM, Liyang Yu (于立洋1) [off-list ref] wrote:
quoted
Yeah,I means that recreate the tunnel again, But I don’t think the
quoted
patch can fix the bug. It only can make the first packet received successed. And the follow packet will droped also.
quoted
In function __gre_xmit  line 366
quoted
  tunnel->o_seqno++;
quoted
quoted
If you restart from UINT_MAX, the 'o_seqno' of second packet will return to 0 again.


The first packet after restart: o_seqno == UINT_MAX, the other end: i_seqno = 0 The second packet after restart: o_seqno == 0, the other end: i_seqno = 1



So traffic should be back to normal.



UINT_MAX is also what RFC suggests.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help