PixlOne / logiops

An unofficial userspace driver for HID++ Logitech devices
GNU General Public License v3.0
3.42k stars 271 forks source link

CVE-2024-45752: D-Bus service allows configuration by any unprivileged user #473

Closed hyperair closed 1 month ago

hyperair commented 2 months ago

logiops, in its default configuration, allows any unprivileged user to configure its logid daemon via an unrestricted D-Bus service, including setting malicious keyboard macros. This could potentially enable privilege escalation with minimal user interaction required.

The most basic proof-of-concept assigns a shell command to all buttons for connected peripherals. A more crafty attacker could tailor this operation to specific software used on the system, possibly monitoring the process list and mapping malicious macros at exactly the right moment.

References:

PixlOne commented 1 month ago

@hyperair Thank you for reporting, could you please confirm that this fixes the issue.

hyperair commented 1 month ago

Yep, I just verified that the updated dbus policy file prevents the exploit script from working.

Note: To anyone testing out the exploit script, back up your logid.cfg first and restore it after