Bug 507717 (CVE-2009-0692) - CVE-2009-0692 dhclient: stack overflow leads to arbitrary code execution as root
Summary: CVE-2009-0692 dhclient: stack overflow leads to arbitrary code execution as root
Keywords:
Status: CLOSED ERRATA
Alias: CVE-2009-0692
Product: Security Response
Classification: Other
Component: vulnerability
Version: unspecified
Hardware: All
OS: Linux
urgent
urgent
Target Milestone: ---
Assignee: Red Hat Product Security
QA Contact:
URL: http://web.nvd.nist.gov/view/vuln/det...
Whiteboard:
Depends On: 507734 507735 507736 507737 507738 507739 507740
Blocks:
TreeView+ depends on / blocked
 
Reported: 2009-06-23 21:18 UTC by Vincent Danen
Modified: 2021-11-12 19:55 UTC (History)
7 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2009-07-21 16:51:11 UTC
Embargoed:


Attachments (Terms of Use)
Patch from upstream (836 bytes, patch)
2009-06-23 22:34 UTC, Josh Bressers
no flags Details | Diff


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHSA-2009:1136 0 normal SHIPPED_LIVE Critical: dhcp security update 2009-07-14 19:33:20 UTC
Red Hat Product Errata RHSA-2009:1154 0 normal SHIPPED_LIVE Critical: dhcp security update 2009-07-14 19:28:01 UTC

Description Vincent Danen 2009-06-23 21:18:43 UTC
Description from ISC's advisory:

Description:

ISC dhclient has a stack overflow vulnerability which makes it
theoretically possible for a rogue DHCP server to execute arbitrary
commands as root on the affected system through stack return
subversion.

Impact:

While generating a subnet number from the server-supplied leased address
and subnet-mask 'dhclient' copies the information into a field without
verifying if the length of the information exceeds the length of the field.

Theoretically this allows a rogue DHCP server to execute arbitrary
commands as root on the affected system through stack return subversion.

This attack has little to no risk for a client situated on a network
that is well defended, whereas clients that are roaming to potentially
hostile or ad-hoc networks can see this attack to pose a severe threat.

Factors complicating any attack would be:

1) The attacker would need to generate messages the client views as
authentic.

One option is for the attacker to present itself as a suitable DHCPv4
server for a network, in essence operating as a rogue DHCPv4 server.

Another option would be to insert messages into the conversation between
the client and the authentic DHCPv4 server.  To do this the attacker
needs to accurately guess the client's randomly chosen 16-bit
transaction ID and insert the attack precisely between the client's
request and the valid DHCPv4 server's reply.

Neither of these are likely on a well defended network but clients that
are roaming may find them, especially the first, a severe threat.

2) The attacker would then need to develop their attack within a limited
packet size.

Support for DHCPv4 total packet size may be limited from 576 octets
through the link MTU size (no support for fragmentation) up to 64KB.  Of
this, the DHCPv4 option payload space is limited by the space taken up
by the BOOTP header space, excepting the FILE and SNAME fields (which
can be used in 'option overloading' to carry option contents, such as
the subnet-mask).

Comment 5 Josh Bressers 2009-06-23 22:34:04 UTC
Created attachment 349164 [details]
Patch from upstream

Comment 10 Tomas Hoger 2009-07-02 08:53:46 UTC
On Red Hat Enterprise Linux 5 and later (including current Fedora versions), dhcp packages are compiled with FORTIFY_SOURCE enabled.  Thanks to that protection, this buffer overflow is detected and dhclient is terminated in a controlled way, rather than allowing malicious packet to corrupt stack and possibly result in code execution.

Therefore, this flaw has no security impact on packages built with FORTIFY_SOURCE enabled.  Malicious packet can cause dhclient to exit unexpectedly, though this is not treated as DoS.  The flaw can cause client to not have any IP address configured, however, rogue DHCP server can perform similar DoS attack on clients even without this flaw by replying to their requests with assignments of IP addresses that are not valid / usable on the given network.

Comment 11 Josh Bressers 2009-07-14 17:42:02 UTC
This is now public:
http://www.kb.cert.org/vuls/id/410676

Comment 13 errata-xmlrpc 2009-07-14 19:32:31 UTC
This issue has been addressed in following products:

  Red Hat Enterprise Linux 3

Via RHSA-2009:1154 https://rhn.redhat.com/errata/RHSA-2009-1154.html

Comment 14 errata-xmlrpc 2009-07-14 19:33:23 UTC
This issue has been addressed in following products:

  Red Hat Enterprise Linux 4
  Red Hat Enterprise Linux 4.7 Z Stream

Via RHSA-2009:1136 https://rhn.redhat.com/errata/RHSA-2009-1136.html

Comment 15 Jan Lieskovsky 2009-07-15 14:47:01 UTC
MITRE's CVE record (CVE-2009-0692):

Stack-based buffer overflow in the script_write_params method in
client/dhclient.c in ISC DHCP dhclient 4.1 before 4.1.0p1, 4.0 before
4.0.1p1, 3.1 before 3.1.2p1, 3.0, and 2.0 allows remote DHCP servers
to execute arbitrary code via a crafted subnet-mask option.

References:
-----------
http://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2009-0692
https://www.isc.org/node/468
http://security.gentoo.org/glsa/glsa-200907-12.xml
http://www.kb.cert.org/vuls/id/410676
http://secunia.com/advisories/35785


Note You need to log in before you can comment on or make changes to this bug.