Skip to content
Access control Write-up Intermediate

Kea DHCP: Local Vulnerabilities in Many Linux and BSD Distributions

Kea DHCP ships an unauthenticated local REST API that lets any local user set configuration, so an attacker can load a hook library and run code as the Kea service, which is root on many default installs. Related commands also allow arbitrary file writes and log path changes, and lease files are world-readable.

security.opensuse.org

Published on security.opensuse.org

The Kea DHCP distribution is the next generation DHCP server suite offered by the Internet Systems Consortium (ISC). It replaces the traditional ISC DHCP software which has reached its end of life.

The full write-up lives on its author's site

It belongs to its author, so we link to it rather than copy it. The other two tabs are our own rewrites, checked against it.

Not written yet. The AI write-up for this write-up has not been written yet. The Original tab links to the source.

How it worked

Root cause

The control API is reachable by all local users without authentication and accepts configuration that names files to load or write, with no restriction on which paths are allowed.

Impact

On installs where Kea runs as root this gives arbitrary code execution with full root privileges; where a dedicated service user is used, the attacker gains control of the Kea processes and escalated networking privileges, though Debian's AppArmor profile blocks the library injection.

What the attacker needed

Local shell access as any user; Kea control API reachable on localhost; Kea running as root for full escalation

The fix

Upstream fixed it in releases 2.4.2, 2.6.3 and 2.7.9 by restricting hook libraries and config/log files to trusted directories and enforcing API authentication by default.

How it was found

  1. Send a configuration command to the local control API naming a hook library file the attacker controls.
  2. Kea loads that library, running the attacker's code inside the Kea process.

Explained by bugbounty.wiki with AI from the original and checked against quotes from it; it can still be wrong. Read the original before relying on a detail.

Not written yet. The AI write-up for this write-up has not been written yet. The Original tab links to the source.

Kea is a program that hands out network addresses (DHCP) to computers. It also runs a small control interface on the local machine that, by default, anyone logged in can use without a password. Because that interface can tell Kea to load extra code, a normal user can make Kea run their code, and on many systems Kea runs with the highest privileges.

What is Access control?

A user can do something their role should not allow: reach an admin function, act on a feature they have not paid for, or skip a permission check. IDOR is the special case where the object belongs to someone else.

Similar reports

View all

Same bug class and techniques, clearest first.

Broken access control

The lesson behind this report.

A user can do something their role should not allow: reach an admin function, act on a feature they have not paid for, or skip a permission check. IDOR is the special case where the object belongs to someone else.