lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Wed, 2 May 2007 18:59:55 +0200
From:	Stefan Wenk <stefan.wenk@....at>
To:	Richard Purdie <rpurdie@...ys.net>
Cc:	Andrew Morton <akpm@...ux-foundation.org>, netdev@...r.kernel.org,
	"bugme-daemon@...nel-bugs.osdl.org" 
	<bugme-daemon@...zilla.kernel.org>
Subject: Re: [Bugme-new] [Bug 8405] New: pppd does stops compresion with "Lost compression sync"

> Having looked at the code a bit further, I have a theory that it was
> impossible to reach the zlib_inflateSyncPacket call ppp deflate needs.
> The patch below fixes that and also adds some debugging so if that isn't
> the problem, we might get some further clues as to what the problem
> is...
>
> Thanks for the patience :)
>
> Richard
>
> Index: linux/drivers/net/ppp_deflate.c
> ===================================================================
> --- linux.orig/drivers/net/ppp_deflate.c 2007-01-18 00:52:50.000000000
> +0000 +++ linux/drivers/net/ppp_deflate.c 2007-05-01 22:21:27.000000000
> +0100 @@ -488,6 +488,13 @@ int z_decompress(void *arg, unsigned cha
>   for (;;) {
>    r = zlib_inflate(&state->strm, Z_PACKET_FLUSH);
>    if (r != Z_OK) {
> +   printk(KERN_ERR "z_decompress%d: inflate returned %d (%s)"
> +    ",av in %d, av out %d, t in %ld, t out %ld, dp %d,"
> +    " of %d, is %d, os %d\n",
> +    state->unit, r, (state->strm.msg? state->strm.msg: ""),
> +    state->strm.avail_in, state->strm.avail_out,
> +    state->strm.total_in, state->strm.total_out,
> +    decode_proto, overflow, isize, osize);
>     if (state->debug)
>      printk(KERN_DEBUG "z_decompress%d: inflate returned %d (%s)\n",
>             state->unit, r, (state->strm.msg? state->strm.msg: ""));
> Index: linux/lib/zlib_inflate/inflate.c
> ===================================================================
> --- linux.orig/lib/zlib_inflate/inflate.c 2007-01-18 00:53:08.000000000
> +0000 +++ linux/lib/zlib_inflate/inflate.c 2007-05-01 22:03:53.000000000
> +0100 @@ -743,12 +743,14 @@ int zlib_inflate(z_streamp strm, int flu
>
>      strm->data_type = state->bits + (state->last ? 64 : 0) +
>                        (state->mode == TYPE ? 128 : 0);
> -    if (((in == 0 && out == 0) || flush == Z_FINISH) && ret == Z_OK)
> -        ret = Z_BUF_ERROR;
>
>      if (flush == Z_PACKET_FLUSH && ret == Z_OK &&
>              (strm->avail_out != 0 || strm->avail_in == 0))
>    return zlib_inflateSyncPacket(strm);
> +
> +    if (((in == 0 && out == 0) || flush == Z_FINISH) && ret == Z_OK)
> +        ret = Z_BUF_ERROR;
> +
>      return ret;
>  }

The situation now is similar as without any modifications. Instead of -5 
(Z_BUF_ERROR)
we get back -3 (Z_DATA_ERROR) from zlib_inflate. Here is the kernel log

kernel: PPP generic driver version 2.4.2
pppd[6101]: pppd 2.4.4 started by root, uid 0
pppd[6101]: Using interface ppp0
pppd[6101]: Connect: ppp0 <--> /dev/pts/8
pppd[6101]: kernel does not support PPP filtering
kernel: PPP BSD Compression module registered
kernel: PPP Deflate Compression module registered
pppd[6101]: Deflate (15) compression enabled
pppd[6101]: Cannot determine ethernet address for proxy ARP
pppd[6101]: local  IP address 192.168.3.2
pppd[6101]: remote IP address 192.168.3.1
kernel: z_decompress0: inflate returned -3 (),av in 0, av out 1, t in 1520, t 
out 3070, dp 0, of 1, is 644, os 1504
kernel: z_decompress0: inflate returned -3 ()
pppd[6101]: Lost compression sync: disabling compression
pppd[6101]: Terminating on signal 2
pppd[6101]: Child process pppd (charshunt) (pid 6131) terminated with signal 2
pppd[6101]: Modem hangup
pppd[6101]: Connect time 0.2 minutes.
pppd[6101]: Sent 2969 bytes, received 2774 bytes.
pppd[6101]: Connection terminated.
pppd[6101]: Exit.

Attached you find the corresponding pppdump file.

Download attachment "selfhtml2.ppdump" of type "application/octet-stream" (5044 bytes)

Powered by blists - more mailing lists