Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 21 Nov 2001 14:46:34 -0500
From:      The Anarcat <anarcat@anarcat.dyndns.org>
To:        airot@lazir.toya.net.pl
Cc:        FreeBSD Security Issues <FreeBSD-security@FreeBSD.ORG>
Subject:   Re: fun with pkg_add
Message-ID:  <20011121194634.GB69296@shall.anarcat.dyndns.org>
In-Reply-To: <Pine.LNX.4.33.0111212032370.22602-100000@lazir.toya.net.pl>
References:  <20011121191808.GD44370@shall.anarcat.dyndns.org> <Pine.LNX.4.33.0111212032370.22602-100000@lazir.toya.net.pl>

next in thread | previous in thread | raw e-mail | index | archive | help

--0eh6TmSyL6TZE2Uz
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable

On Wed Nov 21, 2001 at 08:38:06PM +0100, airot@lazir.toya.net.pl wrote:
>=20
>=20
> On Wed, 21 Nov 2001, The Anarcat wrote:
>=20
> > Hi!
> >
> > I just noticed something that could be a problem with pkg_add
> > algorithms. When it installs a package, it first untars it in a
> > temporary directory. The problem is that the subdirectories of the
> > package created this way are world-writable:
> >
> > $ ftp -a ftp://ftp.freebsd.org/pub/FreeBSD/ports/packages/All/auctex-10=
.0g.tgz
> > $ pkg_add auctex-10.0g.tgz
> > ^Z
> ^Z is SIGTSTP it susspend prcoesses, there is a very small posibilty that
> our 'attacker' will change somthing when you are installing package. ;-)

Wrong. With large packages such as XFree86, the untarring actually takes
a few minutes, sometimes, and thus leave a large window of attack.

> I didn`t check the /var/tmp/inst* directory permissions, but i guess it`s
> imposible to exploit this security issue.

Again, I do not agree, as I have exploited this security issue.

It might be related to some misconfiguration on my side (but I doubt
it), and it is why I sent this to the list first, to get some
confirmation of the bug.

A.

--0eh6TmSyL6TZE2Uz
Content-Type: application/pgp-signature
Content-Disposition: inline

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.0.6 (FreeBSD)
Comment: For info see http://www.gnupg.org

iEYEARECAAYFAjv8BJkACgkQttcWHAnWiGeaowCeLHroQl3psl6x45uuAglEXYR+
JHAAn3O8j4WknM7fw4/p9e8Zw4KYAjhb
=vcth
-----END PGP SIGNATURE-----

--0eh6TmSyL6TZE2Uz--

To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-security" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20011121194634.GB69296>