|
![]() ![]() |
CERT® Advisory CA-1997-01 Multi-platform Unix FLEXlm VulnerabilitiesOriginal issue date: January 6, 1997Last revised: September 26, 1997 Updated copyright statement A complete revision history is at the end of this file. The text of this advisory was originally released on September 19, 1996, as AUSCERT Advisory AA-96.03 "Multi-platform Unix FLEXlm Vulnerabilities," developed by Australian Computer Emergency Response Team. Because of the seriousness of the problem, we are reprinting the AUSCERT advisory here with their permission. Only the contact information at the end has changed: AUSCERT contact information has been replaced with CERT/CC contact information. We will update this advisory as we receive additional information. Look for it in an "Updates" section at the end of the advisory.
AUSCERT has received information concerning several problems involving the use of the FLEXlm licence management package on Unix systems. FLEXlm is used by many vendors to licence their products, and is supplied to them by GLOBEtrotter Software (previously, it was supplied by Highland Software). Many vendors have misconfigured the FLEXlm system to run as the root user, and some versions of the FLEXlm licence management daemon lmgrd contain a security vulnerability. These problems may allow local users to create users to create arbitrary files on the system and execute arbitrary programs using the privileges of the user running the FLEXlm daemons. System administrators are advised that the FLEXlm package may be installed as part of the installation procedures of other vendor and third-party products. Due to the way that the licence management software is often installed, it may be unnecessarily running as root making it possible to gain unauthorised privileged access. This means that the FLEXlm package may be installed on systems and running as the root user without the knowledge of the system administrator. Note that the vulnerabilities described here do not affect the security of the FLEXlm licences and licencing restriction. The vulnerabilities allow users to compromise security of the Operating System.
1. DescriptionThe FLEXlm licence management package is used by many vendors to licence their products. Many vendors have misconfigured the FLEXlm system to run as the root user which opens a number of computer security vulnerabilities which can be used to compromise the Unix operating system. This is described in paragraph (a). In addition, some versions of the FLEXlm licence management daemon lmgrd contain a security vulnerability. This is described in paragraph (b). (a) Insecure configuration of vendor product installation Due to some confusion in the documentation supplied to vendors using the FLEXlm package, the FLEXlm licence management software often runs with root privileges. This often occurs due to the FLEXlm daemons being started by the system initialisation scripts. If the daemons are running with root privileges they may be used by local users to gain unauthorised root privileges. This potentially affects all versions of the FLEXlm licence management daemon. GLOBEtrotter Software advise that the FLEXlm package does not require root privileges to operate correctly. FLEXlm daemons should be started by a non-privileged user with a restrictive umask setting, limiting the associated configuration vulnerabilities. (b) Security vulnerability in FLEXlm licence management daemon A vulnerability has been found in the FLEXlm licence management daemon which may allow local users unauthorised access to the account running the FLEXlm licence management daemon. This vulnerability exists in all versions of the FLEXlm licence management daemon from version 4.0 up to, and including, version 5.0a. A new version of the daemon has been made available by GLOBEtrotter Software that fixes this vulnerability. See Section 3.4. Versions earlier than version 4.0 do not have this vulnerability. GLOBEtrotter Software advise that all existing versions of the lmgrd daemon may be updated to the most recent version (version 5.0b) without change in functionality. This version of lmgrd will work successfully with all existing FLEXlm-licensed products. See Section 3.4. 1.1 Additional Description InformationThis section contains additional information on locating any FLEXlm components, determining the configuration of those components, and identifying information required for the Workarounds/Solutions in Section 3. (a) Vendor configurations may be customised Vendors using the FLEXlm licence management package to licence their products have the ability to customise FLEXlm to meet their own needs. This may include names, locations, and content of many files, in addition to how the software is installed and used. Therefore, care is required in locating any vulnerable software or configurations, and implementing workaround solutions. (b) Determining if FLEXlm is installed The FLEXlm licence management package is often installed as part of the installation procedures of other vendor and third-party products. The system administrator may not be aware that FLEXlm has been installed. The following command run as root should determine if the FLEXlm licence management software is installed. # find /etc -type f -exec egrep -il 'lmgrd|flexlm|licdir' {} \; Any files listed should be investigated further to see if they relate to the FLEXlm licence management product. In particular, it is important to locate the FLEXlm licence management initialisation files (the files where FLEXlm licence management daemons are started from) as these will become important when discussing the Workarounds/Solutions in Section 3. (c) Determining the version of the FLEXlm licence management daemon(s) The version of the FLEXlm licence management daemon can be determined by examining the strings(1) output of the binary daemon and searching for the strings "Copyright" and "FLEXlm". For example: # strings /usr/local/flexlm/licences/lmgrd | grep -i copyright | grep -i flexlm Note that more than one version of the FLEXlm licence management daemon may be executing, depending on what products are installed. The version number is also written to stdout (which may have been redirected to a log file) when the licence management daemon is started. (d) Identifying the user running the FLEXlm licence management daemons The licence management daemon is often called "lmgrd" or some derivative containing the string "lmgrd" (for example, lmgrd.abc). On some products, the name of the licence management daemon may have been changed to an arbitrary name (for example, lm_ABC4.ld). It should be possible to locate most running versions of the licence management daemon by examining the files identified in Section 1.1(b) or by using one of the following commands (Note this may locate other processes not related to FLEXlm, and may not locate all FLEXlm related processes): % ps -auxww | grep -i lm | grep -v grep % ps -ef | grep -i lm | grep -v grep If any licence management daemon is running as the root user, then a number of vulnerabilities exist as the daemon was not designed to be run with root privileges. Note that more than one FLEXlm licence management daemon may be running depending on what products have been installed. It is important to check for all running versions of the daemon. (e) Locating the licence management files Each licence management daemon has an associated licence file. The licence file is usually specified by the "-c" option on the command line, the LM_LICENSE_FILE environment variable, or is found in the default location /usr/local/flexlm/licenses/license.dat. The licence file describes which products the daemon is administering and the location of associated daemons. The licence files become important when discussing the Workarounds/Solutions in Section 3. 2. ImpactAny versions of the FLEXlm licence management daemons executing using a system account (for example, bin, daemon, sys) or a privileged account (such as root) may allow local users to create or overwrite arbitrary files on the system. This may be leveraged to gain root access. FLEXlm licence management daemons containing the security vulnerability (indicated in Section 1(b)) may allow local users unauthorised access to the account running the daemons. Information on gaining unauthorised access to Unix systems using the FLEXlm Licence Management software has been widely distributed. 3. Workarounds/SolutionNote that all four (4) sections should be reviewed and implemented if appropriate. Each section addresses a different problem. After the installation of ANY product or upgrade, the system must be checked to verify if a FLEXlm licence management daemon has been added. If a FLEXlm licence management daemon has been added, then Sections 3.1 to 3.4 of this Advisory should be applied to it to ensure a more secure configuration. 3.1 Run as a non-privileged userGLOBEtrotter Software advise that the FLEXlm licence management software does not require root privileges to operate. The FLEXlm licence management daemon should be run by a non-privileged user. If the licence management daemon is executing with root or some other system account permissions (such as bin, sys, daemon or any other system account), it must be modified to use a non-privileged user. If the licence management daemon is already executing as a non-privileged user, then the remainder of Section 3.1 may be skipped. It is recommended that a new user "flexlm" be created for the specific purpose of running the FLEXlm licence management daemon. In this case, Steps 3.1.1 through 3.1.5 should be followed. 3.1.1 Create a non-privileged account for use by FLEXlm.For example: flexlm:*:2000:250:FLEXlm Licence Manager:/nonexistent:/bin/sh Note the account must have the following properties: .password set to '*' as interactive access is not required The following instructions refer to this account as the "flexlm user". If the FLEXlm daemons were already running as a non-privileged user, then this will be the "flexlm user" below. 3.1.2 Locate the licence file(s).These may be identified in one of three ways: Note that there is always a single licence file for each licence daemon, but there may be more than one licence daemon running on a system. 3.1.3 The licence management daemons must use a non-privileged TCP port for communication. The port number chosen may be arbitrary, but all clients must be configured to use the same port.The port is specified in the licence data file on the SERVER line. It is the fourth (4th) field on this line. For example: SERVER xyzzy 123456789 1234 the port number is 1234. 3.1.4 Locate where the FLEXlm licence management daemon is started.This is often in the system startup scripts, but may not exclusively be so. An example startup line is: $licdir/$lmgrd -c $licdir/$licfile >> /tmp/license_log 2>&1 & Logging information is written to stdout by the daemons, and is often redirected to a log file when the daemon is started. 3.1.5 Modify the line in the FLEXlm startup files that starts the licence management daemon to look similar to the following:su flexlm -c "{original command line in startup file}" where flexlm is the user created in Step 3.1.1. Note that the logging information that is written to stdout from the daemon should not be written to files in /tmp or other world writable directories, but to a specially created directory that the flexlm user can write log information to. For example: su flexlm -c "$licdir/$lmgrd -c ... >> /var/log/flexlm/license_log 2>&1 &" 3.2 File OwnershipRegardless of which user is executing the FLEXlm licence management software, additional security vulnerabilities may allow a user to gain unauthorised access to the account running the daemon or engage in denial of service attacks by deleting files. These vulnerabilities may be limited if you ensure that no files on the system are owned or are writable by the flexlm user. The possible exception to this requirement is log files (see Section 3.1.4) and temporary files. All licence and FLEXlm executable files must be readable or executable by the flexlm user. Additional daemons required by the FLEXlm licence management daemon are specified in the licence data files (located in Section 3.1.2) on the DAEMON line. These file ownership and mode changes should be done for all versions of FLEXlm. Note that some vendors may have installed the FLEXlm software owned by the flexlm user. This configuration should be modified as detailed in this section. 3.3 umask SettingThe FLEXlm licence management daemons inherit the umask setting from
the environment in which they are started. When FLEXlm is started as part
of the system initialisation procedures, the umask is inherited from init(1M)
and is usually set to 000. The FLEXlm licence management daemons inherit
the umask setting from the environment in which they are started. When
FLEXlm is started as part of the system initialisation procedures, the
umask is inherited from init(1M) and is usually set to 000. This
means that FLEXlm will open files which are world and group writable. A
more appropriate umask setting is 022. #!/bin/sh 3.4 Vendor Patch for VulnerabilityGLOBEtrotter Software have made a new version of the FLEXlm licence
management daemon (version 5.0b) available which rectifies the reported
vulnerability in Section 1(b). http://www.globetrotter.com/lmgrd.htm
ftp://ftp.auscert.org.au/pub/mirrors/ftp.globetrotter.com/flexlm/unix/ 4. Additional information4.1 User Manual and Frequently Asked QuestionsGLOBEtrotter Software have a user manual that describes the FLEXlm Licence
Management system which is available to all users. A FAQ (Frequently Asked
Questions) document containing useful information is also available. These
can be located at: http://www.globetrotter.com/manual.htm 4.2 Additional Vendor InformationGLOBEtrotter Software have made available some additional information concerning these security vulnerabilities. It can be accessed at: http://www.globetrotter.com/auscert.htm 4.3 General misconfiguration descriptionThe misconfiguration of the FLEXlm licence management daemon is a generic
problem where software that was not designed to be run with root privileges
automatically gains those privileges as a result of being started by the
system initialisation scripts. Only those programs that require root privileges
should be run as root. ftp://ftp.auscert.org.au/pub/auscert/papers/secure_programming_checklist
AUSCERT thanks Peter Marelas from The Fulcrum Consulting Group, GLOBEtrotter Software, DFN-CERT, CERT/CC, and Sun Microsystems for their advice and cooperation in this matter.
UPDATESSilicon Graphics, Inc.The solution to this problem is to install version 3.0 of the the License
Tools, license_eoe subsystem. % versions license_eoe I = Installed, R = Removed
The SGI anonymous FTP site is sgigate.sgi.com (204.94.209.1) or its mirror, ftp.sgi.com. Software is referred to as License5.3.tar and can be found in the following directories on the FTP server: ~ftp/Security Filename: license_eoe Filename: license_eoe.books Filename: license_eoe.idb Filename: license_eoe.man Filename: license_eoe.sw **** IRIX 6.0, 6.0.1 ***** **** IRIX 6.1 **** **** IRIX 6.2 **** Filename: license_eoe Sun Microsystems, Inc.The following patches are now available from Sun.Patch-ID# 104174-01 Keywords: CERT security license FLEXlm Synopsis: FLEXlm Licensing (SUNWlicsw, SUNWlit): CERT security advisory patch Date: Jan/13/97 Solaris Release: 2.4 2.5 SunOS Release: 5.4 5.5 Patch-ID# 104186-01 Keywords: CERT security license FLEXlm Synopsis: FLEXlm (SUNWlicsw, SUNWlit): CERT security advisory patch Date: Jan/13/97 Solaris Release: 2.4_x86 2.5_x86 2.5.1_x86 SunOS Release: 5.4_x86 5.5_x86 5.5.1_x86 Patch-ID# 104217-01 Keywords: CERT security license FLEXlm Synopsis: FLEXlm (SUNWlicsw, SUNWlit) 4.1: CERT security advisory patch This document is available from: http://www.cert.org/advisories/CA-1997-01.html CERT/CC Contact Information
Phone: +1 412-268-7090 (24-hour hotline) Fax: +1 412-268-6989 Postal address: CERT/CC personnel answer the hotline 08:00-17:00 EST(GMT-5) / EDT(GMT-4) Monday through Friday; they are on call for emergencies during other hours, on U.S. holidays, and on weekends. Using encryptionWe strongly urge you to encrypt sensitive information sent by email. Our public PGP key is available from If you prefer to use DES, please call the CERT hotline for more information. Getting security informationCERT publications and other security information are available from our web site
* "CERT" and "CERT Coordination Center" are registered in the U.S. Patent and Trademark Office.
NO WARRANTY Conditions for use, disclaimers, and sponsorship information
Copyright 1997 Carnegie Mellon University. Revision History Sep. 26, 1997 Updated copyright statement Jan. 22, 1997 Updates - Added SGI and Sun patch information. |








