SecurityTracker.com
    Home    |    View Topics    |    Search    |    Contact Us    |   

SecurityTracker
Archives


 


Category:   Application (Generic)  >   Util-linux Vendors:   Valente, Salvatore et al
(Mandrake Issues Fix for Multi Network Firewall) Util-linux Collection of Utilities Contains a File Sharing Flaw and Race Condition That Allows Local Users to Gain Root Privileges
SecurityTracker Alert ID:  1006177
SecurityTracker URL:  http://securitytracker.com/id/1006177
CVE Reference:   CVE-2002-0638   (Links to External Site)
Date:  Feb 26 2003
Impact:   Modification of system information, Root access via local system
Fix Available:  Yes  Vendor Confirmed:  Yes  

Description:   A vulnerability was reported in a shared component of the 'util-linux' collection of utilities for Linux. A local user can gain root access on the system.

It is reported that the 'setpwnam.c' shared component contains a file access and state flaw that affects several of the utilities in the 'util-linux' collection. The vulnerability can reportedly be exploited through the 'chfn' utility, which is apparently configured with set user id (suid) root privileges. The 'chfn' utility is provided to allow users to modify the personal information stored in the /etc/passwd file and, because of that, must have root privileges. The exploit involves modifying /etc/passwd, as described below and (in greater detail) in the Source Message.

In the 'login-utils/setpwanam.c' file, the code opens the '/etc/ptmptmp' file with O_WRONLY|O_CREAT flags and 0644 permissions. This file is then linked to '/etc/ptmp' (the process will exit on failure) and '/etc/ptmptmp' is removed. The file descriptor originally obtained is later used for writing data to create the new '/etc/passwd/' contents using the fputs() function. When writing is completed, '/etc/passwd.OLD' is removed, '/etc/passwd' is linked to '/etc/passwd.OLD', and '/etc/ptmp' is renamed to '/etc/passwd'.

The vulnerability arises when the calling process is terminated abnormally, leaving the '/etc/ptmp'. This effective creates a lock on all calling applications, causing the administrator to have to manually remove the file.

If the calling process (chfn, for example) is stopped by SIGSTOP after the '/etc/ptmptmp' file is linked to '/etc/ptmp' but before '/etc/ptmptmp' is removed, and then the administrator removes the '/etc/ptmp' file, a local user can execute another copy of the calling process (chfn), opening the existing '/etc/ptmptmp' and writing the file successfully. The local user can then restart the original process using SIGCONT (which still has an open file descriptor to '/etc/ptmptmp' [later changed to '/etc/ptmp'], resulting in the file being renamed to '/etc/passwd'.

Certain care must be taken to properly control the contents written to the file (see the Source Message for a detailed description of the necessary steps).

Impact:   A local user may be able to write arbitrary data to the '/etc/passwd' file to gain root privileges on the system.
Solution:   Mandrake has released a fix for Multi Network Firewall 8.2. The fix includes many other fixes (other than the vulnerability reported in this Alert) and is issued to bring the Multi Network Firewall up to the same errata level as Mandrake Linux 8.2 with all patches and updates available to date applied.

See the Source Message for steps to follow to perform the update.

The updated packages are:

Multi Network Firewall 8.2:
4fbbae7ed753724e30befbff27f79c2e mnf8.2/RPMS/apache-1.3.23-4.2mdk.i586.rpm
4036e5f290d92df8687f42cd201ce636 mnf8.2/RPMS/apache-common-1.3.23-4.2mdk.i586.rpm
1acd55dcc57109432a1161a4096a8044 mnf8.2/RPMS/apache-modules-1.3.23-4.2mdk.i586.rpm
c7f1531bd7dd52182efe9131fb12c5cc mnf8.2/RPMS/libcups1-1.1.18-1.1mdk.i586.rpm
22771586df09a081fdd8c00b84a01611 mnf8.2/RPMS/libpython2.2-2.2-9.1mdk.i586.rpm
42ff78fc528a12c85074b9930e5dca40 mnf8.2/RPMS/losetup-2.11n-4.4mdk.i586.rpm
f904c67014011798617ddf69c956cc00 mnf8.2/RPMS/mod_ssl-2.8.7-3.2mdk.i586.rpm
95d6fa4f6657799dc47eaeb5cb77cafc mnf8.2/RPMS/mount-2.11n-4.4mdk.i586.rpm
77cdc3912443eadf59ca53284d0340e2 mnf8.2/RPMS/nss_ldap-202-1.1mdk.i586.rpm
7bedf2566a7b316ab6310f4423bcc19c mnf8.2/RPMS/openssh-3.4p1-1.1mdk.i586.rpm
c887fa3ed238871954e4f699549dec38 mnf8.2/RPMS/openssh-clients-3.4p1-1.1mdk.i586.rpm
adbca15c1f900be940dca2bafb26c1a6 mnf8.2/RPMS/openssh-server-3.4p1-1.1mdk.i586.rpm
16b952b71669460c7c4b9441b37e2014 mnf8.2/RPMS/pam_ldap-156-1.1mdk.i586.rpm
4d31ff3956aadf4bd3317fc9a1e075d7 mnf8.2/RPMS/perl-URPM-0.70-10_82.1mdk.i586.rpm
3adaec8a682f16962ba52c984fd6270c mnf8.2/RPMS/python-base-2.2-9.1mdk.i586.rpm
91dcff33758dca1ca9a4779186a6917d mnf8.2/RPMS/samba-client-2.2.3a-10.1mdk.i586.rpm
ce98076728c73ca79b78fc9d69b94b47 mnf8.2/RPMS/samba-common-2.2.3a-10.1mdk.i586.rpm
b75828f0b5158a86477a044cc79b4de8 mnf8.2/RPMS/tar-1.13.25-6.2mdk.i586.rpm
33bf02cef205d3b4d4e66c49618a67cf mnf8.2/RPMS/unzip-5.50-2.1mdk.i586.rpm
c8ea86aa4a28b1979d4f4e8a4ce06038 mnf8.2/RPMS/urpmi-4.0-20_82.2mdk.noarch.rpm
1a0cd7a36dc16fc6229812669d2bfc87 mnf8.2/RPMS/util-linux-2.11n-4.4mdk.i586.rpm
857425c168ece34d3c6f01a753abc78e mnf8.2/SRPMS/apache-1.3.23-4.2mdk.src.rpm
d7c2627494871c9a262dbfcd4bda5b17 mnf8.2/SRPMS/mod_ssl-2.8.7-3.2mdk.src.rpm
85ec640296bd1cb5808f9beb7db3a566 mnf8.2/SRPMS/nss_ldap-202-1.1mdk.src.rpm
ae7d14d39519c7a8cf24fb972dabf64b mnf8.2/SRPMS/openssh-3.4p1-1.1mdk.src.rpm
634d9ad35d562a8ebf4f7ba4c8a852c7 mnf8.2/SRPMS/perl-URPM-0.70-10_82.1mdk.src.rpm
d1ac7fa2119ec7c84d408027d44f8525 mnf8.2/SRPMS/python-2.2-9.1mdk.src.rpm
5677dee51659f50acee4e55346ca737d mnf8.2/SRPMS/samba-2.2.3a-10.1mdk.src.rpm
5adf700af4dbd0c483e2957a2006bbbe mnf8.2/SRPMS/tar-1.13.25-6.2mdk.src.rpm
af61004cadf81c51aee95ceaa0f66d17 mnf8.2/SRPMS/unzip-5.50-2.1mdk.src.rpm
4492ec994ea3a8201313e005198bd68a mnf8.2/SRPMS/urpmi-4.0-20_82.2mdk.src.rpm
6bf632bf623ec261d96b63fb267bd4e9 mnf8.2/SRPMS/util-linux-2.11n-4.4mdk.src.rpm

Cause:   Access control error, State error
Underlying OS:  Linux (Mandriva/Mandrake)
Underlying OS Comments:  Multi Network Firewall 8.2

Message History:   This archive entry is a follow-up to the message listed below.
Jul 30 2002 Util-linux Collection of Utilities Contains a File Sharing Flaw and Race Condition That Allows Local Users to Gain Root Privileges



 Source Message Contents

Subject:  [Security Announce] MDKSA-2003:024 - Updated packages fix


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

________________________________________________________________________

                Mandrake Linux Security Update Advisory
________________________________________________________________________

Package name:           MNF8.2
Advisory ID:            MDKSA-2003:024
Date:                   February 25th, 2003

Affected versions:	Multi Network Firewall 8.2
________________________________________________________________________

Problem Description:

 The following packages are now available for Multi Network Firewall 8.2
 and bring it up to the same errata level as Mandrake Linux 8.2 with all
 patches and updates available to date applied.
 
 In order to bring your MNF8.2 configuration up to date, you will have
 to follow a few steps.  First, you will need to setup a urpmi source
 for the updates, regardless of whether you use the web-based update
 tool.  For a list of FTP mirrors, see:
 
 http://www.mandrakesecure.net/en/ftp.php
 
 Select your mirror and add the urpmi source by executing the following
 as root at a command prompt on the MNF8.2 installation:
 
   urpmi.addmedia updates ftp://[server_and_path_to_updates]/mnf8.2/RPMS \
     with ../base/hdlist.cz
 
 Once the media has been added, install gnupg by executing:
 
   urpmi gnupg
 
 You may now upgrade packages using urpmi or the web tool, however the 
 order of installation is important.  Upgrade urpmi itself by executing:
 
   urpmi urpmi
 
 Now you can upgrade all of the outstanding updates by executing:
 
   urpmi --auto-select
 
 To update the list of available packages automatically, you may choose
 to run a cron job, for example:
 
   echo "/usr/sbin/urpmi.update -a" >>/etc/cron.daily/urpmi-update
   chmod 700 /etc/cron.daily/urpmi-update
 
 Some users may have to adjust their firewall rules to allow FTP access
 to the internet from the firewall (zone "fw" to zone "wan").
________________________________________________________________________

References:
  
  http://www.mandrakesecure.net/en/advisories/advisory.php?name=MDKSA-2003:016
  http://www.mandrakesecure.net/en/advisories/advisory.php?name=MDKSA-2003:001
  http://www.mandrakesecure.net/en/advisories/advisory.php?name=MDKA-2002:022
  http://www.mandrakesecure.net/en/advisories/advisory.php?name=MDKSA-2002:082
  http://www.mandrakesecure.net/en/advisories/advisory.php?name=MDKSA-2002:081
  http://www.mandrakesecure.net/en/advisories/advisory.php?name=MDKSA-2002:075
  http://www.mandrakesecure.net/en/advisories/advisory.php?name=MDKSA-2002:072
  http://www.mandrakesecure.net/en/advisories/advisory.php?name=MDKSA-2002:068
  http://www.mandrakesecure.net/en/advisories/advisory.php?name=MDKSA-2002:066
  http://www.mandrakesecure.net/en/advisories/advisory.php?name=MDKSA-2002:065
  http://www.mandrakesecure.net/en/advisories/advisory.php?name=MDKSA-2002:040-1
________________________________________________________________________

Updated Packages:
  
 Multi Network Firewall 8.2:
 4fbbae7ed753724e30befbff27f79c2e  mnf8.2/RPMS/apache-1.3.23-4.2mdk.i586.rpm
 4036e5f290d92df8687f42cd201ce636  mnf8.2/RPMS/apache-common-1.3.23-4.2mdk.i586.rpm
 1acd55dcc57109432a1161a4096a8044  mnf8.2/RPMS/apache-modules-1.3.23-4.2mdk.i586.rpm
 c7f1531bd7dd52182efe9131fb12c5cc  mnf8.2/RPMS/libcups1-1.1.18-1.1mdk.i586.rpm
 22771586df09a081fdd8c00b84a01611  mnf8.2/RPMS/libpython2.2-2.2-9.1mdk.i586.rpm
 42ff78fc528a12c85074b9930e5dca40  mnf8.2/RPMS/losetup-2.11n-4.4mdk.i586.rpm
 f904c67014011798617ddf69c956cc00  mnf8.2/RPMS/mod_ssl-2.8.7-3.2mdk.i586.rpm
 95d6fa4f6657799dc47eaeb5cb77cafc  mnf8.2/RPMS/mount-2.11n-4.4mdk.i586.rpm
 77cdc3912443eadf59ca53284d0340e2  mnf8.2/RPMS/nss_ldap-202-1.1mdk.i586.rpm
 7bedf2566a7b316ab6310f4423bcc19c  mnf8.2/RPMS/openssh-3.4p1-1.1mdk.i586.rpm
 c887fa3ed238871954e4f699549dec38  mnf8.2/RPMS/openssh-clients-3.4p1-1.1mdk.i586.rpm
 adbca15c1f900be940dca2bafb26c1a6  mnf8.2/RPMS/openssh-server-3.4p1-1.1mdk.i586.rpm
 16b952b71669460c7c4b9441b37e2014  mnf8.2/RPMS/pam_ldap-156-1.1mdk.i586.rpm
 4d31ff3956aadf4bd3317fc9a1e075d7  mnf8.2/RPMS/perl-URPM-0.70-10_82.1mdk.i586.rpm
 3adaec8a682f16962ba52c984fd6270c  mnf8.2/RPMS/python-base-2.2-9.1mdk.i586.rpm
 91dcff33758dca1ca9a4779186a6917d  mnf8.2/RPMS/samba-client-2.2.3a-10.1mdk.i586.rpm
 ce98076728c73ca79b78fc9d69b94b47  mnf8.2/RPMS/samba-common-2.2.3a-10.1mdk.i586.rpm
 b75828f0b5158a86477a044cc79b4de8  mnf8.2/RPMS/tar-1.13.25-6.2mdk.i586.rpm
 33bf02cef205d3b4d4e66c49618a67cf  mnf8.2/RPMS/unzip-5.50-2.1mdk.i586.rpm
 c8ea86aa4a28b1979d4f4e8a4ce06038  mnf8.2/RPMS/urpmi-4.0-20_82.2mdk.noarch.rpm
 1a0cd7a36dc16fc6229812669d2bfc87  mnf8.2/RPMS/util-linux-2.11n-4.4mdk.i586.rpm
 857425c168ece34d3c6f01a753abc78e  mnf8.2/SRPMS/apache-1.3.23-4.2mdk.src.rpm
 d7c2627494871c9a262dbfcd4bda5b17  mnf8.2/SRPMS/mod_ssl-2.8.7-3.2mdk.src.rpm
 85ec640296bd1cb5808f9beb7db3a566  mnf8.2/SRPMS/nss_ldap-202-1.1mdk.src.rpm
 ae7d14d39519c7a8cf24fb972dabf64b  mnf8.2/SRPMS/openssh-3.4p1-1.1mdk.src.rpm
 634d9ad35d562a8ebf4f7ba4c8a852c7  mnf8.2/SRPMS/perl-URPM-0.70-10_82.1mdk.src.rpm
 d1ac7fa2119ec7c84d408027d44f8525  mnf8.2/SRPMS/python-2.2-9.1mdk.src.rpm
 5677dee51659f50acee4e55346ca737d  mnf8.2/SRPMS/samba-2.2.3a-10.1mdk.src.rpm
 5adf700af4dbd0c483e2957a2006bbbe  mnf8.2/SRPMS/tar-1.13.25-6.2mdk.src.rpm
 af61004cadf81c51aee95ceaa0f66d17  mnf8.2/SRPMS/unzip-5.50-2.1mdk.src.rpm
 4492ec994ea3a8201313e005198bd68a  mnf8.2/SRPMS/urpmi-4.0-20_82.2mdk.src.rpm
 6bf632bf623ec261d96b63fb267bd4e9  mnf8.2/SRPMS/util-linux-2.11n-4.4mdk.src.rpm
________________________________________________________________________

Bug IDs fixed (see https://qa.mandrakesoft.com for more information):
________________________________________________________________________

To upgrade automatically, use MandrakeUpdate.  The verification of md5
checksums and GPG signatures is performed automatically for you.

If you want to upgrade manually, download the updated package from one
of our FTP server mirrors and upgrade with "rpm -Fvh *.rpm".  A list of
FTP mirrors can be obtained from:

  http://www.mandrakesecure.net/en/ftp.php

Please verify the update prior to upgrading to ensure the integrity of
the downloaded package.  You can do this with the command:

  rpm --checksig <filename>

All packages are signed by MandrakeSoft for security.  You can obtain
the GPG public key of the Mandrake Linux Security Team from:

  https://www.mandrakesecure.net/RPM-GPG-KEYS

Please be aware that sometimes it takes the mirrors a few hours to
update.

You can view other update advisories for Mandrake Linux at:

  http://www.mandrakesecure.net/en/advisories/

MandrakeSoft has several security-related mailing list services that
anyone can subscribe to.  Information on these lists can be obtained by
visiting:

  http://www.mandrakesecure.net/en/mlist.php

If you want to report vulnerabilities, please contact

  security_linux-mandrake.com

Type Bits/KeyID     Date       User ID
pub  1024D/22458A98 2000-07-10 Linux Mandrake Security Team
  <security linux-mandrake.com>

- -----BEGIN PGP PUBLIC KEY BLOCK-----
Version: GnuPG v1.0.7 (GNU/Linux)

mQGiBDlp594RBAC2tDozI3ZgQsE7XwxurJCJrX0L5vx7SDByR5GHDdWekGhdiday
L4nfUax+SeR9SCoCgTgPW1xB8vtQc8/sinJlMjp9197a2iKM0FOcPlkpa3HcOdt7
WKJqQhlMrHvRcsivzcgqjH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tlc29mdC5j
b20+iFcEExECABcFAjyPnuUFCwcKAwQDFQMCAxYCAQIXgAAKCRCaqNDQIkWKmFi+
AJsHhohgnU3ik4+gy3EdFlB2i/MBoACg6lHn5cnVvTcmgNccWxeNxLLZI5e5AQ0E
OWnn7xAEAOQlTVY4TiNo5V/iP0J1xnqjqlqZsU7yEBKo/gZz6/+hx75RURe1ebiJ
9F779FQbpJ9Epz1KLSXvq974rnVb813zuGdmgFyk+ryA/rTR2RQ8h+EoNkwmATzR
xBXVJb57fFQjxOu4eNjZAtfII/YXb0uyXXrdr5dlJ/3eXrcO4p0XAAMFBACCxo6Z
269s+A4v8C6Ui12aarOQcCDlV8cVG9LkyatU3FNTlnasqwo6EkaP572448weJWwN
6SCXVl+xOYLiK0hL/6Jb/O9Agw75yUVdk+RMM2I4fNEi+y4hmfMh2siBv8yEkEvZ
jTcl3TpkTfzYky85tu433wmKaLFOv0WjBFSikohGBBgRAgAGBQI5aefvAAoJEJqo
0NAiRYqYid0AoJgeWzXrEdIClBOSW5Q6FzqJJyaqAKC0Y9YI3UFlE4zSIGjcFlLJ
EJGXlA==
=yGlX
- -----END PGP PUBLIC KEY BLOCK-----

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

iD8DBQE+XFTWmqjQ0CJFipgRAvnQAKDcm9gUqiBCTf2hPITjfgNbGCrnygCgrQMP
zwXXl+VxDJTe2bNICPVWFAg=
=KRAi
-----END PGP SIGNATURE-----

 
 


Go to the Top of This SecurityTracker Archive Page





Home   |    View Topics   |    Search   |    Contact Us

This web site uses cookies for web analytics. Learn More

Copyright 2021, SecurityGlobal.net LLC