netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 2.6.22.3] ppp: fix output buffer size in ppp_decompress_frame
@ 2007-08-17  9:45 Konstantin Sharlaimov
  2007-08-21  7:13 ` David Miller
  0 siblings, 1 reply; 2+ messages in thread
From: Konstantin Sharlaimov @ 2007-08-17  9:45 UTC (permalink / raw)
  To: Suresh Mahalingam; +Cc: David Miller, paulus, netdev, linux-kernel

This patch addresses the issue with "osize too small" errors in mppe encryption.
The patch fixes the issue with wrong output buffer size being passed to ppp
decompression routine.

Signed-off-by: Konstantin Sharlaimov <konstantin.sharlaimov@gmail.com>
---
As pointed out by Suresh Mahalingam, the issue addressed by 
ppp-fix-osize-too-small-errors-when-decoding patch is not fully resolved yet.
The size of allocated output buffer is correct, however it size passed to
ppp->rcomp->decompress in ppp_generic.c if wrong. The patch fixes that.

--- linux-2.6.21.3/drivers/net/ppp_generic.c.orig	2007-08-17 20:35:03.000000000 +1100
+++ linux-2.6.21.3/drivers/net/ppp_generic.c	2007-08-17 20:35:45.000000000 +1100
@@ -1726,7 +1726,7 @@ ppp_decompress_frame(struct ppp *ppp, st
 		}
 		/* the decompressor still expects the A/C bytes in the hdr */
 		len = ppp->rcomp->decompress(ppp->rc_state, skb->data - 2,
-				skb->len + 2, ns->data, ppp->mru + PPP_HDRLEN);
+				skb->len + 2, ns->data, obuff_size);
 		if (len < 0) {
 			/* Pass the compressed frame to pppd as an
 			   error indication. */


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

* Re: [PATCH 2.6.22.3] ppp: fix output buffer size in ppp_decompress_frame
  2007-08-17  9:45 [PATCH 2.6.22.3] ppp: fix output buffer size in ppp_decompress_frame Konstantin Sharlaimov
@ 2007-08-21  7:13 ` David Miller
  0 siblings, 0 replies; 2+ messages in thread
From: David Miller @ 2007-08-21  7:13 UTC (permalink / raw)
  To: konstantin.sharlaimov; +Cc: msuresh_2001, paulus, netdev, linux-kernel

From: Konstantin Sharlaimov <konstantin.sharlaimov@gmail.com>
Date: Fri, 17 Aug 2007 20:45:51 +1100

> This patch addresses the issue with "osize too small" errors in mppe encryption.
> The patch fixes the issue with wrong output buffer size being passed to ppp
> decompression routine.
> 
> Signed-off-by: Konstantin Sharlaimov <konstantin.sharlaimov@gmail.com>
> ---
> As pointed out by Suresh Mahalingam, the issue addressed by 
> ppp-fix-osize-too-small-errors-when-decoding patch is not fully resolved yet.
> The size of allocated output buffer is correct, however it size passed to
> ppp->rcomp->decompress in ppp_generic.c if wrong. The patch fixes that.

Patch applied, thanks.

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

end of thread, other threads:[~2007-08-21  7:13 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-08-17  9:45 [PATCH 2.6.22.3] ppp: fix output buffer size in ppp_decompress_frame Konstantin Sharlaimov
2007-08-21  7:13 ` 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).