what you don't know can hurt you

FreeBSD Security Advisory 2002.1

FreeBSD Security Advisory 2002.1
Posted Jan 11, 2002
Authored by The FreeBSD Project | Site freebsd.org

FreeBSD Security Advisory FreeBSD-SA-02:01 - Pkg_add allows local attackers to modify the package contents and potentially elevate privileges or otherwise compromise the system.

tags | local
systems | freebsd
MD5 | 8c47552cc1bc260be26ebcefc5aca401

FreeBSD Security Advisory 2002.1

Change Mirror Download

FreeBSD-SA-02:01 Security Advisory
FreeBSD, Inc.

Topic: Directory permission vulnerability in pkg_add [REVISED]

Category: core
Module: pkg_install
Announced: 2002-01-04
Revised: 2002-01-07
Credits: The Anarcat <anarcat@anarcat.dyndns.org>
Affects: All versions of FreeBSD prior to the correction date.
Corrected: 2001/11/22 17:40:36 UTC (4.4-STABLE aka RELENG_4)
2001/12/07 20:58:46 UTC (4.4-RELEASEp1 aka RELENG_4_4)
2001/12/07 20:57:19 UTC (4.3-RELEASEp21 aka RELENG_4_3)
FreeBSD only: NO

0. Revision History

v1.0 2002-01-04 Initial release
v1.1 2002-01-07 Correct terminology in problem description.

I. Background

pkg_add is a utility program used to install software package
distributions on FreeBSD systems.

II. Problem Description

pkg_add extracts the contents of the package to a temporary directory,
then moves files from the temporary directory to their ultimate
destination on the system. The temporary directory used in the
extraction was created with world-searchable permissions, allowing
arbitrary users to examine the contents of the package as it was
being extracted. This might allow users to attack world-writable
parts of the package during installation.

III. Impact

A local attacker may be able to modify the package contents and
potentially elevate privileges or otherwise compromise the system.
There are no known exploits as of the date of this advisory.

IV. Workaround

1) Remove or discontinue use of the pkg_add binary until it has
been upgraded.

2) When running pkg_add, create a secure temporary directory (such
as /var/tmp/inst) and secure the directory permissions (chmod 700
/var/tmp/inst). Set the TMPDIR environment variable to this
directory before running pkg_add.

V. Solution

1) Upgrade your vulnerable FreeBSD system to 4.4-STABLE, or the
RELENG_4_4 or RELENG_4_3 security branches dated after the respective
correction dates.

2) FreeBSD 4.x systems prior to the correction date:

The following patch has been verified to apply to FreeBSD 4.3-RELEASE,
4.4-RELEASE, and 4-STABLE dated prior to the correction date. This
patch may or may not apply to older, unsupported releases of FreeBSD.

Download the patch and the detached PGP signature from the following
locations, and verify the signature using your PGP utility.


Execute the following commands as root:

# cd /usr/src
# patch -p < /path/to/patch
# cd /usr/src/usr.sbin/pkg_install
# make depend && make all install

VI. Correction details

The following list contains the $FreeBSD$ revision numbers of each
file that was corrected in the FreeBSD source

Path Revision
- -------------------------------------------------------------------------
HEAD 1.37
- -------------------------------------------------------------------------

VII. References

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


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


RSS Feed Subscribe to this comment feed

No comments yet, be the first!

Login or Register to post a comment

File Archive:

July 2017

  • Su
  • Mo
  • Tu
  • We
  • Th
  • Fr
  • Sa
  • 1
    Jul 1st
    2 Files
  • 2
    Jul 2nd
    3 Files
  • 3
    Jul 3rd
    15 Files
  • 4
    Jul 4th
    4 Files
  • 5
    Jul 5th
    15 Files
  • 6
    Jul 6th
    15 Files
  • 7
    Jul 7th
    10 Files
  • 8
    Jul 8th
    2 Files
  • 9
    Jul 9th
    10 Files
  • 10
    Jul 10th
    15 Files
  • 11
    Jul 11th
    15 Files
  • 12
    Jul 12th
    19 Files
  • 13
    Jul 13th
    16 Files
  • 14
    Jul 14th
    15 Files
  • 15
    Jul 15th
    3 Files
  • 16
    Jul 16th
    2 Files
  • 17
    Jul 17th
    8 Files
  • 18
    Jul 18th
    11 Files
  • 19
    Jul 19th
    15 Files
  • 20
    Jul 20th
    15 Files
  • 21
    Jul 21st
    15 Files
  • 22
    Jul 22nd
    6 Files
  • 23
    Jul 23rd
    0 Files
  • 24
    Jul 24th
    0 Files
  • 25
    Jul 25th
    0 Files
  • 26
    Jul 26th
    0 Files
  • 27
    Jul 27th
    0 Files
  • 28
    Jul 28th
    0 Files
  • 29
    Jul 29th
    0 Files
  • 30
    Jul 30th
    0 Files
  • 31
    Jul 31st
    0 Files

Top Authors In Last 30 Days

File Tags


packet storm

© 2016 Packet Storm. All rights reserved.

Security Services
Hosting By