[11464] in bugtraq

home help back first fref pref prev next nref lref last post

Insecure use of file in /tmp by trn

daemon@ATHENA.MIT.EDU (Martin Schulze)
Sat Aug 21 11:49:13 1999

Mime-Version: 1.0
Content-Type: multipart/signed; boundary=Kynn+LdAwU9N+JqL; micalg=pgp-md5;
              protocol="application/pgp-signature"
Message-Id:  <19990819214215.J28824@finlandia.infodrom.north.de>
Date:         Thu, 19 Aug 1999 21:42:15 +0200
Reply-To: Martin Schulze <joey@infodrom.north.de>
From: Martin Schulze <joey@FINLANDIA.INFODROM.NORTH.DE>
X-To:         bugtraq@securityfocus.com
To: BUGTRAQ@SECURITYFOCUS.COM

--Kynn+LdAwU9N+JqL
Content-Type: text/plain; charset=us-ascii

Richard Kettlewell <rjk@sfere.greenend.org.uk> has reported a security
problem with trn.  Trn comes with a newsgroups shell script that uses
a hardcoded filename in /tmp as temporary storage.  As you all know,
this could be exploited to overwrite arbitrary files.  If the file
already exists as symbolic link to users files they will be
overwritten.

This was not intentional by the author, he tried to use tempfile(1) to
create the temporary filename.  However, due to a thinko, the name was
hardcoded into the script.

I propose this patch against version 3.6.

diff -u -Nur --exclude CVS orig/trn-3.6/newsgroups.SH trn-3.6/newsgroups.SH
--- orig/trn-3.6/newsgroups.SH  Thu Aug 19 12:05:40 1999
+++ trn-3.6/newsgroups.SH       Thu Aug 19 12:04:59 1999
@@ -33,7 +33,7 @@
 #NORMAL~*) active=\`$filexp \$active\` ;;
 #NORMALesac
 #NNTP
-#NNTPactive=`tempfile -p active`   #"/tmp/active.\$\$"
+#NNTPactive=\`tempfile -p active\`   #"/tmp/active.\$\$"
 #NNTPrnlib=$privlib
 #NNTPcase \$rnlib in
 #NNTP~*) rnlib=\`$filexp \$rnlib\` ;;

Regards,

        Joey

--
Debian GNU/Linux      .    Security Managers     .   security@debian.org
              debian-security-announce@lists.debian.org
  Christian Hudon     .     Wichert Akkerman     .     Martin Schulze
<chrish@debian.org>   .   <wakkerma@debian.org>  .   <joey@debian.org>

--Kynn+LdAwU9N+JqL
Content-Type: application/pgp-signature

-----BEGIN PGP SIGNATURE-----
Version: 2.6.3ia

iQCVAwUBN7xeFxRNm5Suj3z1AQGJ7AQAjhuZEKJgJ6II/gTnD09HI8FXyCIwMz3E
oxfQ77qSYl20vQzPvNNiv8QXjdvTATLnyj6QCdvtYI3DX3kEDuci90DoR8kvhPT9
H05sXsL84IxffAn6T+pGZ0cxjzy7Qd1AO2NYVSLQrOmES2DgDKKSD3YafjwxfpUG
PpiiJyBuzIM=
=03W+
-----END PGP SIGNATURE-----

--Kynn+LdAwU9N+JqL--

home help back first fref pref prev next nref lref last post