Mercurial > vanilla
annotate compression/unzip/CVE-2016-9844.patch @ 586:1218a8f753b6
core/busybox: let's re-add /etc/inittab support
While busybox has weird /etc/inittab support the predefined actions without it
are too minimalistic so re-add the support for it but don't install an
/etc/inittab file.
The file /etc/inittab file is still installed with sysvinit but if someone wants
to use busybox's init it should create its own /etc/inittab file with the
busybox syntax and do not install sysvinit afterwards.
author | David Demelier <markand@malikania.fr> |
---|---|
date | Mon, 08 Jul 2019 20:35:00 +0200 |
parents | 8c4366128400 |
children |
rev | line source |
---|---|
452
8c4366128400
compression/unzip: initial import, closes #1553
David Demelier <markand@malikania.fr>
parents:
diff
changeset
|
1 From: "Steven M. Schweda" <sms@antinode.info> |
8c4366128400
compression/unzip: initial import, closes #1553
David Demelier <markand@malikania.fr>
parents:
diff
changeset
|
2 Subject: Fix CVE-2016-9844, buffer overflow in zipinfo |
8c4366128400
compression/unzip: initial import, closes #1553
David Demelier <markand@malikania.fr>
parents:
diff
changeset
|
3 Bug-Debian: https://bugs.debian.org/847486 |
8c4366128400
compression/unzip: initial import, closes #1553
David Demelier <markand@malikania.fr>
parents:
diff
changeset
|
4 Bug-Ubuntu: https://launchpad.net/bugs/1643750 |
8c4366128400
compression/unzip: initial import, closes #1553
David Demelier <markand@malikania.fr>
parents:
diff
changeset
|
5 X-Debian-version: 6.0-21 |
8c4366128400
compression/unzip: initial import, closes #1553
David Demelier <markand@malikania.fr>
parents:
diff
changeset
|
6 |
8c4366128400
compression/unzip: initial import, closes #1553
David Demelier <markand@malikania.fr>
parents:
diff
changeset
|
7 --- a/zipinfo.c |
8c4366128400
compression/unzip: initial import, closes #1553
David Demelier <markand@malikania.fr>
parents:
diff
changeset
|
8 +++ b/zipinfo.c |
8c4366128400
compression/unzip: initial import, closes #1553
David Demelier <markand@malikania.fr>
parents:
diff
changeset
|
9 @@ -1921,7 +1921,18 @@ |
8c4366128400
compression/unzip: initial import, closes #1553
David Demelier <markand@malikania.fr>
parents:
diff
changeset
|
10 ush dnum=(ush)((G.crec.general_purpose_bit_flag>>1) & 3); |
8c4366128400
compression/unzip: initial import, closes #1553
David Demelier <markand@malikania.fr>
parents:
diff
changeset
|
11 methbuf[3] = dtype[dnum]; |
8c4366128400
compression/unzip: initial import, closes #1553
David Demelier <markand@malikania.fr>
parents:
diff
changeset
|
12 } else if (methnum >= NUM_METHODS) { /* unknown */ |
8c4366128400
compression/unzip: initial import, closes #1553
David Demelier <markand@malikania.fr>
parents:
diff
changeset
|
13 - sprintf(&methbuf[1], "%03u", G.crec.compression_method); |
8c4366128400
compression/unzip: initial import, closes #1553
David Demelier <markand@malikania.fr>
parents:
diff
changeset
|
14 + /* 2016-12-05 SMS. |
8c4366128400
compression/unzip: initial import, closes #1553
David Demelier <markand@malikania.fr>
parents:
diff
changeset
|
15 + * https://launchpad.net/bugs/1643750 |
8c4366128400
compression/unzip: initial import, closes #1553
David Demelier <markand@malikania.fr>
parents:
diff
changeset
|
16 + * Unexpectedly large compression methods overflow |
8c4366128400
compression/unzip: initial import, closes #1553
David Demelier <markand@malikania.fr>
parents:
diff
changeset
|
17 + * &methbuf[]. Use the old, three-digit decimal format |
8c4366128400
compression/unzip: initial import, closes #1553
David Demelier <markand@malikania.fr>
parents:
diff
changeset
|
18 + * for values which fit. Otherwise, sacrifice the "u", |
8c4366128400
compression/unzip: initial import, closes #1553
David Demelier <markand@malikania.fr>
parents:
diff
changeset
|
19 + * and use four-digit hexadecimal. |
8c4366128400
compression/unzip: initial import, closes #1553
David Demelier <markand@malikania.fr>
parents:
diff
changeset
|
20 + */ |
8c4366128400
compression/unzip: initial import, closes #1553
David Demelier <markand@malikania.fr>
parents:
diff
changeset
|
21 + if (G.crec.compression_method <= 999) { |
8c4366128400
compression/unzip: initial import, closes #1553
David Demelier <markand@malikania.fr>
parents:
diff
changeset
|
22 + sprintf( &methbuf[ 1], "%03u", G.crec.compression_method); |
8c4366128400
compression/unzip: initial import, closes #1553
David Demelier <markand@malikania.fr>
parents:
diff
changeset
|
23 + } else { |
8c4366128400
compression/unzip: initial import, closes #1553
David Demelier <markand@malikania.fr>
parents:
diff
changeset
|
24 + sprintf( &methbuf[ 0], "%04X", G.crec.compression_method); |
8c4366128400
compression/unzip: initial import, closes #1553
David Demelier <markand@malikania.fr>
parents:
diff
changeset
|
25 + } |
8c4366128400
compression/unzip: initial import, closes #1553
David Demelier <markand@malikania.fr>
parents:
diff
changeset
|
26 } |
8c4366128400
compression/unzip: initial import, closes #1553
David Demelier <markand@malikania.fr>
parents:
diff
changeset
|
27 |
8c4366128400
compression/unzip: initial import, closes #1553
David Demelier <markand@malikania.fr>
parents:
diff
changeset
|
28 for (k = 0; k < 15; ++k) |