Original issue date: August 14, 1996<BR>
Last revised: September 24, 1997<BR>
Updated copyright statement

<P>A complete revision history is at the end of this file.

<P>The CERT Coordination Center has received reports of a configuration problem
in the floating license server for Adobe FrameMaker (fm_fls) that enables
non-privileged users to make any file world-readable and world-writable.
Exploitation scripts are publicly available.

<P>Any system that includes a setuid version of fm_fls is vulnerable.
Adobe Systems reports that the following Adobe products use fm_fls:

<P>Frame Products, version 4<BR>
          FrameMaker<BR>
          FrameViewer<BR>
FrameBuilder

<P>Frame Products, version 5<BR>
          FrameMaker<BR>
FrameMaker+SGML

<P>The CERT/CC team recommends installing a patch from your vendor. Until you
can obtain a patch, we urge you to remove the setuid bit from all instances
of fm_fls.

<P>We will update this advisory as we receive additional information.
Please check advisory files regularly for updates that relate to your site.
<HR>


<H2>I. Description</H2>


FrameMaker is a commercial text-processing software package
available from Adobe Systems, Inc. It is also available from other
vendors as part of their product line offering.

<P>When FrameMaker versions 4.X or 5.X are installed, the installation
script provided with FrameMaker installs a file named fm_fls that is
setuid to installing user, typically the root user. fm_fls is typically
found in the FrameMaker installation tree. Consult your documentation
for precise location of fm_fls.

<P>When fm_fls runs, it opens up a log file, which by default is
/tmp/fm_fls.log. In normal operation, fm_fls writes logging information
about license usage to the named log file. However, when given invalid
arguments, fm_fls writes these arguments to the log file, changes the
owner of the log file to root or whoever installed fm_fls, changes the
permissions to world-readable and world-writable, and then exits.
Therefore, by giving fm_fls invalid arguments and naming another file as
the log file, a user can make that file world-readable and world-writable.

<P>Adobe Systems reports that fm_fls is installed as setuid root because
it registers the license manager program with the the program number
mapper, also known as portmap or rpcbind. On some platforms, only the
original user (in this case root) or the root user has permission to
remove a registration. fm_fls will attempt to remove a previous
registration when it is restarted. With fm_fls setuid root, restarting
fm_fls ensures that all changes made in the program number mapper are
successful because they are done by the same user.

<P>The floating license servers shipped with and installed by FrameMaker
4.X and 5.X are vulnerable. Similarly, any other system that includes
a setuid version of fm_fls is vulnerable. Exploitation scripts are
publicly available.

<H2>II. Impact</H2>


Anyone with access to an account on an unpatched system can create
world-writable and world-readable files; this can lead to gaining
root access.

<H2>III. Solution</H2>


<H3>A. Obtain and install a vendor patch when it becomes available.</H3>


In the meantime, remove the setuid bit from all instances of fm_fls.
To determine if a system is vulnerable and to disable the programs that
are believed to be vulnerable, use the find command we provide below or
a variant. Consult your local system documentation to determine how to
tailor the find program on your system.

<P>You will need to run the find command on each system you maintain
because the command examines files on the local disk only. Substitute
the names of your local file systems for FILE_SYSTEM_NAMES in the
example. Example local file system names are /, /usr, and /var.

<P>To find all instances of fm_fls and then to remove the setuid bit from
them, do the following as root. Note that this is one long command,
though we have separated it onto two lines using a back-slash.
<PRE>

find FILE_SYSTEM_NAMES -xdev -type f -name fm_fls -perm -04000 \
-print -ok chmod u-s '{}' \;

</PRE>

This command will find all files on a system that are
<UL>
<LI>only in the file system you name (FILE_SYSTEM_NAMES -xdev)
<LI>regular files (-type f)
<LI>named fm_fls
<LI>setuid (-perm -04000)
</UL>
        Once found, those files will<UL>
<LI>have their names printed (-print)
<LI>have the setuid mode removed, but only if you type `y'
in response to the prompt (-ok chmod u-s '{}' \;)
</UL>
With the setuid root bit removed, fm_fls must then be started each
time by the same user. That user should be root so that the previous
registration can be successfully removed no matter what platform
fm_fls is running on.

<P>In addition, the log file, license.log, should be stored in a
non-public directory; specify this new location with the -log command
line argument. Consult the documentation that comes with FrameMaker
versions 4.X and 5.X to learn how to do this on your system.
<P >
<H3>B. Another possible solution is to create a new userid and group, say UID</H3>

frame and GID frame, with no one in group frame except for UID frame,
and make fm_fls mode 4110.  For example, on Solaris 2.4, 2.5, or 2.5.1:
<PRE>
- - ---s--x---  1 frame  frame  145736 Aug 24  1995 /usr/local/frame5.0/bin/sunxm.s5.sparc/fm_fls

</PRE>

<P>this case the log file has to be created manually just once by root
(if you keep it permanently in /var/log instead of /tmp) and
chown'd/chgrp'd to frame/frame with mode 644 (though fm_fls resets
that to 666).
<P >
At boot time root runs the frame5.0/bin/fm_fls wrapper which ends up
invoking the setuid-frame fm_fls binary.  That could be done instead
using 'su - frame -c frame_startup_command...' as an extra precaution
if UID frame has a real shell.  In that case you might as well remove
the setuid bit too.
<P >
This has been working for about a year.

<P><HR>
<H1>Appendix A</H2>
The following is vendor-supplied information.<BR>
For the most up-to-date information, contact your vendor.
<H3>BSDI</H3>
Does not ship Frame with BSD/OS.
<H3>Digital Equipment Corporation</H3>
Does not distribute this product with it's operating
systems.
<H3>Open Software Foundation (OSF)</H3> 
Does not support the software with this problem.
<H3>Sun Microsystems, Inc.</H3>
Does not ship FrameMaker.

<P><HR>

<P>The CERT Coordination Center staff thanks Adobe Systems for their support
in the development of this advisory.

<P><HR>

<!--#include virtual="/include/footer_nocopyright.html" -->
<P>Copyright 1996 Carnegie Mellon University.</P>

<HR>

Revision History
<PRE>
Sep. 24, 1997  Updated copyright statement
Aug. 30, 1996  Information previously in the README was inserted into the advisory.
Aug. 21, 1996  Added Section III.B (provides another possible solution).
Aug. 15, 1996  Added Appendix A - vendor information.

</PRE>