Document ID:57600
Title:Document ID 57600
Synopsis:The gzip(1) Command May Change the Permissions of Hard Linked Files on Solaris 8 Systems
Update Date:2004-10-01

DescriptionTop

Sun(sm) Alert Notification

1. Impact

If a local unprivileged user executes the gzip(1) command and specifies the "-force" or "-f" command line option, files which are hard linked to the target file(s) will have their permissions changed. This could allow other local unprivileged users the ability to read or modify files owned by the invoking user, or system files if gzip(1) is issued by a local privileged user.

2. Contributing Factors

This issue can occur in the following releases:

SPARC Platform

x86 Platform

Notes:

  1. Solaris 7 and Solaris 9 are not affected by this issue.
  2. The described issue only occurs with versions of gzip(1) prior to 1.3.
The version of gzip(1) on a system can be determined by running the following command:

    $ gzip --version    gzip 1.2.4 (18 Aug 93)
    Compilation options:
    DIRENT UTIME STDC_HEADERS HAVE_UNISTD_H                                                                  

3. Symptoms

If the described issue occurs, files that are hard linked to the target file(s) will have their permissions changed to mode 0777 (-rwxrwxrwx).

    $ ln original-file hardlink
    $ ls -l original-file hardlink
    -rw-r--r--   2 user  staff        293 Jun 24 18:33 hardlink
    -rw-r--r--   2 user  staff        293 Jun 24 18:33 original-file
    $ gzip -f original-file
    $ ls -l original-file* hardlink
    -rwxrwxrwx   1 user  staff        293 Jun 24 18:33 hardlink
    -rw-r--r--   1 user  staff        195 Jun 24 18:33 original-file.gz                              
Solution SummaryTop

4. Relief/Workaround

To work around the described issue, avoid using the "-f" or "-force" option with the gzip(1) command.

5. Resolution

This issue is addressed in the following releases:

SPARC Platform

x86 Platform

This Sun Alert notification is being provided to you on an "AS IS" basis. This Sun Alert notification may contain information provided by third parties. The issues described in this Sun Alert notification may or may not impact your system(s). Sun makes no representations, warranties, or guarantees as to the information contained herein. ANY AND ALL WARRANTIES, EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, OR NON-INFRINGEMENT, ARE HEREBY DISCLAIMED. BY ACCESSING THIS DOCUMENT YOU ACKNOWLEDGE THAT SUN SHALL IN NO EVENT BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, PUNITIVE, OR CONSEQUENTIAL DAMAGES THAT ARISE OUT OF YOUR USE OR FAILURE TO USE THE INFORMATION CONTAINED HEREIN. This Sun Alert notification contains Sun proprietary and confidential information. It is being provided to you pursuant to the provisions of your agreement to purchase services from Sun, or, if you do not have such an agreement, the Sun.com Terms of Use. This Sun Alert notification may only be used for the purposes contemplated by these agreements.

Copyright 2000-2004 Sun Microsystems, Inc., 4150 Network Circle, Santa Clara, CA 95054 U.S.A. All rights reserved.

Applies To

Attachments