Security Advisory

CVE-2016-2147: BusyBox udhcpc Domain Name Heap Write

Last updated:
  • CVE-2016-2147

CVE-2016-2147 is an integer overflow (CWE-190) in the domain name decoder of udhcpc, the BusyBox DHCP client, before 1.25.0: a DHCP reply with a malformed RFC 1035-encoded domain name makes the client write past a heap buffer and crash. NVD scores it 7.5. BusyBox 1.25.0 has the fix, and firmware with an older BusyBox needs a backport.

Vulnerability summary

CVSS base score

7.5

High severity

EPSS score (FIRST)

7.8%

Probability of exploitation in the wild in the next 30 days

CISA KEV catalog

No

Not listed

Published

Vulnerability ID: CVE-2016-2147 · Source: NVD

Affected components

ComponentCPEVersion range
BusyBox (udhcpc, udhcp domain_codec.c, built with FEATURE_UDHCP_RFC3397)cpe:2.3:a:busybox:busybox:*:*:*:*:*:*:*:*1.24.2 and earlier (NVD); fix d474ffc first in 1.25.0 (22 June 2016)
OpenWrt 15.05 (Chaos Calmer): busybox package—BusyBox 1.23.2 with no patch for this fix; OpenWrt/LEDE 17.01.0 ships 1.25.1

What does this mean for affected devices?

NVD's description: "Integer overflow in the DHCP client (udhcpc) in BusyBox before 1.25.0 allows remote attackers to cause a denial of service (crash) via a malformed RFC1035-encoded domain name, which triggers an out-of-bounds heap write." NVD's Primary score is CVSS v3.1 7.5 (CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H) with CWE-190; the CPE configuration lists BusyBox up to and including 1.24.2. The record was published on 2017-02-09 (NVD).

Where is the bug?

Nico Golde reported this CVE and CVE-2016-2148 together on oss-security on 2016-03-11 as an "OOB heap write due to integer underflow", noting that the two udhcpc issues are "probably only relevant for the embedded space". The fix is commit d474ffc of 2016-03-10, "udhcp: fix a SEGV on malformed RFC1035-encoded domain name". It changes dname_dec() in networking/udhcp/domain_codec.c, which turns the compressed domain lists of DHCP option 119 (domain search) and option 120 (SIP servers) into text. In the old code, an encoded list that starts with a zero byte, an empty name, leaves the output length at zero, and the decoder then writes a separator space to dst[len - 1], one byte before the heap buffer. The fix writes that space only when the length is not zero. The decoder is compiled only when FEATURE_UDHCP_RFC3397 is enabled, which BusyBox 1.24.2's Config.src turns on by default.

Which releases and firmware carry it?

The BusyBox news page lists the fix among the changes in 1.25.0 of 22 June 2016, a release it labels unstable; the 1.24.2 stable release of 24 March 2016 does not contain the commit. On the build-system side, OpenWrt 15.05 (Chaos Calmer) pins BusyBox 1.23.2 and its patch set has no udhcp domain fix, while its defaults build udhcpc with RFC 3397 support; OpenWrt/LEDE 17.01.0 moved to 1.25.1. Debian backported the commit to its 1.22.0 packages: 1:1.22.0-9+deb8u2 for jessie (DLA-1445-1) and 1:1.22.0-19+deb9u1 for stretch (DLA-2559-1), per the Debian security tracker. We found no vendor or CISA advisory naming a device for this CVE, so a hit rests on the BusyBox version and patch list in the image.

How do you fix or mitigate it?

Move to BusyBox 1.25.0 or later, or apply commit d474ffc to an older tree. Read the udhcp patch list, not just the version string, since distribution packages carry backports. A device that takes its WAN address by DHCP parses replies from whatever answers on that link, so the attacker only needs to be on the same segment. Our BusyBox firmware guide and DHCP client and server guide cover how to check which udhcp features a build includes; CVE-2019-5747 and CVE-2018-20679 are later udhcp option-parsing flaws. The memory corruption fix guide covers integer overflows in length calculations.

CVE-2016-2147 is not in the CISA KEV catalog as of 2026-11-18 (catalog version 2026.11.17). FIRST EPSS gives it 0.07803, the 95th percentile, in the 2026-11-17 dataset (CISA KEV, FIRST EPSS).

How to fix this class of issueThis advisory's weakness class is Memory corruption. Our practical guide covers how to detect, fix, verify and disclose it: How to fix memory corruption in embedded firmware.

Evidence

  • NVD: integer overflow in udhcpc in BusyBox before 1.25.0, DoS (crash) via malformed RFC1035-encoded domain name, out-of-bounds heap write; Primary CVSS v3.1 7.5 AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H; CWE-190; CPE busybox <=1.24.2; published 2017-02-09. — NVD
  • oss-security 2016-03-11, Nico Golde, 'two udhcpc (busybox) issues': 'probably only relevant for the embedded space'; CVE-2016-2147 OOB heap write due to integer underflow (commit d474ffc); CVE-2016-2148 heap overflow in OPTION_6RD parsing (commit 352f79a). — oss-security
  • Commit d474ffc (2016-03-10) 'udhcp: fix a SEGV on malformed RFC1035-encoded domain name': dname_dec() in networking/udhcp/domain_codec.c writes dst[len - 1] = ' ' only if len != 0. Commit is in tag 1_25_0, not in 1_24_2 (GitHub compare). — BusyBox (GitHub mirror)
  • BusyBox 1.24.2 Kbuild.src: domain_codec.o built with CONFIG_FEATURE_UDHCP_RFC3397; Config.src: FEATURE_UDHCP_RFC3397 default y, options 119 and 120. — BusyBox (GitHub mirror)
  • BusyBox news: 1.25.0 (22 June 2016, unstable) changes include 'udhcp: fix a SEGV on malformed RFC1035-encoded domain name'; 1.24.2 (24 March 2016, stable). — BusyBox
  • OpenWrt chaos_calmer busybox Makefile PKG_VERSION 1.23.2; patches directory has no udhcp domain-name fix; Config-defaults: BUSYBOX_DEFAULT_UDHCPC y, FEATURE_UDHCP_RFC3397 y. v17.01.0 PKG_VERSION 1.25.1. — OpenWrt (GitHub)
  • Debian security tracker: fixed in jessie 1:1.22.0-9+deb8u2 (DLA-1445-1), stretch 1:1.22.0-19+deb9u1 (DLA-2559-1), unstable 1:1.27.2-1. — Debian security tracker
  • CVE-2016-2147 is not in the CISA KEV catalog, version 2026.11.17 (1,782 entries), checked 2026-11-18. — CISA KEV
  • EPSS 0.07803, percentile 0.94759, dataset 2026-11-17. — FIRST EPSS

Related advisories

Sources

  1. NVD
  2. oss-security: two udhcpc (busybox) issues (2016-03-11)
  3. BusyBox commit d474ffc
  4. BusyBox news (release change logs)
  5. OpenWrt 15.05 busybox Makefile
  6. OpenWrt 15.05 busybox patches
  7. Debian security tracker
  8. CISA KEV
  9. FIRST EPSS

Frequently asked questions

Which BusyBox versions are affected by CVE-2016-2147?

NVD lists BusyBox up to and including 1.24.2. The fix, commit d474ffc, first shipped in 1.25.0 of 22 June 2016; Debian backported it to its 1.22.0 packages (per NVD, the BusyBox news page and the Debian security tracker).

Is my device affected if udhcpc runs but the domain search option is never used?

The vulnerable decoder handles DHCP options 119 and 120 and is compiled only when FEATURE_UDHCP_RFC3397 is enabled, which is the BusyBox 1.24.2 default. If the build has it, treat the device as exposed, since the content of a DHCP reply is chosen by whoever sends it (per the BusyBox source).

Does CVE-2016-2147 allow code execution?

NVD's description and score cover a crash only (availability impact high, CVSS 7.5). The fixed bug is a write one byte before a heap buffer when the decoded length is zero (per NVD and BusyBox commit d474ffc).

Is CVE-2016-2147 in the CISA KEV catalog?

No, not as of 2026-11-18 (catalog version 2026.11.17). FIRST EPSS gives it 0.07803, the 95th percentile, in the 2026-11-17 dataset (per CISA KEV and FIRST EPSS).