Commit graph

24 commits

Author SHA1 Message Date
Gabor Kovesdan
b9b2a12a31 - Update to 1.4 2011-06-11 21:04:59 +00:00
Martin Wilke
65e190c0f0 - Get Rid MD5 support
With hat:	portmgr (myself)
2011-03-18 17:59:50 +00:00
Gabor Kovesdan
cfdadd1d6c Update to 1.3, which fixes two security bugs. Detailed description
from the author follows.

Bug 1: Infinite loop in MS-ZIP decoder [1]

The MS-ZIP and Quantum decoders read bits in roughly the same way as the LZX
decoder, however they don't have "inject two fake bytes" code.

In the situation where read() provides zero bytes, e.g. at the end of file or
end of a CAB block, the LZX decoder handles this by injecting two fake bytes,
then returns an error on subsequent calls. MS-ZIP and Quantum instead return
zero bytes without error. However, all three decoders are written to presume
they will get at least one byte. So this could lead to an infinite loop in
MS-ZIP and Quantum. An infinite loop has definitely been seen in MS-ZIP -
there is a while loop in inflate() of an uncompressed block (block type 0)
which won't end until enough input is provided.

Partial solution: change "if (read < 0)" to "if (read <= 0)" in mszipd.c and
qtmd.c.
- http://libmspack.svn.sourceforge.net/viewvc/libmspack?view=revision&revision=90

However, this breaks compatibility with a number of MS-ZIP/Quantum encoded
files. A full solution would be to implement the same bit-reading system as
LZX. I've done this now, merging all the bit-reading and huffman-reading
code into two new files; readbits.h and readhuff.h
- http://libmspack.svn.sourceforge.net/viewvc/libmspack?view=revision&revision=95

There are several further changes made to integrate readbits.h and readhuff.h,
I recommend you look at the latest version in the source repository.
- http://libmspack.svn.sourceforge.net/viewvc/libmspack/libmspack/trunk/mspack/

Bug 2: Segmentation fault in "cabextract -t"

This bug may not affect you, depending on your implementation of
mspack_system->write(). It does cause a segfault in cabextract's
cabx_write() in "-t" (test archive) mode.

In the Quantum decoder, when the window wrap is reached, all currently
unwritten data is flushed to disk. Sometimes, less data is needed than
is flushed, which makes the variable out_bytes negative.

When the main decoding loop finishes, a final call to write() is made if
out_bytes is not zero. In that situation, it calls mspack_system->write() with
a negative byte count, e.g. -129 bytes. You should reject this. In
cabextract's "-t" mode, this is not caught, but instead converted to an
unsigned integer and passed to md5_process_bytes(), which tries to
read e.g. 4294967167 bytes, causing it to read beyond the end of
valid process space and thus segfault.

Solution:
- Break out to the end of the decoding loop immediately if the flush would be more than needed.
   http://libmspack.svn.sourceforge.net/viewvc/libmspack/libmspack/trunk/mspack/qtmd.c?r1=114&r2=113
- Add checking of the "bytes" argument in mspack_system read() / write() implementations, just to be sure.
   http://libmspack.svn.sourceforge.net/viewvc/libmspack?view=revision&revision=118

Security:	SA40719 [1]
2010-07-29 22:45:51 +00:00
Pav Lucistnik
dad0d0873a - Remove USE_GETOPT_LONG which is a no-op since March 2007 2008-03-20 09:23:28 +00:00
Maxim Sobolev
8ef9a651dc Update MASTER_SITE and description to point to the new home page.
Submitted by:	Stuart Caie (author)
2007-08-07 18:21:25 +00:00
Gabor Kovesdan
d420ebcb28 - Update to 1.2
- Remove unnecessary patch
- Style

Approved by:	erwin (mentor)
2007-01-02 21:12:04 +00:00
Gabor Kovesdan
7dc52a691f Change my e-mail address.
Approved by:	erwin (mentor)
2006-12-08 13:46:35 +00:00
Erwin Lansing
eefb9f7f3b - Don't override CONFIGURE_TARGET, it compiles without that
- Add some more PORTDOCS
- Respect MAN1PREFIX
- Bump PORTREVISION
- Take maintainership

PR:		103103
Submitted by:	Gabor Kovesdan <gabor@FreeBSD.org>
2006-09-10 17:53:55 +00:00
Pav Lucistnik
2c39b78ee6 - Add SHA256 2005-11-23 23:37:45 +00:00
David E. O'Brien
c3d8037aeb At Kris's request, back out the MACHINE_ARCH spelling correction until
after 5.4-RELEASE.
2005-04-12 03:26:56 +00:00
David E. O'Brien
f2fc2d60ae Assist getting more ports working on AMD64 by obeying the
Ports Collection documentation and use 'ARCH' rather than 'MACHINE_ARCH'.
2005-04-11 08:04:41 +00:00
OKAZAKI Tetsurou
4d35df5f38 Update to version 1.1.
PR:		72817
Submitted by:	KATO Tsuguru
2004-10-23 08:35:51 +00:00
Kirill Ponomarev
3376711136 - Update to version 1.0
PR:		ports/64328
Submitted by:	Ports Fury
2004-03-16 13:14:57 +00:00
Trevor Johnson
3c175cb569 Use PLIST_FILES.
Reviewed by:	marcus
2004-02-05 20:38:07 +00:00
Trevor Johnson
e8d5605043 Add SIZE. 2004-01-27 20:51:07 +00:00
Maxim Sobolev
10588346d3 Let be hohest: I really don't have a time now to properly maintain all
these great pieces of software, so that let others with more free time
to take over them.
2003-07-29 09:12:37 +00:00
FUJISHIMA Satsuki
b185046be2 get rid of libgnugetopt dependency for -CURRENT,
use USE_GETOPT_LONG instead.
2003-07-14 02:53:03 +00:00
Ade Lovett
7e52725f2a Clear moonlight beckons.
Requiem mors pacem pkg-comment,
And be calm ports tree.

E Nomini Patri, E Fili, E Spiritu Sancti.
2003-03-07 06:14:21 +00:00
Maxim Sobolev
8d7e11a216 Update to 0.6.
PR:		41729
Submitted by:	Ports Fury
2002-08-30 12:08:16 +00:00
Maxim Sobolev
54edf3598f Update to 0.5.
Submitted by:	petef
2001-08-27 08:35:40 +00:00
Maxim Sobolev
0cf6a54ffb Update to 0.4. 2001-08-20 08:13:32 +00:00
Maxim Sobolev
6dfe9f89dd Update to 0.3. 2001-08-07 11:57:53 +00:00
Maxim Sobolev
e1c54c9b65 Update to 0.2. 2001-03-06 13:29:20 +00:00
Maxim Sobolev
d78c0253c6 Add cabextract - a program to extract Microsoft cabinet (.CAB) files. 2000-11-30 14:21:28 +00:00