TUCoPS :: BSD :: ciaci057.txt

FreeBSD Nfs Kernel Code Error

-----BEGIN PGP SIGNED MESSAGE-----

             __________________________________________________________

                       The U.S. Department of Energy
                    Computer Incident Advisory Capability
                           ___  __ __    _     ___
                          /       |     /_\   /
                          \___  __|__  /   \  \___
             __________________________________________________________

                             INFORMATION BULLETIN

                         FreeBSD NFS Kernel Code Error

June 16, 1998 21:00 GMT                                            Number I-057
______________________________________________________________________________
PROBLEM:       FreeBSD has identified a error in the NFS kernel code.
PLATFORM:      FreeBSD 2.2.* and FreeBSD-stable before 1998/05/31
DAMAGE:        By creating a hard link to a file on a NFS mounted file system,
               it is possible to cause the system to crash.
SOLUTION:      Apply one of the patches. No workaround is known except to
               unmount your NFS file systems.
______________________________________________________________________________
VULNERABILITY  If your systems is vulnerable, patches should be applied as
ASSESSMENT:    soon as possible.
______________________________________________________________________________

[ Start FreeBSD Advisory ]

=============================================================================
FreeBSD-SA-98:05                                            Security Advisory
                                                                FreeBSD, Inc.

Topic:          system crash with NFS

Category:       core
Module:         kernel
Announced:      1998-06-04
Affects:        FreeBSD 2.2.* and FreeBSD-stable before 1998/05/31
                this problem.
Corrected:      FreeBSD-current as of 1998/05/31
FreeBSD only:   no (also other 4.4BSD based systems may be affected)

Patches:        ftp://ftp.freebsd.org/pub/FreeBSD/CERT/patches/SA-98:05/

=============================================================================
IMPORTANT MESSAGE: The FreeBSD security officer now uses the policy
ftp://ftp.freebsd.org/pub/FreeBSD/POLICY.asc for sending out advisories.
=============================================================================

I.   Background   

     NFS can be used to mount remote file systems. Apart from being
     remote, it acts like a normal UFS file system. Among others,
     This means that creating hard links can be done in NFS
     file systems

II.  Problem Description

     When creating hard links on file systems, the kernel checks that
     both the original file and the link to it are located on the same
     file system. Unfortunately, there is an error in the NFS kernel code
     in FreeBSD 2.2.* systems that performs this check.

III. Impact
    
     It is possible to crash a FreeBSD 2.2.* system by hard linking
     a device special files to a file on an NFS mounted file system.

     FreeBSD-current is not vulnerable.

IV.  Workaround

     No real work around is known (except for unmounting your NFS
     file systems).

V.   Solution

     Apply one of the following patches, rebuild your kernel,
     install it and reboot your system.

     The patches below can be found on
        ftp://ftp.freebsd.org/pub/FreeBSD/CERT/patches/SA-98:05/


     Patch for 2.2.5 and 2.2.6 systems:


  Index: nfs_vnops.c
  ===================================================================
  RCS file: /home/cvsup/freebsd/CVS/src/sys/nfs/nfs_vnops.c,v
  retrieving revision 1.36.2.6
  retrieving revision 1.36.2.7
  diff -u -r1.36.2.6 -r1.36.2.7
  --- nfs_vnops.c       1998/05/13 05:48:45     1.36.2.6
  +++ nfs_vnops.c       1998/05/31 00:07:29     1.36.2.7
  @@ -1755,17 +1755,8 @@
                struct componentname *a_cnp;
        } */ *ap;
   {
  -#if defined(__NetBSD__)
  -     /*
  -      * Since the args are reversed in the VOP_LINK() calls,
  -      * switch them back. Argh!
  -      */
  -     register struct vnode *vp = ap->a_tdvp;
  -     register struct vnode *tdvp = ap->a_vp;
  -#else
        register struct vnode *vp = ap->a_vp;
        register struct vnode *tdvp = ap->a_tdvp;
  -#endif
        register struct componentname *cnp = ap->a_cnp;
        register u_long *tl;
        register caddr_t cp;
  @@ -1776,11 +1767,8 @@
        int v3 = NFS_ISV3(vp);
  
        if (vp->v_mount != tdvp->v_mount) {
  -             VOP_ABORTOP(vp, cnp);
  -             if (tdvp == vp)
  -                     vrele(tdvp);
  -             else
  -                     vput(tdvp);
  +             VOP_ABORTOP(tdvp, cnp);
  +             vput(tdvp);
                return (EXDEV);
        }
  

=============================================================================
FreeBSD, Inc.

Web Site:                       http://www.freebsd.org/
Confidential contacts:          security-officer@freebsd.org
Security notifications:         security-notifications@freebsd.org
Security public discussion:     freebsd-security@freebsd.org
PGP Key:                ftp://ftp.freebsd.org/pub/FreeBSD/CERT/public_key.asc

Notice: Any patches in this document may not apply cleanly due to
        modifications caused by digital signature or mailer software.
        Please reference the URL listed at the top of this document
        for original copies of all patches if necessary.
=============================================================================

[ End FreeBSD Advisory ]

______________________________________________________________________________

CIAC wishes to acknowledge the contributions of FreeBSD, Inc. for the
information contained in this bulletin.
______________________________________________________________________________


CIAC, the Computer Incident Advisory Capability, is the computer
security incident response team for the U.S. Department of Energy
(DOE) and the emergency backup response team for the National
Institutes of Health (NIH). CIAC is located at the Lawrence Livermore
National Laboratory in Livermore, California. CIAC is also a founding
member of FIRST, the Forum of Incident Response and Security Teams, a
global organization established to foster cooperation and coordination
among computer security teams worldwide.

CIAC services are available to DOE, DOE contractors, and the NIH. CIAC
can be contacted at:
    Voice:    +1 925-422-8193
    FAX:      +1 925-423-8002
    STU-III:  +1 925-423-2604
    E-mail:   ciac@llnl.gov

For emergencies and off-hour assistance, DOE, DOE contractor sites,
and the NIH may contact CIAC 24-hours a day. During off hours (5PM -
8AM PST), call the CIAC voice number 925-422-8193 and leave a message,
or call 800-759-7243 (800-SKY-PAGE) to send a Sky Page. CIAC has two
Sky Page PIN numbers, the primary PIN number, 8550070, is for the CIAC
duty person, and the secondary PIN number, 8550074 is for the CIAC
Project Leader.

Previous CIAC notices, anti-virus software, and other information are
available from the CIAC Computer Security Archive.

   World Wide Web:      http://www.ciac.org/
                        (or http://ciac.llnl.gov -- they're the same machine)
   Anonymous FTP:       ftp.ciac.org
                        (or ciac.llnl.gov -- they're the same machine)
   Modem access:        +1 (925) 423-4753 (28.8K baud)
                        +1 (925) 423-3331 (28.8K baud)

CIAC has several self-subscribing mailing lists for electronic
publications:
1. CIAC-BULLETIN for Advisories, highest priority - time critical
   information and Bulletins, important computer security information;
2. SPI-ANNOUNCE for official news about Security Profile Inspector
   (SPI) software updates, new features, distribution and
   availability;
3. SPI-NOTES, for discussion of problems and solutions regarding the
   use of SPI products.

Our mailing lists are managed by a public domain software package
called Majordomo, which ignores E-mail header subject lines. To
subscribe (add yourself) to one of our mailing lists, send the
following request as the E-mail message body, substituting
ciac-bulletin, spi-announce OR spi-notes for list-name:

E-mail to       ciac-listproc@llnl.gov or majordomo@tholia.llnl.gov:
        subscribe list-name
  e.g., subscribe ciac-bulletin

You will receive an acknowledgment email immediately with a confirmation
that you will need to mail back to the addresses above, as per the
instructions in the email.  This is a partial protection to make sure
you are really the one who asked to be signed up for the list in question.

If you include the word 'help' in the body of an email to the above address,
it will also send back an information file on how to subscribe/unsubscribe,
get past issues of CIAC bulletins via email, etc.

PLEASE NOTE: Many users outside of the DOE, ESnet, and NIH computing
communities receive CIAC bulletins.  If you are not part of these
communities, please contact your agency's response team to report
incidents. Your agency's team will coordinate with CIAC. The Forum of
Incident Response and Security Teams (FIRST) is a world-wide
organization. A list of FIRST member organizations and their
constituencies can be obtained via WWW at http://www.first.org/.

This document was prepared as an account of work sponsored by an
agency of the United States Government. Neither the United States
Government nor the University of California nor any of their
employees, makes any warranty, express or implied, or assumes any
legal liability or responsibility for the accuracy, completeness, or
usefulness of any information, apparatus, product, or process
disclosed, or represents that its use would not infringe privately
owned rights. Reference herein to any specific commercial products,
process, or service by trade name, trademark, manufacturer, or
otherwise, does not necessarily constitute or imply its endorsement,
recommendation or favoring by the United States Government or the
University of California. The views and opinions of authors expressed
herein do not necessarily state or reflect those of the United States
Government or the University of California, and shall not be used for
advertising or product endorsement purposes.

LAST 10 CIAC BULLETINS ISSUED (Previous bulletins available from CIAC)

I-047: HP-UX OpenMail Vulnerability
I-048: SunOS mountd Vulnerability
I-049: SunOS ufsrestore Vulnerability
I-050: Digital UNIX softlinks - advfs Vulnerability
I-051: FreeBSD T/TCP Vulnerability
I-052: 3Com(r) CoreBuilder and SuperStack II LAN Vulnerabilities
I-053: ISC DHCP Distribution Vulnerability
I-054: Cisco Web Cache Control Protocol Router Vulnerability
I-055: SGI IRIX Vulnerabilities (NetWare Client, diskperf/diskalign
I-056: Cisco PIX Private Link Key Processing and Cryptography Vulnerability

-----BEGIN PGP SIGNATURE-----
Version: 4.0 Business Edition

iQCVAwUBNYbe4bnzJzdsy3QZAQGACAQA0OOkoR48SauV+51CQDh/kWmzA+NwDsRA
DS+PHAZ7SBlaXguj+77fe/3LzOfV0IRvxbhwAI7VJJ+vEIPwel95dgNnZXLmGbYm
vH1RJON5ktLhm+c7LSF/FvSCyiZXJIftNeXnE2EJaq9bV20fsVfVHQz9XxAOLsnN
N3xXv/U17+A=
=UlN6
-----END PGP SIGNATURE-----

TUCoPS is optimized to look best in Firefox® on a widescreen monitor (1440x900 or better).
Site design & layout copyright © 1986-2024 AOH