znew: avoid denial-of-service issue
[debian/gzip] / NEWS
1 GNU gzip NEWS                                    -*- outline -*-
2
3 * Noteworthy changes in release ?.? (????-??-??) [?]
4
5
6 * Noteworthy changes in release 1.6 (2013-06-09) [stable]
7
8 ** New features
9
10   gzip now accepts the --keep (-k) option, for consistency with tools
11   like xz, lzip and bzip2.  With this option, gzip no longer removes
12   named input files when compressing or decompressing.
13
14 ** Bug fixes
15
16   gzip -d no longer malfunctions with certain invalid data in 'pack' format.
17   [bug introduced in gzip-0.8]
18
19   When overwriting, gzip no longer acts as if you typed "y" when you type "n",
20   on some platforms when compiled with optimization.
21   [bug introduced in gzip-1.3.6]
22
23   zgrep no longer malfunctions with a multi-digit context option like -15.
24   Now, it passes that option to grep (equivalent to -C15) just as it does
25   for single-digit options. [bug introduced in gzip-1.3.12]
26
27   zmore now acts more like 'more', and is more portable to POSIXish hosts.
28
29
30 * Noteworthy changes in release 1.5 (2012-06-17) [stable]
31
32 ** Bug fixes
33
34   gzip -d now decodes and checks header CRC16 checksums as specified by
35   the FHCRC section of Internet RFC 1952.
36
37   "gzip -d -S '' precious.gz" is now rejected immediately.  Before,
38   that command would emulate "rm -i precious.gz", but with an easily-
39   misunderstood prompt.  I.e., gzip would ask if it's ok to remove the
40   existing file, "precious.gz".  If you made the mistake of saying "yes",
41   it would remove that input file before attempting to uncompress it.
42
43   gzip -cdf now properly handles input consisting of gzip'd data followed
44   by uncompressed data.  Before it would output raw compressed input, too.
45   For example, now "(printf x|gzip; echo y)|gzip -dcf" prints "xy\n",
46   while before it would print "x<compressed data>y\n".
47
48   gzip -rf no longer compresses files more than once (e.g., replacing
49   FOO with FOO.gz.gz) on file systems such as ZFS where a readdir
50   loop that unlinks and creates files can revisit output files.
51
52
53 * Noteworthy changes in release 1.4 (2010-01-20) [stable]
54
55 ** Bug fixes
56
57   gzip -d could segfault and/or clobber the stack, possibly leading to
58   arbitrary code execution.  This affects x86_64 but not 32-bit systems.
59   This fixes CVE-2010-0001.
60   For more details, see http://bugzilla.redhat.com/554418
61
62   gzip -d would fail with a CRC error for some valid inputs.
63   So far, the only valid input known to exhibit this failure was
64   compressed "from FAT filesystem (MS-DOS, OS/2, NT)".  In addition,
65   to trigger the failure, your memcpy implementation must copy in
66   the "reverse" order.
67
68
69 * Noteworthy changes in release 1.3.14 (2009-10-30) [beta]
70
71 ** Bug fixes
72
73   gzip no longer fails when there is exactly one trailing NUL byte
74   gzip has always accepted trailing NUL bytes.  Note the plural.
75
76   zdiff would exit with status 2 (indicating an error) rather than 1 to
77   indicate differences when both inputs were compressed and different.
78
79   zdiff would fail to print differences in two compressed inputs
80
81   zgrep -f - didn't work
82
83
84 * Noteworthy changes in release 1.3.13 (2009-09-30) [stable]
85
86 ** 'gzip -f foo.gz' now creates a file foo.gz.gz instead of complaining.
87
88 ** Bug fixes
89
90   gzip -d no longer fails with "-" as 2nd or subsequent argument
91
92   gzip no longer ignores a close-induced write failure, e.g., on NFS
93
94   gzip -d no longer segfaults on certain invalid inputs
95
96
97 Major changes in Gzip 1.3.12 (2007-04-13)
98
99 * znew now uses $TMPDIR (default /tmp) instead of always using /tmp.
100
101 * It is now documented that gzip ignores case when examining file name
102   extensions; for example, 'gzip test.Gz' (without -f) fails because
103   the file name ends in '.Gz'.
104
105 Major changes in Gzip 1.3.11 (2007-02-05)
106
107 * As per the GNU coding standards, the behavior of gzip and its
108   companion executables no longer depend on the name used to invoke them.
109   For example, 'gzip' and 'gunzip' are no longer hard links;
110   instead, 'gunzip' is now a small program that invokes 'gzip -d'.
111
112 * zdiff now checks for subsidiary gzip failures, and works around
113   bugs in IRIX 6 sh, Tru64 4.0F ksh, and Solaris 8 bash.
114
115 Major changes in Gzip 1.3.10 (2006-12-30)
116
117 * gzip -c and zcat now work on special files, files with special mode bits,
118   and files with multiple hard links.
119 * gzip -q now exits with status 2 (not 1) when SIGPIPE is received.
120 * zcmp and zdiff did not work in the usual case, due to a typo.
121 * zgrep has many bugs fixed with argument handling, special characters,
122   and exit status.
123 * zless no longer mishandles $%=~ in file names.
124
125 Gzip 1.3.9 (2006-12-15)
126
127 * No major changes; only porting fixes.
128
129 Major changes in Gzip 1.3.8 (2006-12-08)
130
131 * Fix some gzip problems:
132   - A security fix from Debian 1.3.5-5 was inadvertently omitted.
133   - The assembler is now invoked with --noexecstack if supported,
134     so that gzip can better resist stack-smashing attacks.
135
136 Major changes in Gzip 1.3.7 (2006-12-06)
137
138 * Fix some gzip problems:
139   - Refuse to compress setuid or setgid files, or files with the sticky bit.
140   - Fix more race conditions in setting file permissions and owner,
141     removing output files, following symbolic links, and dealing with
142     special files.
143   - Remove most of the code working around ENAMETOOLONG deficiencies.
144     Systems with those deficiencies are long-dead, and the workarounds
145     had race conditions on modern hosts.
146   - Catch CPU time and file size limit signals, too.
147   - Check for read errors when closing files.
148   - Fix a core dump caused by a stray abort mistakenly introduced in 1.3.6.
149 * Fix some gzexe problems:
150   - Improve resistance to denial-of-service attacks.
151   - Fix some quoting and escaping bugs.
152   - Do not assume /tmp is sticky (though it should be!).
153   - Do not assume the working directory can be written.
154   - Rely on PATH in the generated executable, as the man page says.
155   - Don't assume IFS is sane.
156   - Exit with signal's status, if signaled.
157
158 Major changes in Gzip 1.3.6 (2006-11-20)
159
160 * Fix some race conditions in setting file time stamps, permissions, and owner.
161 * Fix some race conditions in signal handling.
162 * When gzip exits due to a signal, it exits with the signal's status, not 1.
163 * gzip now restores file time stamps to the resolution supported by the
164   time-setting primitives of the operating system, typically 1 microsecond.
165   Formerly it restored them only to the nearest second.
166 * gzip -r no longer attempts to reset the last-access times of directories
167   it reads, as this messes up when other processes are reading the directories.
168 * The options --version and --help now work on all gzip-installed executables,
169   and now use a format similar to other GNU programs.
170 * The manual is now distributed under the terms of the GNU Free
171   Documentation License without invariant sections or cover texts.
172 * Port to current versions of Autoconf, Automake, and Gnulib.
173
174 Major changes from 1.3.4 to 1.3.5
175 * gzip now removes any output symlink before writing output file.
176 * zgrep etc. scripts now port to POSIX 1003.1-2001 hosts.
177 * zforce no longer assumes 14-byte file name length limit.
178 * zless is now implemented using less and LESSOPEN, not zmore and PAGER.
179 * assembly-language speedups reenabled; were mistakenly disabled in 1.3.
180
181 Major changes from 1.3.3 to 1.3.4
182 * Less output is lost when decompressing a truncated file.
183 * The manual is now distributed under the terms of the GNU Free
184   Documentation License.
185
186 No major changes in 1.3.2 or 1.3.3 (bug fixes only)
187
188 Major changes from 1.3 to 1.3.1
189 * zgrep now supports --, -H, -h, -L, -l, -C, -d, -m and their long equivalents.
190
191 Major changes from 1.2.4 to 1.3
192 * Add support for large files, e.g. files larger than 2 GB on Solaris 2.6.
193 * Adjust file size listing format for files larger than 10 GB.
194 * New command `zless'.
195 * `zdiff' now reports exit status like `diff' does.
196 * `zcat' is now always called `zcat', not `gzcat'.
197   Similarly for `zdiff', `zgrep', `zmore', `znew', `zforce'.
198 * Warn about a compressed file's trailing zeros only if verbose,
199   for compatibility with recent versions of GNU tar.
200 * Conform to changes to GNU makefile standards.
201 * Port to Autoconf 2.13.
202 * Convert to Automake.
203 * Fix bugs in the following areas:
204   - files larger than 4 GB
205   - security hole involving symlinks from /tmp
206   - security hole involving long file names
207   - permissions bug when compressing a symbolic link to a file
208   - core dumps
209   - concatenated compressed files on INBUFSIZ boundaries
210   - porting bugs on hosts with signed chars
211   - porting bug with upper and lower case
212   - porting bug for hosts that reserve the names `basename' or `warning'
213
214 Major changes from 1.2.3 to 1.2.4
215 * By default, do not restore file name and timestamp from those saved
216   inside the .gz file (behave as 'compress'). Added the --name option
217   to force name and timestamp restoration.
218 * Accept - as synonym for stdin.
219 * Use manlinks=so or ln to support either hard links or .so in man pages
220 * Accept foo.gz~ in zdiff.
221 * Added support for Windows NT
222 * Handle ENAMETOOLONG for strict Posix systems
223 * Use --recursive instead of --recurse to comply with Webster and
224   the GNU stdandard.
225 * Allow installation of shell scripts with a g prefix: make G=g install
226 * Install by default zcat as gzcat if gzcat already exists in path.
227 * Let zmore behave as more when invoked without parameters (give help)
228 * Let gzip --list reject files not in gzip format even with --force.
229 * Don't complain about non gzip files for options -rt or -rl.
230 * Added advice in INSTALL for several systems.
231
232 Major changes from 1.2.2 to 1.2.3
233 * Don't display the output name when decompressing except with --verbose.
234 * Remove usage of alloca in getopt.c and all makefiles.
235 * Added the zfile shell script in subdirectory sample.
236 * Moved the list of compiler bugs from README to INSTALL.
237 * Added vms/Readme.vms.
238
239 Major changes from 1.2.1 to 1.2.2
240 * Fix a compilation error on Sun with cc (worked with gcc).
241
242 Major changes from 1.2 to 1.2.1
243 * Let zmore act as more if the data is not gzipped.
244 * made gzexe more secure (don't rely on PATH).
245 * By default, display output name only when the name was actually truncated.
246
247 Major changes from 1.1.2 to 1.2
248 * Added the --list option to display the file characteristics.
249 * Added the --no-name option: do not save or restore original filename
250   Save the original name by default.
251 * Allow gunzip --suffix "" to attempt decompression on any file
252   regardless of its extension if an original name is present.
253 * Add support for the SCO compress -H format.
254 * gzip --fast now compresses faster (speed close to that of compress)
255   with degraded compression ratio (but still better than compress).
256   Default level changed to -6 (acts exactly as previous level -5) to
257   be a better indication of its placement in the speed/ratio range.
258 * Use smart name truncation: 123456789012.c -> 123456789.c.gz
259    instead of 12345678901.gz
260 * With --force, let zcat pass non gzip'ed data unchanged (zcat == cat)
261 * Added the zgrep shell script.
262 * Made sub.c useful for 16 bit sound, 24 bit images, etc..
263 * Suppress warnings about suffix for gunzip -r, except with --verbose.
264 * On MSDOS, use .gz extension when possible (files without extension)
265 * Moved the sample programs to a subdirectory sample.
266 * Added a "Special targets" section in INSTALL.
267
268 Major changes from 1.1.1 to 1.1.2.
269 * Fix serious bug for VMS (-gz not removed when decompressing).
270 * Allow suffix other than .gz in znew.
271 * Do not display compression ratio when decompressing stdin.
272 * In zmore.in, work around brain damaged stty -g (Ultrix).
273 * Display a correct compression ratio for .Z files.
274 * Added .z to .gz renaming script in INTALL.
275 * Allow setting CFLAGS in configure.
276
277 Major changes from 1.1 to 1.1.1.
278 * Fix serious bug in vms.c (affects Vax/VMS only).
279 * Added --ascii option.
280 * Add workaround in configure.in for Ultrix (quote eval argument)
281
282 Major changes from 1.0.7 to 1.1.
283 * Use .gz suffix by default, add --suffix option.
284 * Let gunzip accept a "_z" suffix (used by one 'compress' on Vax/VMS).
285 * Quit when reading garbage from stdin instead of reporting an error.
286 * Added makefile for VAX/MMS and support for wildcards on VMS.
287 * Added support for MSC under OS/2.
288 * Added support for Prime/PRIMOS.
289 * Display compression ratio also when decompressing (with --verbose).
290 * Quit after --version (GNU standard)
291 * Use --force to bypass isatty() check
292 * Continue processing other files in case of recoverable error.
293 * Added comparison of zip and gzip in the readme file.
294 * Added small sample programs (ztouch, sub, add)
295 * Use less memory when compiled with -DSMALL_MEM (for MSDOS).
296 * Remove the "off by more than one minute" time stamp kludge
297
298 Major changes from 1.0.6 to 1.0.7.
299 * Allow zmore to read from standard input (like more).
300 * Support the 68000 (Atari ST) in match.S.
301 * Retry partial writes (required on Linux when gzip is suspended in a pipe).
302 * Allow full pathnames and renamings in gzexe.
303 * Don't let gzexe compress setuid executables or gzip itself.
304 * Added vms/Makefile.gcc for gcc on the Vax.
305 * Allow installation of binaries and shell scripts in different dirs.
306 * Allows complex PAGER variable in zmore (e.g.: PAGER="col -x | more")
307 * Allow installation of zcat as gzcat.
308 * Several small changes for portability to old or weird systems.
309 * Suppress help message and send compressed data to the terminal when
310   gzip is invoked without parameters and without redirection.
311 *  Add compile option GNU_STANDARD to respect the GNU coding standards:
312    with -DGNU_STANDARD, behave as gzip even if invoked under the name gunzip.
313 (I don't like the last two changes, which were requested by the FSF.)
314
315 Major changes from 1.0.5 to 1.0.6.
316 * Let gzexe detect executables that are already gzexe'd.
317 * Keep file attributes in znew and gzexe if cpmod is available.
318 * Don't try restoring record format on VMS (1.0.5 did not work correctly)
319 * Added asm version for 68000 in amiga/match.a.
320   Use asm version for Atari TT and NeXT.
321 * For OS/2, assume HPFS by default, add flag OS2FAT if necessary.
322 * Fixed some bugs in zdiff and define zcmp as a link to zdiff.
323
324
325 Major changes from 1.0.4 to 1.0.5.
326 * For VMS, restore the file type for variable record format, otherwise
327     extract in fixed length format (not perfect, but better than
328     forcing all files to be in stream_LF format).
329 * For VMS, use "-z" default suffix and accept a version number in file names.
330 * For Unix, allow compression of files with name ending in 'z'. Use only
331   .z, .*-z, .tgz, .taz as valid gzip extensions. In the last two cases,
332   extract to .tar by default.
333 * On some versions of MSDOS, files with a 3 character extension could not
334   be compressed.
335 * Garbage collect files in /tmp created by gzexe.
336 * Fix the 'OS code' byte in the gzip header.
337 * For the Amiga, add the missing utime.h and add support for gcc.
338
339
340 Major changes from 1.0.3 to 1.0.4.
341 * Added optimized asm version for 68020.
342 * Add support for DJGPP.
343
344 * Add support for the Atari ST.
345 * Added zforce to rename gzip'ed files with truncated names.
346 * Do not install with name uncompress (some systems rely on the
347   absence of any check in the old uncompress).
348 * Added missing function (fcfree) in msdos/tailor.c
349 * Let gunzip handle .tgz files, and let gzip skip them.
350 * Added -d option (decompress) for gzexe and try preserving file permissions.
351 * Suppress all warnings with -q.
352 * Use GZIP_OPT for VMS to avoid conflict with program name.
353 * ... and many other small changes (see ChangeLog)
354
355
356 Major changes from 1.0.2 to 1.0.3
357 * Added -K option for znew to keep old .Z files if smaller
358 * Added -q option (quiet) to cancel -v in GZIP env variable.
359 * Made gzexe safer on systems with filename limitation to 14 chars.
360 * Fixed bugs in handling of GZIP env variable and incorrect free with Turbo C.
361
362
363 Major changes from 1.0.1 to 1.0.2
364 * Added env variable GZIP for default options. Example:
365    for sh:   GZIP="-8 -v"; export GZIP
366    for csh:  setenv GZIP "-8 -v"
367 * Added support for the Amiga.
368 * znew now keeps the old .Z if it is smaller than the .z file.
369   This can happen for some large and very redundant files.
370 * Do not complain about trailing garbage for record oriented IO (Vax/VMS).
371   This implies however that multi-part gzip files are not supported
372   on such systems.
373 * Added gzexe to compress rarely used executables.
374 * Reduce memory usage (required for MSDOS and useful on all systems).
375 * Preserve time stamp in znew -P (pipe option) if touch -r works.
376
377
378 Major changes from 1.0 to 1.0.1
379 * fix trivial errors in the Borland makefile (msdos/Makefile.bor)
380
381
382 Major changes from 0.8.2 to 1.0
383 * gzip now runs on Vax/VMS
384 * gzip will not not overwrite files without -f when using /bin/sh in
385   background.
386 * Support the test option -t for compressed (.Z) files.
387   Allow some data recovery for bad .Z files.
388 * Added makefiles for MSDOS (Only tested for MSC, not Borland).
389 * still more changes to configure for several systems
390
391
392 Major changes from 0.8.1 to 0.8.2:
393 * yet more changes to configure for Linux and other systems
394 * Allow zcat on a file with multiple links.
395
396
397 Major changes from 0.8 to 0.8.1:
398 * znew has now a pipe option -P to reduce the disk space requirements,
399   but this option does not preserve timestamps.
400 * Fixed some #if directives for compilation with TurboC.
401
402
403 Major changes from 0.7 to 0.8:
404 * gzip can now extract .z files created by 'pack'.
405 * configure should no longer believe that every machine is a 386
406 * Fix the entry for /etc/magic in INSTALL.
407 * Add patch for GNU tar 1.11.1 and a pointer to crypt++.el
408 * Uncompress files with multiple links only with -f.
409 * Fix for uncompress of .Z files on 16-bit machines
410 * Create a correct output name for file names of exactly N-1 chars when
411   the system has a limit of N chars.
412
413
414 Major changes from 0.6 to 0.7:
415 * Use "make check" instead of "make test".
416 * Keep time stamp and pass options to gzip in znew.
417 * Do not create .z.z files with gzip -r.
418 * Allow again gunzip .zip files (was working in 0.5)
419 * Allow again compilation with TurboC 2.0 (was working in 0.4)
420
421
422 Major changes form 0.5 to 0.6:
423 * gunzip reported an error when extracting certain .z files. The .z files
424   produced by gzip 0.5 are correct and can be read by gunzip 0.6.
425 * gunzip now supports multiple compressed members within a single .z file.
426 * Fix the check for i386 in configure.
427 * Added "make test" to check for compiler bugs. (gcc -finline-functions
428   is broken at least on the NeXT.)
429 * Use environment variable PAGER in zmore if it is defined.
430 * Accept gzcat in addition to zcat for people having /usr/bin before
431   /usr/local/bin in their path.
432
433
434 ========================================================================
435
436 Copyright (C) 1999, 2001-2002, 2006-2007, 2009-2013 Free Software Foundation,
437 Inc.
438 Copyright (C) 1992, 1993 Jean-loup Gailly
439
440 Permission is granted to copy, distribute and/or modify this document
441 under the terms of the GNU Free Documentation License, Version 1.3 or
442 any later version published by the Free Software Foundation; with no
443 Invariant Sections, with no Front-Cover Texts, and with no Back-Cover
444 Texts.  A copy of the license is included in the ``GNU Free
445 Documentation License'' file as part of this distribution.