Follow @Openwall on Twitter for new release announcements and other news
[<prev] [next>] [day] [month] [year] [list]
Date: Sun, 19 Nov 2017 15:55:59 -0500
From: Michael Orlitzky <>
Subject: CVE-2017-16882: Icinga core root privilege escalation via insecure

Product: Icinga core <>
Vendor: NETWAYS GmbH <>
Versions-affected: 1.14.0 and earlier (all 1.x versions)
Author: Michael Orlitzky

== Summary ==

Icinga installs two sets of files with insecure permissions: after
installation, the executables and the configuration files are all
owned by the same unprivileged user and group (typically, "icinga")
that the daemon runs as. In one attack, the unprivileged user simply
replaces the icinga executable with one that does his bidding. A
slightly more complicated attack can be mounted by the unprivileged
user by scheduling a malicious service check and then altering
icinga.cfg to execute that check as root.

The ido2db daemon and its sample configuration file have the same

== Details ==

The Icinga build system allows you to specify a runtime user and group
(default: icinga) via the two ./configure parameters
"--with-icinga-user" and "--with-icinga-group":

                   [sets user name to run icinga]),

                   [sets group name to run icinga]),


The daemon runs as that user and group by default, because the
upstream configuration file icinga.cfg incorporates those flag values
into the icinga_user and icinga_group settings in

  # This determines the effective user that Icinga should run as.
  # You can either supply a username or a UID.

  # This determines the effective group that Icinga should run as.
  # You can either supply a group name or a GID.

The build system then installs most of the files for the package with
their owners/groups set to the user and group specified, through the
pervasive use of the following INSTALL_OPTS in

  INSTALL_OPTS="-o $icinga_user -g $icinga_grp"

This creates vulnerabilities because the Icinga daemons are intended to
be run as root.

== Exploitation ==

The default ownership is exploitable in at least two ways:

 1. The Icinga runtime user owns the daemon executable, typically
    located at /usr/bin/icinga. That executable is run as root, and
    drops privileges to the runtime user itself. This invites a simple
    attack where the runtime user replaces the daemon executable with
    his own code. The ido2db daemon has the same problem.

    In addition, the system executables icingastats and log2ido are
    installed to root's $PATH and
    could conceivably be run as root. They thus pose a similar risk.

  2. The main configuration file icinga.cfg is also owned by the
     unprivileged runtime user, but icinga.cfg is where the runtime user
     and group are specified. The unprivileged runtime user can schedule
     a malicious service check (specified in the configuration files he
     owns) and then put icinga_user=root in icinga.cfg. The next time
     the daemon is restarted, it will run as root and execute the
     command set by the unprivileged user.

     The configuration file ido2db.cfg-sample is vulnerable in the same
     manner if it is renamed to ido2db.cfg without adjusting its

== Mitigation ==

Most users should reset all ownership and group information to safe
values, "root:root", except where write access is needed (for example,
Icinga needs runtime write access to its $localstatedir).

Powered by blists - more mailing lists

Please check out the Open Source Software Security Wiki, which is counterpart to this mailing list.

Confused about mailing lists and their use? Read about mailing lists on Wikipedia and check out these guidelines on proper formatting of your messages.