1 |
slords |
1.1 |
From 725ad2a8f1358bff885414f5e91d253c99921ddc Mon Sep 17 00:00:00 2001 |
2 |
|
|
From: Konstantin Sharlaimov <konstantin.sharlaimov@gmail.com> |
3 |
|
|
Date: Thu, 30 Aug 2007 06:17:37 +0200 |
4 |
|
|
Subject: [PATCH] [PPP]: Fix output buffer size in ppp_decompress_frame(). |
5 |
|
|
|
6 |
|
|
This patch addresses the issue with "osize too small" errors in mppe |
7 |
|
|
encryption. The patch fixes the issue with wrong output buffer size |
8 |
|
|
being passed to ppp decompression routine. |
9 |
|
|
|
10 |
|
|
-------------------- |
11 |
|
|
As pointed out by Suresh Mahalingam, the issue addressed by |
12 |
|
|
ppp-fix-osize-too-small-errors-when-decoding patch is not fully resolved yet. |
13 |
|
|
The size of allocated output buffer is correct, however it size passed to |
14 |
|
|
ppp->rcomp->decompress in ppp_generic.c if wrong. The patch fixes that. |
15 |
|
|
-------------------- |
16 |
|
|
|
17 |
|
|
Signed-off-by: Konstantin Sharlaimov <konstantin.sharlaimov@gmail.com> |
18 |
|
|
Signed-off-by: David S. Miller <davem@davemloft.net> |
19 |
|
|
Signed-off-by: Adrian Bunk <bunk@kernel.org> |
20 |
|
|
--- |
21 |
|
|
drivers/net/ppp_generic.c | 2 +- |
22 |
|
|
1 files changed, 1 insertions(+), 1 deletions(-) |
23 |
|
|
|
24 |
|
|
diff --git a/drivers/net/ppp_generic.c b/drivers/net/ppp_generic.c |
25 |
|
|
index 802f249..80ff42d 100644 |
26 |
|
|
--- a/drivers/net/ppp_generic.c |
27 |
|
|
+++ b/drivers/net/ppp_generic.c |
28 |
|
|
@@ -1739,7 +1739,7 @@ ppp_decompress_frame(struct ppp *ppp, struct sk_buff *skb) |
29 |
|
|
} |
30 |
|
|
/* the decompressor still expects the A/C bytes in the hdr */ |
31 |
|
|
len = ppp->rcomp->decompress(ppp->rc_state, skb->data - 2, |
32 |
|
|
- skb->len + 2, ns->data, ppp->mru + PPP_HDRLEN); |
33 |
|
|
+ skb->len + 2, ns->data, obuff_size); |
34 |
|
|
if (len < 0) { |
35 |
|
|
/* Pass the compressed frame to pppd as an |
36 |
|
|
error indication. */ |
37 |
|
|
-- |
38 |
|
|
1.6.5.1 |
39 |
|
|
|