dhcpcd before 5.2.12 allows remote attackers to execute arbitrary commands via shell metacharacters in a hostname obtained from a DHCP message.

Bug #931036 reported by Zubin Mithra
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
dhcpcd (Debian)
Fix Released
Unknown
dhcpcd (Ubuntu)
Fix Released
Undecided
Unassigned
Lucid
Fix Released
Undecided
Unassigned
Maverick
Fix Released
Undecided
Unassigned
Natty
Fix Released
Undecided
Unassigned
Oneiric
Fix Released
Undecided
Unassigned
Precise
Fix Released
Undecided
Unassigned
dhcpcd5 (Ubuntu)
Fix Released
Undecided
Unassigned
Lucid
Invalid
Undecided
Unassigned
Maverick
Invalid
Undecided
Unassigned
Natty
Won't Fix
Undecided
Unassigned
Oneiric
Fix Released
Undecided
Unassigned
Precise
Fix Released
Undecided
Unassigned

Bug Description

dhcpcd before 5.2.12 allows remote attackers to execute arbitrary commands
via shell metacharacters in a hostname obtained from a DHCP message.

CVE-2011-0996.

This is how opensuse patches it(check out dhcpcd-3.2.3-option-checks.diff) in the following link :-

https://build.opensuse.org/package/rdiff?linkrev=base&package=dhcpcd&project=network:dhcp&rev=31

Requires patch/debdiff for Ubuntu Maverick.

description: updated
Changed in dhcpcd (Ubuntu):
status: New → Confirmed
Revision history for this message
Zubin Mithra (zubin-mithra) wrote :

Please find attached a debdiff for maverick based on the patch used for opensuse(linked above). The netbios message related stuff has been omitted.

Changed in dhcpcd (Ubuntu):
status: Confirmed → New
Changed in dhcpcd (Ubuntu):
status: New → Fix Released
Changed in dhcpcd (Ubuntu Lucid):
status: New → Confirmed
Changed in dhcpcd (Ubuntu Maverick):
status: New → Confirmed
Changed in dhcpcd5 (Ubuntu Oneiric):
status: New → Fix Released
Changed in dhcpcd5 (Ubuntu Precise):
status: New → Fix Released
Changed in dhcpcd (Ubuntu Natty):
status: New → Confirmed
Changed in dhcpcd (Ubuntu Precise):
status: Fix Released → Confirmed
Changed in dhcpcd (Ubuntu Oneiric):
status: New → Confirmed
Changed in dhcpcd5 (Ubuntu Lucid):
status: New → Invalid
Changed in dhcpcd5 (Ubuntu Maverick):
status: New → Invalid
Changed in dhcpcd5 (Ubuntu Natty):
status: New → Confirmed
Revision history for this message
Marc Deslauriers (mdeslaur) wrote :

Thanks for the debdiff, looks good, ACK.

Since we have basically the same version of dhcpcd in lucid-precise, I'll upload your changes to all of them.

Thanks!

Revision history for this message
Marc Deslauriers (mdeslaur) wrote :

Actually, your debdiff doesn't compile.

Could you please fix it, and describe what testing you have done to ensure dhcpcd still works after being patched?

I am unsubscribing ubuntu-security-sponsors for now. Please resubscribe the group once a fixed debdiff has been attached.

Thanks.

Changed in dhcpcd (Ubuntu Maverick):
status: Confirmed → Incomplete
tags: added: patch-needswork
Changed in dhcpcd (Ubuntu Maverick):
assignee: nobody → Zubin Mithra (zubin-mithra)
Revision history for this message
Zubin Mithra (zubin-mithra) wrote :

My apologies, the patch I had attached were from another testing directory I had and not the final one. Please find attached the correct defdiff file.

As part of testing :-
=> I tried building the deb file "debuild"
=> installing it "dpkg -i <debfile>"
=>I tried running the it as "sudo dhcpcd eth0" and the machine gets configured with an ip address.

I did not have a PoC in my possession, so I could not try it out.

Hope this helps, cheers!

Revision history for this message
Zubin Mithra (zubin-mithra) wrote :

I just attached another debdiff in which I've corrected "maverick" to "maverick-security".

Revision history for this message
Zubin Mithra (zubin-mithra) wrote :

A minor update on the patch, with "maverick" changed to "maverick-security".

Revision history for this message
Marc Deslauriers (mdeslaur) wrote :

ACK on the updated debdiff. I have uploaded the fix to Precise, and will release it as a security update for Lucid-Oneiric.

Thanks!

Changed in dhcpcd (Ubuntu Precise):
status: Confirmed → Fix Released
Revision history for this message
Marc Deslauriers (mdeslaur) wrote :

I've also sent your debdiff to Debian.

Changed in dhcpcd (Ubuntu Lucid):
status: Confirmed → Fix Committed
Changed in dhcpcd (Ubuntu Maverick):
assignee: Zubin Mithra (zubin-mithra) → nobody
status: Incomplete → Fix Committed
Changed in dhcpcd (Ubuntu Natty):
status: Confirmed → Fix Committed
Changed in dhcpcd (Ubuntu Oneiric):
status: Confirmed → Fix Committed
Changed in dhcpcd (Debian):
status: Unknown → New
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package dhcpcd - 1:3.2.3-9ubuntu0.1

---------------
dhcpcd (1:3.2.3-9ubuntu0.1) oneiric-security; urgency=high

    * SECURITY UPDATE: dhcpcd before 5.2.12 allows remote attackers to
      execute arbitrary commands via shell metacharacters in a hostname
      obtained from a DHCP message. (LP: #931036)
      - https://build.opensuse.org/package/view_file?file=dhcpcd-3.2.3-option-checks.diff&package=dhcpcd&project=network%3Adhcp&rev=52442e5c1d803d7c1818a920a0bae7f1
      - above linked patch(without the additional support for NETBIOS type
        messages) has been added.
      - CVE-2011-0996
 -- Zubin Mithra <email address hidden> Mon, 13 Feb 2012 14:27:54 +0530

Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package dhcpcd - 1:3.2.3-7ubuntu0.11.04.1

---------------
dhcpcd (1:3.2.3-7ubuntu0.11.04.1) natty-security; urgency=high

    * SECURITY UPDATE: dhcpcd before 5.2.12 allows remote attackers to
      execute arbitrary commands via shell metacharacters in a hostname
      obtained from a DHCP message. (LP: #931036)
      - https://build.opensuse.org/package/view_file?file=dhcpcd-3.2.3-option-checks.diff&package=dhcpcd&project=network%3Adhcp&rev=52442e5c1d803d7c1818a920a0bae7f1
      - above linked patch(without the additional support for NETBIOS type
        messages) has been added.
      - CVE-2011-0996
 -- Zubin Mithra <email address hidden> Mon, 13 Feb 2012 14:27:54 +0530

Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package dhcpcd - 1:3.2.3-7ubuntu0.10.10.1

---------------
dhcpcd (1:3.2.3-7ubuntu0.10.10.1) maverick-security; urgency=high

    * SECURITY UPDATE: dhcpcd before 5.2.12 allows remote attackers to
      execute arbitrary commands via shell metacharacters in a hostname
      obtained from a DHCP message. (LP: #931036)
      - https://build.opensuse.org/package/view_file?file=dhcpcd-3.2.3-option-checks.diff&package=dhcpcd&project=network%3Adhcp&rev=52442e5c1d803d7c1818a920a0bae7f1
      - above linked patch(without the additional support for NETBIOS type
        messages) has been added.
      - CVE-2011-0996
 -- Zubin Mithra <email address hidden> Mon, 13 Feb 2012 14:27:54 +0530

Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package dhcpcd - 1:3.2.3-5ubuntu0.1

---------------
dhcpcd (1:3.2.3-5ubuntu0.1) lucid-security; urgency=high

    * SECURITY UPDATE: dhcpcd before 5.2.12 allows remote attackers to
      execute arbitrary commands via shell metacharacters in a hostname
      obtained from a DHCP message. (LP: #931036)
      - https://build.opensuse.org/package/view_file?file=dhcpcd-3.2.3-option-checks.diff&package=dhcpcd&project=network%3Adhcp&rev=52442e5c1d803d7c1818a920a0bae7f1
      - above linked patch(without the additional support for NETBIOS type
        messages) has been added.
      - CVE-2011-0996
 -- Zubin Mithra <email address hidden> Mon, 13 Feb 2012 14:27:54 +0530

Changed in dhcpcd (Ubuntu Lucid):
status: Fix Committed → Fix Released
Changed in dhcpcd (Ubuntu Maverick):
status: Fix Committed → Fix Released
Changed in dhcpcd (Ubuntu Natty):
status: Fix Committed → Fix Released
Changed in dhcpcd (Ubuntu Oneiric):
status: Fix Committed → Fix Released
Changed in dhcpcd (Debian):
status: New → Fix Released
Revision history for this message
Rolf Leggewie (r0lf) wrote :

natty has seen the end of its life and is no longer receiving any updates. Marking the natty task for this ticket as "Won't Fix".

Changed in dhcpcd5 (Ubuntu Natty):
status: Confirmed → Won't Fix
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.