copyright
|
disclaimer
|
privacy
|
contact
HOME
About
AusCERT
Membership
Contact Us
PKI Services
Training
Publications
Sec. Bulletins
Conferences
News & Media
Services
Web Log
Site Map
Site Help
Member login
Login »
Become a member »
Home
»
Security Bul...
»
By Year
»
2004
» ESB-2004.0728 -- iDEFENSE Security Advisory 11.15.04...
ESB-2004.0728 -- iDEFENSE Security Advisory 11.15.04 -- Multiple Security Vulnerabilities in Fcron
Date:
16 November 2004
Click here for printable version
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 =========================================================================== AUSCERT External Security Bulletin Redistribution ESB-2004.0728 -- iDEFENSE Security Advisory 11.15.04 Multiple Security Vulnerabilities in Fcron 16 November 2004 =========================================================================== AusCERT Security Bulletin Summary --------------------------------- Product: fcron Publisher: iDEFENSE Operating System: Linux variants UNIX variants Impact: Increased Privileges Delete Arbitrary Files Create Arbitrary Files Access Privileged Data Inappropriate Access Denial of Service Access: Existing Account CVE Names: CAN-2004-1033 CAN-2004-1032 CAN-2004-1031 CAN-2004-1030 Original Bulletin: http://www.idefense.com/application/poi/display?id=157 - --------------------------BEGIN INCLUDED TEXT-------------------- Multiple Security Vulnerabilities in Fcron iDEFENSE Security Advisory 11.15.04 www.idefense.com/application/poi/display?id=157&type=vulnerabilities November 15, 2004 I. BACKGROUND Fcron is a periodical command scheduler which aims at replacing Vixie Cron, and implements most of its functionalities. More information about Fcron is available from http://fcron.free.fr/description.php. II. DESCRIPTION Multiple vulnerabilities have been found in Fcron. **** ISSUE 1 - File contents disclosure **** Local exploitation of a design error vulnerability in the fcronsighup component of Fcron may allow users to view the contents of root owned files. The vulnerability specifically exists within the set user id (setuid) root program fcronsighup. When the filename of a root owned file is passed as an argument to this program, it attempts to parse the file as a configuration file. Any lines in the file that are not parsable will be output as error messages. The following example demonstrates how an attacker can abuse this vulnerability to glean sensitive information from the /etc/shadow password file: bash$ fcronsighup /etc/shadow 14:33:09 Unknown var name at line root:
:12475:0:99999:7::: : line ignored **** ISSUE 2 - Configuration Bypass Vulnerability **** Local exploitation of a design error vulnerability in the fcronsighup component of Fcron may allow users to bypass access restrictions. The problem specifically exists in the checking performed by the fcronsighup utility on the file passed as a configuration file. It checks if the file is root owned, and not writable by any other users. When a setuid process is run by an ordinary user the /proc filesystem pseudofiles associated with it are owned by root and the contents of the "cmdline" and "evironment" files are controllable by the user. By pointing the fcronsighup configuration file to a /proc entry owned by root, such as /proc/self/cmdline or /proc/self/environ, it is possible for a user to supply their own configuration settings. **** ISSUE 3 - File Removal and Empty File Creation Vulnerability**** Local exploitation of a design error vulnerability in the fcronsighup component of Fcron may allow users to remove arbitrary files or create arbitrary empty files. The vulnerability specifically exists in the fcronsighup utility which does signaling of the running fcron daemon. Fcronsighup creates a file named in part from a value read from configuration file. This file is created using open() with O_RDWR|O_CREAT and 0644 parameters while running with full root privileges. After some time has passed the file is removed. The filename string is generated by the following code: snprintf(sigfile, sizeof(sigfile), "%s/fcrontab.sig", fcrontabs); By padding the front of the filename with a large number of slash symbols ("/") it is possible to create or remove a file in an arbitrary location. For example: to create the file /tmp/owned, the configuration option which sets the value for "fcrontabs" can be set to contain (sizeof(sigfile)-strlen("/tmp/owned")) "/" characters, followed by the string "/tmp/owned". The code will attempt to append the string "/fcrontab.sig" to this string, but the limitation imposed on it by the call to snprintf() will cause it to fail. When the filename is resolved, the extra "/"s in the filename are ignored, resulting in an absolute reference to the file /tmp/owned. **** ISSUE 4 - Information Disclosure Vulnerability **** Local exploitation of a design error vulnerability in the fcrontab component of Fcron may allow users to view the contents of fcron.allow and fcron.deny. The problem specifically exists because Fcron leaks the file descriptors of the opened files /etc/fcron.allow and /etc/fcron.deny to the invoked editor. The default permissions on these files do not allow them to be read by unprivileged users: - -rw-r----- 1 root fcron 253 Jul 29 12:45 /etc/fcron.allow - -rw-r----- 1 root fcron 255 Jul 29 12:45 /etc/fcron.deny An attacker can exploit this vulnerability by setting the EDITOR environment variable to a program which outputs the contents of the open file descriptor; descriptor 3 to view the contents of fcron.allow and descriptor 4 to view the contents of fcron.deny. III. ANALYSIS Local users can bypass configuration settings, remove arbitrary files, create files with root permissions, read the contents of root owned files and send a SIGHUP to any process, potentially killing it. These actions may allow them to perform a denial of service or potentially elevate their privileges. IV. DETECTION iDEFENSE has confirmed that Fcron versions 2.0.1 and 2.9.4 are vulnerable. It is suspected that earlier versions are also affected. V. WORKAROUND Consider changing the permissions on the fcronsighup binary to only allow trusted users access. Make the binary only executable by users in the 'trusted' group by performing the following commands as root: # chown root:trusted /usr/bin/fcronsighup # chmod 4110 /usr/bin/fcronsighup Also consider performing the same operation on the fcrontab binary to prevent exploitation of Issue 4. VI. VENDOR RESPONSE The following releases are available to address these vulnerabilities: 2.0.2 : stable branch http://fcron.free.fr/archives/fcron-2.0.2.src.tar.gz (France) or ftp://ftp.seul.org/pub/fcron/fcron-2.0.2.src.tar.gz (USA) 2.9.5.1 : dev branch http://fcron.free.fr/archives/fcron-2.9.5.1.src.tar.gz (France) or ftp://ftp.seul.org/pub/fcron/fcron-2.9.5.1.src.tar.gz (USA) VII. CVE INFORMATION The Common Vulnerabilities and Exposures (CVE) project has assigned the following names to these issues: ISSUE 1 - File contents disclosure CAN-2004-1030 ISSUE 2 - Configuration Bypass Vulnerability CAN-2004-1031 ISSUE 3 - File Removal and Empty File Creation Vulnerability CAN-2004-1032 ISSUE 4 - Information Disclosure Vulnerability CAN-2004-1033 These are candidates for inclusion in the CVE list (http://cve.mitre.org), which standardizes names for security problems. VIII. DISCLOSURE TIMELINE 10/21/2004 Initial vendor notification 10/21/2004 Initial vendor response 11/15/2004 Coordinated public disclosure IX. CREDIT Karol Wiesek is credited with discovering these vulnerabilities. Get paid for vulnerability research http://www.idefense.com/poi/teams/vcp.jsp X. LEGAL NOTICES Copyright (c) 2004 iDEFENSE, Inc. Permission is granted for the redistribution of this alert electronically. It may not be edited in any way without the express written consent of iDEFENSE. If you wish to reprint the whole or any part of this alert in any other medium other than electronically, please email customerservice@idefense.com for permission. Disclaimer: The information in the advisory is believed to be accurate at the time of publishing based on currently available information. Use of the information constitutes acceptance for use in an AS IS condition. There are no warranties with regard to this information. Neither the author nor the publisher accepts any liability for any direct, indirect, or consequential loss or damage arising from use of, or reliance on, this information. - --------------------------END INCLUDED TEXT-------------------- You have received this e-mail bulletin as a result of your organisation's registration with AusCERT. The mailing list you are subscribed to is maintained within your organisation, so if you do not wish to continue receiving these bulletins you should contact your local IT manager. If you do not know who that is, please send an email to auscert@auscert.org.au and we will forward your request to the appropriate person. NOTE: Third Party Rights This security bulletin is provided as a service to AusCERT's members. As AusCERT did not write the document quoted above, AusCERT has had no control over its content. The decision to follow or act on information or advice contained in this security bulletin is the responsibility of each user or organisation, and should be considered in accordance with your organisation's site policies and procedures. AusCERT takes no responsibility for consequences which may arise from following or acting on information or advice contained in this security bulletin. NOTE: This is only the original release of the security bulletin. It may not be updated when updates to the original are made. If downloading at a later date, it is recommended that the bulletin is retrieved directly from the author's website to ensure that the information is still current. Contact information for the authors of the original document is included in the Security Bulletin above. If you have any questions or need further information, please contact them directly. Previous advisories and external security bulletins can be retrieved from: http://www.auscert.org.au/render.html?cid=1980 If you believe that your computer system has been compromised or attacked in any way, we encourage you to let us know by completing the secure National IT Incident Reporting Form at: http://www.auscert.org.au/render.html?it=3192 =========================================================================== Australian Computer Emergency Response Team The University of Queensland Brisbane Qld 4072 Internet Email: auscert@auscert.org.au Facsimile: (07) 3365 7031 Telephone: (07) 3365 4417 (International: +61 7 3365 4417) AusCERT personnel answer during Queensland business hours which are GMT+10:00 (AEST). On call after hours for member emergencies only. =========================================================================== -----BEGIN PGP SIGNATURE----- Comment: http://www.auscert.org.au/render.html?it=1967 iQCVAwUBQZlIByh9+71yA2DNAQKiHgP8D2crKOA11YqNPSRb2kJX7rC/S5zRPs3I nV4+5v2h/WWMElmjrpbaDFooh+I1HUK5XgF9elbiGn3vEkzovFokTeaXY1sQCV3f uQPN32CXjKOhdIdkKEUXmSDX6S9vhO3r9SKlcOvhtXgT66XO2pu5ZIETe7qpl5CB XkNbLcMVx3s= =Cx1A -----END PGP SIGNATURE-----
Comments? Click here
http://www.auscert.org.au/render.html?cid=3734&it=4556