===================================================================== CERT-Renater Note d'Information No. 2007/VULN326 _____________________________________________________________________ DATE : 27/07/2007 HARDWARE PLATFORM(S) : / OPERATING SYSTEM(S) : AIX 5.2, AIX 5.3 running capture command. ====================================================================== IBM SECURITY ADVISORY First Issued: Mon Jul 23 16:13:01 CDT 2007 =============================================================================== VULNERABILITY SUMMARY VULNERABILITY: AIX capture Terminal Control Sequence Stack Buffer Overflow Vulnerability PLATFORMS: AIX 5.2, 5.3 SOLUTION: Apply the APAR, interim fix or workaround as described below. THREAT: An attacker may run arbitrary code as root privileges. CERT VU Number: n/a CVE Number: n/a =============================================================================== DETAILED INFORMATION I. OVERVIEW The capture command allows a user to dump everything printed on the user's terminal to a file. Capture is a setuid program installed by default. II. DESCRIPTION A buffer overflow vulnerability exists within the capture command, which allows a local attacker to execute arbitrary code with root privileges. III. IMPACT The successful exploitation of this vulnerability allows a non-privileged user to execute code with root privileges. IV. PLATFORM VULNERABILITY ASSESSMENT To determine if your system is vulnerable, run the following command: # lslpp -l | grep bos.rte.shell The following filesets are vulnerable: AIX Level Lower Level Upper Level ------------------------------------------------- 5.2.0 5.2.0.85 5.2.0.105 5.3.0 5.3.0.40 5.3.0.61 NOTE: IBM only supports the latest two releases (AIX 5.2 & 5.3) and the latest three Technology Levels (AIX 5.2 TL08, TL09, TL10 & AIX 5.3 TL04, TL05, TL06). Affected customers are urged to upgrade to the latest applicable Technology Level and Service Pack. V. SOLUTIONS A. APARS IBM provides the following fixes: AIX Level APAR number Availability -------------------------------------------------------------------- 5.2.0 IZ01134 10/31/2007 (subject to change) 5.3.0 IZ01135 11/27/2007 (subject to change) AIX Version 5 APARs can be downloaded from: http://www.ibm.com/servers/eserver/support/unixservers/aixfixes.html NOTE: Affected customers are urged to upgrade to the latest applicable Technology Level and Service Pack. B. INTERIM FIXES Interim fixes are available. The interim fix can be downloaded via ftp from: ftp://aix.software.ibm.com/aix/efixes/security/capture_ifix.tar.Z This is a compressed tarball containing this advisory, interim fix packages and PGP signatures for each package. The interim fixes below include prerequisite checking. This will enforce the correct mapping between the fixes and AIX Technology Levels. AIX Release & Technology Level Interim fix --------------------------------------------------------------- 5200-08 IZ01135_08.070706.epkg.Z 5200-09 IZ01135_09.070706.epkg.Z 5200-10 IZ01135_10.070706.epkg.Z 5300-04 IZ01134_04.070706.epkg.Z 5300-05 IZ01134_05.070706.epkg.Z 5300-06 IZ01134_06.070706.epkg.Z IMPORTANT: If possible, it is recommended that a mksysb backup of the system be created. Verify it is both bootable and readable before proceeding. These interim fixes have not been fully regression tested; thus, IBM does not warrant the fully correct functionality of the interim fix. Customers install the interim fix and operate the modified version of AIX at their own risk. Verify you have retrieved the fixes intact: The interim fixes below are named by using the technology level corresponding to the release that the fix applies to. The checksums below were generated using the "sum" and "md5sum" commands and are as follows: Filename sum md5sum ---------------------------------------------------------------------- IZ01135_08.070706.epkg.Z 33065 17 359273b73c72b9ea4f7e0cb946229019 IZ01135_09.070706.epkg.Z 32117 17 b588488fd4d3ab00947db2b703850261 IZ01135_10.070706.epkg.Z 55625 17 89beccaa8a7c20c3e52feaca6a10956d IZ01134_04.070706.epkg.Z 31677 18 d5b31946b4abba3b086cb6e8b90b8144 IZ01134_05.070706.epkg.Z 10938 18 7e2c7b7c2c82e7d53ce37d3c003f11e4 IZ01134_06.070706.epkg.Z 30448 18 febbec7814c42d6a66409c5fd6124d7b These sums should match exactly. The PGP signatures in the compressed tarball and on this advisory can also be used to verify the integrity of the various files they correspond to. If the sums or signatures cannot be confirmed, double check the command results and the download site address. If those are OK, contact IBM AIX Security at security-alert@austin.ibm.com and describe the discrepancy. C. INTERIM FIX INSTALLATION These packages use the new Interim Fix Management Solution to install and manage interim fixes. More information can be found at: http://www14.software.ibm.com/webapp/set2/sas/f/aix.efixmgmt/home.html To preview an epkg interim fix installation execute the following command: # emgr -e ipkg_name -p # where ipkg_name is the name of the # interim fix package being previewed. To install an epkg interim fix package, execute the following command: # emgr -e ipkg_name -X # where ipkg_name is the name of the # interim fix package being installed. The "X" flag will expand any filesystems if required. VI. WORKAROUNDS There are a couple of workarounds that may be implemented. A. OPTION 1 If the program is unnecessary, it may be removed with the following command: # rm -f /usr/bin/capture NOTE: To restore this command, the entire bos.rte.shell package must be reinstalled. B. OPTION 2 Change the permissions of this program to remove the setuid bit with the following command: #chmod 500 /usr/bin/capture NOTE: This will disable functionality of the command for all users except root. C. OPTION 3 Customers running AIX 5.3.0 TL06 may install the bos.rte.security fileset and take advantage of the 'fpm' command to disable the setuid capabilities of 'capture'. The 'capture' command is disabled in the high level database. NOTE: This will disable functionality of the command for all users except root. VII. OBTAINING FIXES AIX Version 5 APARs can be downloaded from: http://www.ibm.com/servers/eserver/support/unixservers/aixfixes.html Security related Interim Fixes can be downloaded from: ftp://aix.software.ibm.com/aix/efixes/security VII. CONTACT INFORMATION If you would like to receive AIX Security Advisories via email, please visit: http://www14.software.ibm.com/webapp/set2/subscriptions/pqvcmjd Comments regarding the content of this announcement can be directed to: security-alert@austin.ibm.com To request the PGP public key that can be used to communicate securely with the AIX Security Team send email to security-alert@austin.ibm.com with a subject of "get key". The key can also be downloaded from a PGP Public Key Server. The key id is 0x4265D862. Please contact your local IBM AIX support center for any assistance. eServer is a trademark of International Business Machines Corporation. IBM, AIX and pSeries are registered trademarks of International Business Machines Corporation. All other trademarks are property of their respective holders. VIII. ACKNOWLEDGMENTS iDefense (http://labs.idefense.com/) credits an anonymous contributer. ====================================================================== ========================================================= Les serveurs de référence du CERT-Renater http://www.urec.fr/securite http://www.cru.fr/securite http://www.renater.fr ========================================================= + CERT-RENATER | tel : 01-53-94-20-44 + + 151 bd de l'Hopital | fax : 01-53-94-20-41 + + 75013 Paris | email: certsvp@renater.fr + =========================================================