copyright | disclaimer | privacy | contact  
Australia's Leading Computer Emergency Response Team
Search this site

On this site

 > About AusCERT
 > Membership
 > Contact Us
 > PKI Services
 > Publications
 > Sec. Bulletins
 > Conferences
 > News & Media
 > Services
 > Web Log
 > Site Map
 > Site Help
 > Member login


ESB-2005.0195 -- iDEFENSE Security Advisory 02.28.05 -- KPPP Privileged File Descriptor Leak Vulnerability

Date: 01 March 2005
References: ESB-2005.0202  ESB-2005.0210  

Click here for printable version
Click here for PGP verifiable version
Hash: SHA1

             AUSCERT External Security Bulletin Redistribution

           ESB-2005.0195 -- iDEFENSE Security Advisory 02.28.05
            KPPP Privileged File Descriptor Leak Vulnerability
                               1 March 2005


        AusCERT Security Bulletin Summary

Product:           KPPP
Publisher:         iDEFENSE
Operating System:  UNIX variants
Impact:            Provide Misleading Information
                   Reduced Security
Access:            Existing Account
CVE Names:         CAN-2005-0205

Original Bulletin:

- --------------------------BEGIN INCLUDED TEXT--------------------

KPPP Privileged File Descriptor Leak Vulnerability

iDEFENSE Security Advisory 02.28.05
February 28, 2005


KPPP is a dialer and front end for pppd. It allows for interactive
script generation and network setup. More information is available at:


Local exploitation of a privileged file descriptor leak in KPPP can
allow attackers to hijack a system's domain name resolution function.

The vulnerability specifically exists due to kppp's failure to properly
close privileged file descriptors. Typically, KPPP is installed setuid
root and uses privilege separation to allow only certain functions of
the PPP dialer to execute with elevated privileges. Communication
between the privileged portion and non-privileged portion of kppp is
done over a domain socket which does not properly get closed.

A fix for a similar vulnerability was introduced to the kppp code base
in 1998 as can be seen below:

    // close file descriptors
    for (int fd = 3; fd < 20; fd++)

This fix may be easily bypassed if an attacker opens 17 file descriptors
before executing kppp. The loop will execute, closing the previously
opened file descriptors and leave the remaining privileged file
descriptor used to talk to the privileged component of kppp open for
attackers. KPPP may be abused to gain read and write access to
/etc/hosts and /etc/resolv.conf, thus giving attackers complete control
over a system's domain resolution capabilities.


Exploitation allows local attackers to gain control over a system's
domain name resolution function. Exploitation is trivial and allows an
attacker to write to the two files typically providing the configuration
for domain name resolution. Modifications of /etc/resolv.conf will allow
the attacker to specify a malicious domain server which may return
arbitrary responses to domain name lookups. Modifications to /etc/hosts
will cause hostname resolution redirection without the need for an
external domain server. This class of attack can be used to aid in
phishing and social engineering attempts.


iDEFENSE has confirmed the existence of this vulnerability in KPPP 
2.1.2. The vendor has confirmed that KPPP as included in KDE 3.1.5 and 
prior are affected. KDE 3.2.x and newer are not affected. 

Note that some Linux distributions which come with KPPP, such as Red 
Hat Linux, use a wrapper for executing X11 applications that require 
root privileges. This wrapper  safely closes all file descriptors in the

executed application.


As a workaround, temporarily remove the setuid bit from KPPP and
manually gain root privileges before executing KPPP:

chmod -s /usr/sbin/kppp


A vendor advisory for this issue is available at:

A patch for KDE 3.1 is available from :

   0e999df54963edd5f565b6d541f408d9  post-3.1.5-kdenetwork.diff


The Common Vulnerabilities and Exposures (CVE) project has assigned the
names CAN-2005-0205 to these issues. This is a candidate for inclusion
in the CVE list (, which standardizes names for
security problems.


02/09/2005  Initial vendor notification
02/09/2005  Initial vendor response
02/28/2005  Coordinated public disclosure


The discoverer of this vulnerability wishes to remain anonymous.

Get paid for vulnerability research

Free tools, research and upcoming events


Copyright (c) 2005 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 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
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:

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:

Australian Computer Emergency Response Team
The University of Queensland
Qld 4072

Internet Email:
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.