Automatic conversion of the NetBSD pkgsrc CVS module, use with care
fa17f017cc
2019-02-18 Stuart Caie <kyzer@cabextract.org.uk> * chmd_read_headers(): a CHM file name beginning "::" but shorter than 33 bytes will lead to reading past the freshly-allocated name buffer - checks for specific control filenames didn't take length into account. Thanks to ADLab of Venustech for the report and proof of concept. 2019-02-18 Stuart Caie <kyzer@cabextract.org.uk> * chmd_read_headers(): CHM files can declare their chunks are any size up to 4GB, and libmspack will attempt to allocate that to read the file. This is not a security issue; libmspack doesn't promise how much memory it'll use to unpack files. You can set your own limits by returning NULL in a custom mspack_system.alloc() implementation. However, it would be good to validate chunk size further. With no offical specification, only empirical data is available. All files created by hhc.exe have a chunk size of 4096 bytes, and this is matched by all the files I've found in the wild, except for one which has a chunk size of 8192 bytes, which was created by someone developing a CHM file creator 15 years ago, and they appear to have abandoned it, so it seems 4096 is a de-facto standard. I've changed the "chunk size is not a power of two" warning to "chunk size is not 4096", and now only allow chunk sizes between 22 and 8192 bytes. If you have CHM files with a larger chunk size, please send them to me and I'll increase this upper limit. Thanks to ADLab of Venustech for the report. 2019-02-18 Stuart Caie <kyzer@cabextract.org.uk> * oabd.c: replaced one-shot copying of uncompressed blocks (which requires allocating a buffer of the size declared in the header, which can be 4GB) with a fixed-size buffer. The buffer size is user-controllable with the new msoab_decompressor::set_param() method (check you have version 2 of the OAB decompressor), and also controls the input buffer used for OAB's LZX decompression. Reminder: compression formats can dictate how much memory is needed to decompress them. If memory usage is a security concern to you, write a custom mspack_system.alloc() that returns NULL if "too much" memory is requested. Do not rely on libmspack adding special heuristics to know not to request "too much". Thanks to ADLab of Venustech for the report. |
||
---|---|---|
archivers | ||
audio | ||
benchmarks | ||
biology | ||
bootstrap | ||
cad | ||
chat | ||
comms | ||
converters | ||
cross | ||
databases | ||
devel | ||
distfiles | ||
doc | ||
editors | ||
emulators | ||
filesystems | ||
finance | ||
fonts | ||
games | ||
geography | ||
graphics | ||
ham | ||
inputmethod | ||
lang | ||
licenses | ||
math | ||
mbone | ||
meta-pkgs | ||
misc | ||
mk | ||
multimedia | ||
net | ||
news | ||
packages | ||
parallel | ||
pkgtools | ||
regress | ||
security | ||
shells | ||
sysutils | ||
templates | ||
textproc | ||
time | ||
wm | ||
www | ||
x11 | ||
Makefile | ||
pkglocate | ||
README |
$NetBSD: README,v 1.21 2019/01/29 03:11:03 gutteridge Exp $ pkgsrc is a framework for building software on UNIX-like systems. To use, bootstrap using: cd pkgsrc/bootstrap/ ./bootstrap build packages, use: cd pkgsrc/category/package-name $PREFIX/bin/bmake install Where $PREFIX is where you've chosen to install packages (typically /usr/pkg) Bugs and patches can be filed in the following link (use category 'pkg'): https://www.netbsd.org/cgi-bin/sendpr.cgi?gndb=netbsd To fetch the main CVS repository: cvs -d anoncvs@anoncvs.NetBSD.org:/cvsroot checkout -P pkgsrc It's also possible to contribute through pkgsrc wip (work in progress), for more information, see http://pkgsrc.org/wip/users/ Please see doc/pkgsrc.txt for information.