netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/2] ppp: mppe: fixes MPPE desync on links which don't guarantee packet ordering
@ 2015-04-26 18:40 Sylvain Rochet
  2015-04-26 18:40 ` [PATCH 1/2] ppp: mppe: sanity error path rework Sylvain Rochet
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Sylvain Rochet @ 2015-04-26 18:40 UTC (permalink / raw)
  To: Paul Mackerras, linux-ppp, netdev, linux-kernel, David S. Miller
  Cc: Sylvain Rochet

I am currently having an issue with PPP over L2TP (UDP) and MPPE in
stateless mode (default mode), UDP does not guarantee packet ordering so
we might get out of order packet. MPPE needs to be continuously synched
so we should drop late UDP packet.

I added a printk on the number of time we rekeyed in MPPE decompressor,
this is what we currently have if we receive a slightly out of order UDP
packet:

[1731001.049206] mppe_decompress[1]: ccount 1559
[1731001.049216] mppe_decompress[1]: rekeyed 1 times

[1731001.049228] mppe_decompress[1]: ccount 1560
[1731001.049232] mppe_decompress[1]: rekeyed 1 times

[1731001.050170] mppe_decompress[1]: ccount 1562
[1731001.050182] mppe_decompress[1]: rekeyed 2 times

[1731001.050191] mppe_decompress[1]: ccount 1561
[1731001.062576] mppe_decompress[1]: rekeyed 4095 times
                                             ^^^^
This is obviously wrong, we missed packet 1561 and we already rekeyed 2
times for 1562 we previously received, we can't recover the decryption
key we need for 1561, we should drop it instead of rekeying 4095 times.

This patch series drop any packet with are not within the 4096/2 forward
window.

Sylvain Rochet (2):
  ppp: mppe: sanity error path rework
  ppp: mppe: discard late packet in stateless mode

 drivers/net/ppp/ppp_mppe.c | 36 ++++++++++++++++++++----------------
 1 file changed, 20 insertions(+), 16 deletions(-)

-- 
2.1.4


^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2015-04-27  3:26 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-04-26 18:40 [PATCH 0/2] ppp: mppe: fixes MPPE desync on links which don't guarantee packet ordering Sylvain Rochet
2015-04-26 18:40 ` [PATCH 1/2] ppp: mppe: sanity error path rework Sylvain Rochet
2015-04-26 18:40 ` [PATCH 2/2] ppp: mppe: discard late packet in stateless mode Sylvain Rochet
2015-04-27  3:26 ` [PATCH 0/2] ppp: mppe: fixes MPPE desync on links which don't guarantee packet ordering David Miller

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).