Visit our newest sister site!
Hundreds of free aircraft flight manuals
Civilian • Historical • Military • Declassified • FREE!


TUCoPS :: Unix :: General :: ciach082.txt

Lynx Tmp Files And Download Vulnerabilities




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

[ For Public Release ]
             __________________________________________________________

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

                             INFORMATION BULLETIN

               Lynx Temporary Files & LYDownload.c Vulnerabilities

July 16, 1997 16:00 GMT                                            Number H-82
______________________________________________________________________________
PROBLEM:       Two vulnerabilities exist for Lynx: 1) temporary files, and
               2) LYDownload.c.
PLATFORM:      All Unix or Unix-like systems running Lynx up to and including
               version 2.7.1
DAMAGE:        1) May allow local users to gain root privileges.
               2) This vulnerability may be exploited by anyone who can provide
                  Lynx a carefully crafted URL.
SOLUTION:      Apply patches or workarounds listed below.
______________________________________________________________________________
VULNERABILITY  Exploit details involving these vulnerabilities have been made
ASSESSMENT:    publicly available.
______________________________________________________________________________

[ Start CERT Advisories ]

1) Temporary Files

=============================================================================
CERT* Vendor-Initiated Bulletin VB-97.05
July 15, 1997

Topic:   Vulnerability in Lynx Temporary Files
Source:  Jim Spath

To aid in the wide distribution of essential security information, the CERT
Coordination Center is forwarding the following information from Jim Spath,
who coordinated this bulletin with several members of the lynx-dev mailing
list. They urge you to act on this information as soon as possible.
information is included in the forwarded text below; please contact them if
you have any questions or need further information.

Questions about the bulletin only can be sent to Jim Spath
<jspath@mail.bcpl.lib.md.us>; questions about Lynx can be sent to
<lynx-dev@sig.net>.

=======================FORWARDED TEXT STARTS HERE============================

I. Description

Lynx typically stores persistent temporary files in /tmp on Un*x
systems.  The filenames Lynx chooses can be predicted, and another
user on the system may be able to exploit a race condition to replace
the temporary file with a symbolic link or with another file.

Installed versions of Lynx where a directory writeable by other users
(such as /tmp on a machine to which multiple users have access) is used
to store files during download are vulnerable.  This vulnerability can
only be exploited by a user with access to an account on the machine
running Lynx.


II. Impact

A malicious user with access to the same machine as other Lynx users
may be able to cause another user's Lynx process to overwrite another
file.  It may also be possible to replace the contents of a downloaded
file with a file other than the one the user downloaded, or to cause
the user to print a file other than the one selected for printing.


III.  Workarounds

A workaround for Lynx 2.7.1 is described in the "solutions" section
below.


IV.  Solutions

There are several ways to solve this problem.

A. The best solution to the problem is to apply the FOTEMODS patch
   set and to ensure that /tmp/ on your system is a "sticky directory."

   If you cannot apply this patch set, if your system does not support
   sticky directories, or if you cannot make /tmp/ a sticky directory,
   you must use one of the other solutions below.

B. The other solution to this problem is to change the setting
   of TEMP_SPACE from the default ("/tmp/") to non-world-writeable
   directories.

   To do this with unpatched Lynx version 2.7.1:

     1. Lynx can be rebuilt with the "#define TEMP_SPACE" in
        lynx2-7-1/userdefs.h changed from "/tmp" to point to a
        directory only writeable by the user executing Lynx.

     2. The LYNX_TEMP_SPACE environment variable may be set before
        shell startup files (.profile, .cshrc, or equivalent) or into
        the system profile (/etc/profile or equivalent).

     As an aid to allowing Lynx to find user-specific temp. directories,
     Lynx 2.7.1 will replace "~" in the temp. space allocation with the
     path to the user's home directory.

     Individual users may also set the LYNX_TEMP_SPACE environment
     variable to point to another place known to be unwriteable by other
     users (for instance a subdirectory of the users' home directory, or a
     mode 0700 directory of a "sticky" /tmp).

   To do this with Lynx 2.7.1 with the FOTEMODS patch set applied:

     You may use any of the methods listed for "vanilla" Lynx 2.7.1.
     You may also use "$USER" in TEMP_SPACE (or $LYNX_TEMP_SPACE) to
     specify user-specific temp. directories such as /tmp/$USER/.


The FOTEMODS patch set includes the changes described above as well
as other fixes and feature enhancements.  It can be found at:
     http://www.slcc.edu/lynx/fote/patches/


The FOTEMODS patches avoid any pre-existing filenames for new temporary
files, thus skipping any symbolic link which may have been created with
an upcoming temporary filename.  These patches also allow the administrator
or user to define TEMP_SPACE (or the LYNX_TEMP_SPACE environment variable)
as "/tmp/$USER" (for example) for pre-existing directories that correspond
to accounts' usernames and have protections/ACLs set for access only by
the appropriate users.

This patch set also does chmod(600) for temporary files which Lynx
creates, but the account should be set up with an equivalent umask
before invoking Lynx.

C. One other solution (a source code patch) for this problem, by Klaus
   Weide, can be found at:
        http://www.slcc.edu/lynx/klaus/temp/
   However, this patch should be considered "alpha" quality code, and
   its author is not supporting it at this time.


The next release of Lynx will eliminate this vulnerability.  Interested
parties should subscribe to and read the LYNX-DEV mailing list
(send mail to majordomo@sig.net with "subscribe lynx-dev" as the
body) for information about this release.


V. Contact information

If you believe you have found a security problem with the current
version of Lynx, we urge you to forward it to the LYNX-DEV
mailing list at <lynx-dev@sig.net>. 

The LYNX-DEV mailing list (with further information about this
vulnerability) is archived at:
     http://www.flora.org/lynx-dev/

Lynx security information is available at:
     http://www.crl.com/~subir/lynx/security.html

General information about Lynx is available at:
     http://lynx.browser.org/

On-line help and documentation about Lynx is available using the
(h)elp command. More help is available in the source distribution.
Should your questions not be answered by these means, further
questions may be directed to <help@lynx.browser.org>.

Please don't contact Lynx developers personally about Lynx-related
issues; please use either the mailing list or the "help" addresses
given above.


========================FORWARDED TEXT ENDS HERE=============================


2) LYDownload.c

=============================================================================
CERT* Vendor-Initiated Bulletin VB-97.06
July 15, 1997

Topic:   Vulnerability in Lynx Downloading
Source:  Jim Spath

To aid in the wide distribution of essential security information, the CERT
Coordination Center is forwarding the following information from Jim Spath,
who coordinated this bulletin with several members of the lynx-dev mailing
list. They urge you to act on this information as soon as possible. Contact
information is included in the forwarded text below; please contact them if
you have any questions or need further information.

Questions about the bulletin only can be sent to Jim Spath
<jspath@mail.bcpl.lib.md.us>; questions about Lynx can be sent to
<lynx-dev@sig.net>.


=======================FORWARDED TEXT STARTS HERE============================

I. Description

Lynx, on Un*x systems, may be coerced to read or execute arbitrary
files on the local system regardless of restrictions set by the
system administrator.

Installed versions of Lynx up to and including version 2.7.1 on Unix
or Unix-like operating systems are vulnerable.


II. Impact

A. Captive Lynx installations

   Users of Lynx in a captive situation (where the Lynx user does not
   normally have access to a shell prompt, or to a menu system that allows
   the user to run arbitrary commands) can get access to a shell prompt.
   This includes public Lynxes as well as any setup where the user
   is restricted as to which programs can be run.

B. All Lynx installations

   This vulnerability could also conceivably allow malicious webmasters to
   add these carefully crafted URLs to their pages to cause unsuspecting
   Lynx users (in captive accounts or otherwise) to execute arbitrary
commands.

   This vulnerability can be exploited by anyone who can provide Lynx a
   carefully crafted URL.

III. Workaround

If administrators of captive Lynxes cannot apply the code patches or
obtain updated binaries as described below, they are advised to disable
(g)oto on Lynx.

There is currently no workaround for impact "B" above.  The code patches
below must be applied (or updated binaries obtained) to eliminate
this impact.


IV. Solution

Current developmental releases of Lynx have fixed this problem since
1997-06-26.  Patches you may find from before that date may not
entirely eliminate the vulnerability.

The most recent stable version of Lynx (version 2.7.1) can be
patched to fix this problem by replacing the file "lynx2-7-1/src/LYDownload.c"
with a replacement file.

The replacement file to eliminate this vulnerability in version
2.7.1 is available (courtesy of Foteos Macrides) at:
     http://www.slcc.edu/lynx/fote/patches/lynx2-7-1/src/LYDownload.c

All systems running Lynx versions 2.7.1 or earlier should be
updated to fix this problem.

Two development branches of the Lynx source code are available at:
     http://www.slcc.edu/lynx/fote/patches/
     http://www.slcc.edu/lynx/current/

Binary distributions of Lynx may be found at:
     http://www.crl.com/~subir/lynx/binaries.html

Note that producing binaries is a volunteer job and the latest (or any)
version may not be available for a specific platform.


V. Contact information

If you believe you have found a security problem with the current
version of Lynx, we urge you to forward it to the LYNX-DEV
mailing list at <lynx-dev@sig.net>.

The LYNX-DEV mailing list (with further information about this
vulnerability) is archived at:
     http://www.flora.org/lynx-dev/

Lynx security information is available at:
     http://www.crl.com/~subir/lynx/security.html

General information about Lynx is available at:
     http://lynx.browser.org/

On-line help and documentation about Lynx is available using the
(h)elp command. More help is available in the source distribution.
Should your questions not be answered by these means, further
questions may be directed to <help@lynx.browser.org>.

Please don't contact Lynx developers personally about Lynx-related
issues; please use either the mailing list or the "help" addresses
given above.

========================FORWARDED TEXT ENDS HERE=============================


[ End CERT Advisories ]
______________________________________________________________________________

CIAC wishes to acknowledge the contributions of CERT and Jim Spath 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 510-422-8193
    FAX:      +1 510-423-8002
    STU-III:  +1 510-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 510-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://ciac.llnl.gov/
   Anonymous FTP:       ciac.llnl.gov (198.128.39.53)
   Modem access:        +1 (510) 423-4753 (28.8K baud)
                        +1 (510) 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. CIAC-NOTES for Notes, a collection of computer security articles;
3. SPI-ANNOUNCE for official news about Security Profile Inspector
   (SPI) software updates, new features, distribution and
   availability;
4. 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, ciac-notes, 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-notes

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)

H-73: SunOS chkey Vulnerability
H-74: Unix lpr Buffer Overrun Vulnerability
H-75: Solaris Solstice AdminSuite Vulnerabilities
H-76: Netscape Navigator Security Vulnerability
H-77: Microsoft IIS Boundary Condition Vulnerability
H-78: ICMP vulnerability in Windows 95 and NT 4.0
H-79: Vellum 3D CD-ROM contains Mac MBDF Virus
H-80: SGI IRIX xlock Vulnerability
H-42a: HP MPE/iX with ICMP Echo Request (ping) Vulnerability
H-81: HP-UX swinstall command in SD-UX Vulnerability


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

iQCVAwUBM81aiLnzJzdsy3QZAQE9/QP/Wkvl3DagM9t5hq7MRgIAaaAR42d1lyJe
5fEJXwBociriaMoaqiDtUOlOfaWu99MQja8z1+z1j57RLX8/aWkS6eWclr2XOBxd
rPqjigEvvF2Tx9nBLDrujjb/xwNqUUX/kRwmwZ1txoyEYz60UsMh9YTDrABQNN5+
3EQSk4jHBQs=
=m9HL
-----END PGP SIGNATURE-----


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