NetBSD-Bugs archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

kern/44594: kernel zlib reports false errors on decompression



>Number:         44594
>Category:       kern
>Synopsis:       kernel zlib reports false errors on decompression
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    kern-bug-people
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Thu Feb 17 17:55:00 +0000 2011
>Originator:     Matthias Drochner
>Release:        current
>Organization:
FZJ
>Environment:
NetBSD zelz27 5.99.45 NetBSD 5.99.45 (MIST+MP+MODS) #220: Thu Feb 17 17:44:37 ME
T 2011  drochner@zelz27:/home/drochner/netbsd/work.src.usbdev/sys/arch/i386/comp
ile/MIST+MP+MODS i386
>Description:
The inflate() function in sys/net/zlib.c reports a Z_BUF_ERROR (-5)
sometimes after a successful decompression. A condition for this
seems to be that the decompressed data end exactly at the end
of the output buffer.
This caused sporadic problems with FAST_IPSEC's IPCOMP, but
other clients might be affected too.
>How-To-Repeat:
I'll attach a small test program. Build against the kernel zlib code:
mkdir tmpdir
cd tmpdir
cp .../compbug.c .
cp ${BSDSRCDIR}/sys/net/zlib.* .
cc -I. compbug.c zlib.c
./a.out

To test against system libz:
cc compbug.c -lz
./a.out
>Fix:
Either hunt it down in the current code, or update to a newer
version.



Home | Main Index | Thread Index | Old Index