Your message dated Thu, 24 Feb 2005 17:47:10 -0500
with message-id <[EMAIL PROTECTED]>
and subject line Bug#286395: fixed in mc 1:4.6.0-4.6.1-pre3-1
has caused the attached Bug report to be marked as done.

This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
Bug report if necessary, and/or fix the problem forthwith.

(NB: If you are a system administrator and have no idea what I am
talking about this indicates a serious mail system misconfiguration
somewhere.  Please contact me immediately.)

Debian bug tracking system administrator
(administrator, Debian Bugs database)

--------------------------------------
Received: (at submit) by bugs.debian.org; 20 Dec 2004 00:04:31 +0000
>From [EMAIL PROTECTED] Sun Dec 19 16:04:31 2004
Return-path: <[EMAIL PROTECTED]>
Received: from 148.red-213-96-98.pooles.rima-tde.net (silicio) [213.96.98.148] 
(Debian-exim)
        by spohr.debian.org with esmtp (Exim 3.35 1 (Debian))
        id 1CgB2M-0007TZ-00; Sun, 19 Dec 2004 16:04:31 -0800
Received: from jfs by silicio with local (Exim 4.34)
        id 1CgB2I-0006NL-EN
        for [EMAIL PROTECTED]; Mon, 20 Dec 2004 01:04:26 +0100
Date: Mon, 20 Dec 2004 01:04:26 +0100
From: Javier =?iso-8859-1?Q?Fern=E1ndez-Sanguino_Pe=F1a?= <[EMAIL PROTECTED]>
To: [EMAIL PROTECTED]
Subject: mc-common: Insecure temporary file usage
Message-ID: <[EMAIL PROTECTED]>
Mime-Version: 1.0
Content-Type: multipart/mixed; boundary="XRI2XbIfl/05pQwm"
Content-Disposition: inline
User-Agent: Mutt/1.5.6+20040907i
Delivered-To: [EMAIL PROTECTED]
X-Spam-Checker-Version: SpamAssassin 2.60-bugs.debian.org_2004_03_25 
        (1.212-2003-09-23-exp) on spohr.debian.org
X-Spam-Status: No, hits=-8.0 required=4.0 tests=BAYES_00,HAS_PACKAGE 
        autolearn=no version=2.60-bugs.debian.org_2004_03_25
X-Spam-Level: 


--XRI2XbIfl/05pQwm
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline

Package: mc-common
Version: 4.5.55-1.2
Priority: important
Tags: security

The /etc/mc/mc.menu configuration file defines several insecure usages
of temporary files associated with actions in Midnight commander:
the process PID is not suffient to avoid a targeted symlink attack
and there is no check to see if the temporary file used exists.

The attached patch is an attempt to fix this behaviour using the
tempfile tool.


Regards

Javier

PS: I initially reported this to the security team back in June,
but have not found time to follow up on this issue until today.
Security team, please check
Resent-Message-ID: <[EMAIL PROTECTED]>


--XRI2XbIfl/05pQwm
Content-Type: text/plain; charset=us-ascii
Content-Disposition: attachment; filename="mc.menu.diff"

--- mc.menu.orig        2004-12-20 01:01:03.000000000 +0100
+++ mc.menu     2004-12-20 01:03:04.000000000 +0100
@@ -14,9 +14,10 @@
        
 
 0       Edit a bug report and send it to root
-        ${EDITOR-vi} /tmp/mail.$$
-       test -r /tmp/mail.$$ && mail root < /tmp/mail.$$
-       rm -f /tmp/mail.$$
+       mailfile=`mktemp mail.XXXXXX` || { echo "Error creating temporary 
file!" ; exit 1 ; }
+        ${EDITOR-vi} $mailfile
+       test -r $mailfile && mail root < $mailfile
+       rm -f $mailfile
 
 =+ f \.1$ | f \.3$ | f \.4$ | f \.5$ | f \.6$ | f \.7$ | f \.8$ | f \.man$ & t 
r
 1       Display the file with roff -man
@@ -110,10 +111,11 @@
 + ! t t
 h       Strip headers from current newsarticle
        CHECK=`sed 1q < %f|awk '{print $1}'` 2>/dev/null
+       tempfile=`tempfile` || { echo "Error creating temporary file!" ; exit 1 
; }
        case $CHECK in
          Newsgroups:|Path:)
-             cp %f /tmp/%f.$$ && sed '/^'"$CHECK"' /,/^$/d' /tmp/%f.$$ > %f
-              [ "$?" = "0" ] && rm /tmp/%f.$$
+             cp %f $tempfile && sed '/^'"$CHECK"' /,/^$/d' $tempfile > %f
+              [ "$?" = "0" ] && rm $tempfile
              echo %f: header removed
                ;;
          *)
@@ -126,7 +128,7 @@
        set %u
        while [ -n "$1" ]; do
          CHECK=`sed 1q < $1|awk '{print $1}'` 2>/dev/null
-         WFILE=/tmp/${1}.$$
+         WFILE=`tempfile` || { echo "Error creating temporary file!" ; exit 1 
; }
          case $CHECK in
            Newsgroups:|Path:)
              cp $1 $WFILE && sed '/^'"$CHECK"' /,/^$/d' $WFILE > $1

--XRI2XbIfl/05pQwm--

---------------------------------------
Received: (at 286395-close) by bugs.debian.org; 24 Feb 2005 22:55:37 +0000
>From [EMAIL PROTECTED] Thu Feb 24 14:55:37 2005
Return-path: <[EMAIL PROTECTED]>
Received: from newraff.debian.org [208.185.25.31] (mail)
        by spohr.debian.org with esmtp (Exim 3.35 1 (Debian))
        id 1D4RtR-0001zP-00; Thu, 24 Feb 2005 14:55:37 -0800
Received: from katie by newraff.debian.org with local (Exim 3.35 1 (Debian))
        id 1D4RlG-0002Uq-00; Thu, 24 Feb 2005 17:47:10 -0500
From: Ludovic Drolez <[EMAIL PROTECTED]>
To: [EMAIL PROTECTED]
X-Katie: $Revision: 1.55 $
Subject: Bug#286395: fixed in mc 1:4.6.0-4.6.1-pre3-1
Message-Id: <[EMAIL PROTECTED]>
Sender: Archive Administrator <[EMAIL PROTECTED]>
Date: Thu, 24 Feb 2005 17:47:10 -0500
Delivered-To: [EMAIL PROTECTED]
X-Spam-Checker-Version: SpamAssassin 2.60-bugs.debian.org_2005_01_02 
        (1.212-2003-09-23-exp) on spohr.debian.org
X-Spam-Status: No, hits=-6.0 required=4.0 tests=BAYES_00,HAS_BUG_NUMBER 
        autolearn=no version=2.60-bugs.debian.org_2005_01_02
X-Spam-Level: 
X-CrossAssassin-Score: 7

Source: mc
Source-Version: 1:4.6.0-4.6.1-pre3-1

We believe that the bug you reported is fixed in the latest version of
mc, which is due to be installed in the Debian FTP archive:

mc_4.6.0-4.6.1-pre3-1.diff.gz
  to pool/main/m/mc/mc_4.6.0-4.6.1-pre3-1.diff.gz
mc_4.6.0-4.6.1-pre3-1.dsc
  to pool/main/m/mc/mc_4.6.0-4.6.1-pre3-1.dsc
mc_4.6.0-4.6.1-pre3-1_i386.deb
  to pool/main/m/mc/mc_4.6.0-4.6.1-pre3-1_i386.deb
mc_4.6.0-4.6.1-pre3.orig.tar.gz
  to pool/main/m/mc/mc_4.6.0-4.6.1-pre3.orig.tar.gz



A summary of the changes between this version and the previous one is
attached.

Thank you for reporting the bug, which will now be closed.  If you
have further comments please address them to [EMAIL PROTECTED],
and the maintainer will reopen the bug report if appropriate.

Debian distribution maintenance software
pp.
Ludovic Drolez <[EMAIL PROTECTED]> (supplier of updated mc package)

(This message was generated automatically at their request; if you
believe that there is a problem with it please contact the archive
administrators by mailing [EMAIL PROTECTED])


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Format: 1.7
Date: Mon, 17 Feb 2005 22:45:32 +0100
Source: mc
Binary: mc
Architecture: source i386
Version: 1:4.6.0-4.6.1-pre3-1
Distribution: unstable
Urgency: high
Maintainer: Stefano Melchior <[EMAIL PROTECTED]>
Changed-By: Ludovic Drolez <[EMAIL PROTECTED]>
Description: 
 mc         - midnight commander - a powerful file manager
Closes: 92121 231071 241891 267596 282301 286395 295259 295261
Changes: 
 mc (1:4.6.0-4.6.1-pre3-1) unstable; urgency=high
 .
   * New maintainers: Stefano Melchior and Ludovic Drolez (closes: #282301).
   * Urgency set to high because of security bug fixes.
   * Missing quoting in ext2 and i18n fix.
   * Samba lib warning (netmask.c) fixed.
   * Security upload to handle DSA 639 (references: CAN-2004-1004,
     CAN-2004-1005, CAN-2004-1009, CAN-2004-1090, CAN-2004-1091, CAN-2004-1092,
     CAN-2004-1093, CAN-2004-1174, CAN-2004-1175, CAN-2004-1176),
     Fixed upstream in the pre3 release (Closes: #295261).
   * Pre3 release includes fix for CAN-2004-0226 (closes: #286395).
   * Fixed ftp filesystem impossibility to list dirs when password contains #
     (closes: #92121).
   * Fixed subshell impossibility to be started (closes: #241891).
   * Fixed CAN-2004-0494 (closes: #267596).
   * Fixed buffer overflow and format string vulnerabilities (closes: #295259).
   * Italian hotkey translation changed (closes: #231071).
   * New upstream pre-release.
Files: 
 c8e34240a29a723bc78bdd85463a26f3 691 utils optional mc_4.6.0-4.6.1-pre3-1.dsc
 2bea7e3250efa665d972229e755ac1e6 3900927 utils optional 
mc_4.6.0-4.6.1-pre3.orig.tar.gz
 8c8a3a55fdb76c3105a564e037f06022 25254 utils optional 
mc_4.6.0-4.6.1-pre3-1.diff.gz
 3a6752d5079f576910f291bd752960c8 2003694 utils optional 
mc_4.6.0-4.6.1-pre3-1_i386.deb

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.4 (GNU/Linux)

iD8DBQFCHlNlsRlQAP1GppgRAim8AJwJRGe3QLax1XUU1NmZ35R1TsN4PQCfY8k2
LZo2XB/RBba9ZXrH7kMF12M=
=WFw5
-----END PGP SIGNATURE-----


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]

Reply via email to