what you don't know can hurt you

NetBSD-SA2001-016.txt.asc

NetBSD-SA2001-016.txt.asc
Posted Feb 5, 2002
Site netbsd.org

NetBSD Security Advisory 2001-016 - The fts functions are provided for traversing UNIX file hierarchies. The NetBSD fts implementation can be tricked to follow symbolic links and can therefore be abused by local users. All NetBSD releases prior to July 9, 2001 are affected by this vulnerability.

tags | local
systems | netbsd, unix
MD5 | 5aaadd17aaa176e5313bc8ffddc587c5

NetBSD-SA2001-016.txt.asc

Change Mirror Download
-----BEGIN PGP SIGNED MESSAGE-----


NetBSD Security Advisory 2001-016
=================================

Topic: unsafe chdir usage in fts(3)

Version: All NetBSD releases prior to July 9, 2001.

Severity: Local users can trick processes that walk file system
trees to perform their actions in the wrong location.

Fixed: NetBSD-current: July 9, 2001
NetBSD-1.5 branch: August 22, 2001 (1.5.2 includes the fix)


Abstract
========

The fts(3) functions can be tricked by a rogue user into performing
actions on incorrect file system hierarchies.


Technical Details
=================

The macro for chdir used in libc/gen/fts (__fts13.c after NetBSD 1.3)
did not perform sufficient safety checks. If any directory (or symlink
to a directory) above the current directory fts was processing was
moved, the fts-using application could be made to descend the wrong
directory sub-tree, and/or ascend above the original starting directory.
Once it has ascended above the starting directory, the process could
descend into an unintended file system hierarchy.

This is particularly dangerous when combined with automated scripts
which run programs such as 'rm -r'.


Solutions and Workarounds
=========================

The following instructions describe how to upgrade your C library
and affected statically linked system binaries by updating your source
tree and rebuilding and installing a new version of the C library
and affected binaries.

* NetBSD-current:

Systems running NetBSD-current dated from before 2001-06-09
should be upgraded to NetBSD-current dated 2001-06-10 or later.

The following directory needs to be updated from the
netbsd-current CVS branch (aka HEAD):
src/lib/libc

To update from CVS, re-build, and re-install libc:
# cd /usr/src/lib/libc
# cvs update -d -P
# make cleandir dependall install


Alternatively, apply the following patch (with potential offset
differences) and rebuild & re-install libc:
ftp://ftp.netbsd.org/pub/NetBSD/security/patches/SA2001-016-fts.patch

To patch, re-build and re-install libc:
# cd /usr/src
# patch < /path/to/SA2001-016-fts.patch
# cd lib/libc
# make cleandir dependall install


The following static binaries must also be rebuilt for the fix
to be complete:
/bin/chmod /bin/cp /bin/ksh /bin/ls /bin/pax /bin/rm
/sbin/dump /sbin/dump_lfs


* NetBSD 1.5, 1.5.1:

Systems running NetBSD releases up to and including 1.5.1 should
apply the following patch (with potential offset differences):
ftp://ftp.netbsd.org/pub/NetBSD/security/patches/SA2001-016-fts-1.5.patch

To patch, re-build and re-install libc
# cd /usr/src
# patch < /path/to/SA2001-016-fts.patch
# cd lib/libc
# make cleandir dependall install


The following static binaries must also be rebuilt for the fix
to be complete:
/bin/chmod /bin/cp /bin/ksh /bin/ls /bin/pax /bin/rm
/sbin/dump /sbin/dump_lfs


Systems running releases older than NetBSD 1.5 should be upgraded to
NetBSD 1.5.1 before applying the fixes described here.


Thanks To
=========

Kris Kennaway for initial notification of the issue.

Christos Zoulas for patches, inspired by Todd C. Miller, and for
clarification of the descriptions in this advisory.


Revision History
================

2001-09-06 Initial release
2001-09-06 Note cd to lib/libc when rebuilding after patching


More Information
================

An up-to-date PGP signed copy of this release will be maintained at
ftp://ftp.netbsd.org/pub/NetBSD/security/advisories/NetBSD-SA2001-016.txt.asc

Information about NetBSD and NetBSD security can be found at
http://www.NetBSD.ORG/ and http://www.NetBSD.ORG/Security/.


Copyright 2001, The NetBSD Foundation, Inc. All Rights Reserved.

$NetBSD: NetBSD-SA2001-016.txt,v 1.11 2001/09/06 15:40:50 lukem Exp $

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

iQCVAwUBO5e9xj5Ru2/4N2IFAQFrowP/XRvd9cz7S4RYNRm1rAPiP+NRnecZD0sH
sP7/PdT9J6W/FG0FjegqvVAvGLIguRijRNY4ZPnJ7S6WzI5VGJTC0LA6FQkhxYwe
ogChnJGl62oZc7gMMYxVxfhf+V6wOLFW1bMhY3u1QA5QPoMkBMyVx/QDKHM8/m9D
RGofO4EyWdg=
=UlMW
-----END PGP SIGNATURE-----

Comments

RSS Feed Subscribe to this comment feed

No comments yet, be the first!

Login or Register to post a comment

File Archive:

August 2019

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

Top Authors In Last 30 Days

File Tags

Systems

packet storm

© 2019 Packet Storm. All rights reserved.

Services
Security Services
Hosting By
Rokasec
close