Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 68405 - app-arch/gzip: Insecure tmpfile use
Summary: app-arch/gzip: Insecure tmpfile use
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Security
Classification: Unclassified
Component: Vulnerabilities (show other bugs)
Hardware: All All
: High normal (vote)
Assignee: Gentoo Security
URL: http://www.trustix.org/errata/2004/0050
Whiteboard: B3 [noglsa]
Keywords:
Depends on:
Blocks:
 
Reported: 2004-10-21 07:57 UTC by Thierry Carrez (RETIRED)
Modified: 2009-07-13 22:32 UTC (History)
1 user (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
zdiff.in-tempfile.patch (zdiff.in-tempfile.patch,971 bytes, patch)
2004-10-24 17:07 UTC, Luke Macken (RETIRED)
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Thierry Carrez (RETIRED) gentoo-dev 2004-10-21 07:57:23 UTC
CAN-2004-0970

The (1) gzexe, (2) zdiff, and (3) znew scripts in the gzip package in
Trustix Secure Linux 1.5 through 2.1, and possibly other operating
systems, allows local users to overwrite files via a symlink attack on
temporary files.
Comment 1 Thierry Carrez (RETIRED) gentoo-dev 2004-10-21 08:17:03 UTC
We use an unpatched zdiff that looks vulnerable :

---------------snip----------------
gzip -cdfq "$2" > /tmp/"$F".$$ || exit
---------------snip----------------

However there doesn't seem to be any patches out there for that one... Maybe lewk could find one ?
Comment 2 Luke Macken (RETIRED) gentoo-dev 2004-10-24 17:07:17 UTC
Created attachment 42521 [details, diff]
zdiff.in-tempfile.patch

Patch to fix tempfile vulnerabilities in zdiff.
Comment 3 Luke Macken (RETIRED) gentoo-dev 2004-10-24 17:10:12 UTC
base-system, please verify and apply patch.
Comment 4 Thierry Carrez (RETIRED) gentoo-dev 2004-10-25 04:50:12 UTC
Patch looks good to me...
Comment 5 solar (RETIRED) gentoo-dev 2004-10-26 16:27:39 UTC
Old - gzip-1.3.5-r1
KEYWORDS="x86 ppc sparc mips alpha arm hppa amd64 ~ia64 ~ppc64 ~s390"

New - gzip-1.3.5-r2
KEYWORDS="~x86 ~ppc ~sparc ~mips ~alpha ~arm ~hppa ~amd64 ~ia64 ~ppc64 ~s390"

ppc64/ia64/s390 still have 1.3.3-r4 stable.

The changes are so minor that I would think the arches would prefer to have this 
go right into it's stable if it was stable on 1.3.5-r1. But for GLSA's and tools 
it's always best to rev bump.

Arch maintainers in the future what do you prefer when the changes are so tiny 
and dont effect the object code?
1) That you always be the one todo it.
2) That other I/we use our best judgement and save you a few mails & cpu cycles.
Comment 6 solar (RETIRED) gentoo-dev 2004-10-26 16:28:44 UTC
Oh arch-maintainers please test and mark gzip-1.3.5-r2 as stable
Comment 7 Gustavo Zacarias (RETIRED) gentoo-dev 2004-10-26 17:00:10 UTC
sparc tasty.
Comment 8 Travis Tilley (RETIRED) gentoo-dev 2004-10-26 18:03:48 UTC
stable on amd64.
Comment 9 Joe Jezak (RETIRED) gentoo-dev 2004-10-26 19:52:37 UTC
Tested and marked stable on ppc
Comment 10 Bryan Østergaard (RETIRED) gentoo-dev 2004-10-27 01:48:36 UTC
Stable on alpha.
Comment 11 Hardave Riar (RETIRED) gentoo-dev 2004-10-27 16:04:40 UTC
Stable on mips.
Comment 12 Seemant Kulleen (RETIRED) gentoo-dev 2004-10-27 16:56:48 UTC
stable on x86
Comment 13 Thierry Carrez (RETIRED) gentoo-dev 2004-10-28 00:30:06 UTC
Only zdiff is affected, so it's a B3 : security, please vote on GLSA need.
Comment 14 SpanKY gentoo-dev 2004-10-28 05:18:19 UTC
arm/hppa/ia64/s390 stable
Comment 15 Kurt Lieber (RETIRED) gentoo-dev 2004-10-28 11:57:38 UTC
zdiff is fairly obscure...I'll go with no on this one.
Comment 16 Luke Macken (RETIRED) gentoo-dev 2004-10-28 12:03:10 UTC
Closing without GLSA.
Comment 17 Tom Gall (RETIRED) gentoo-dev 2004-10-30 08:59:13 UTC
stable on ppc64