Skip to content

Security: m3lonxd/mad68-linux

Security

SECURITY.md

Security Policy

Supported Versions

Security fixes apply to the latest main branch and current 0.3.x releases of MAD68 HE Studio (mad68-studio).

Version Supported
main / 0.3.x Yes
< 0.3.0 No

Reporting a Vulnerability

Please do not open a public GitHub issue for security vulnerabilities.

Instead, report vulnerabilities privately through GitHub Security Advisories:

Please include as much detail as possible to help reproduce and assess the issue:

  • Affected version or commit SHA and operating system
  • Component involved (e.g., Linux udev/HID layer, protocol framing, profile parser, or UI)
  • Step-by-step reproduction instructions or a minimal proof of concept
  • Potential impact

You can expect an initial acknowledgment as soon as the report is reviewed, followed by coordination on a fix and advisory disclosure once patched.

Privilege & Security Model

User-Space HID Communication

MAD68 HE Studio runs entirely in user space and does not install kernel drivers:

  • Linux: Reads /sys/class/hidraw and communicates over /dev/hidraw* using libc I/O, targeting devices with USB VID 0x373B on the vendor Raw HID interface (USAGE_PAGE 0xFF60, USAGE 0x61).
  • Windows & macOS: Communicates via hidapi in user space (windows-native on Windows, shared non-exclusive IOKit hidapi on macOS).

The GUI application is designed to run as an unprivileged user—never run the configurator itself as root.

Linux udev Rules & pkexec Scope

Non-root access on Linux requires udev/68-mad68he.rules to be installed at /etc/udev/rules.d/68-mad68he.rules:

SUBSYSTEM=="hidraw", ATTRS{idVendor}=="373b", MODE="0660", TAG+="uaccess"
SUBSYSTEM=="usb", ATTRS{idVendor}=="373b", MODE="0660", TAG+="uaccess"
  • Scope: TAG+="uaccess" grants read/write access to matching VID 0x373B hidraw and usb device nodes only to the active local desktop session (plus root / matching device group via 0660). Because any hidraw interface on a matching VID 0x373B device inherits that access, any local process running under the active user session can also access those vendor device nodes while the keyboard is connected.
  • Installation: You can inspect and run sudo ./udev/install_udev.sh directly, or trigger udev Kuralını Kur (pkexec) inside the app. The in-app helper (install_udev_rule() in src/ui/tabs.rs) stages the compiled-in 68-mad68he.rules and install_udev.sh inside a freshly created 0700 user-owned temporary directory with 0700 script permissions, executes pkexec /bin/bash <script>, and removes the temporary directory immediately afterward.

Hardware Safety Gates & Local Profiles

  • Bootloader & protocol guards: Devices detected on a bootloader PID are rejected with an error, and configuration writes are gated when the firmware protocol version does not match the known protocol (v9).
  • Flash brightness cap: Persistent flash writes clamp LED brightness to BRIGHTNESS_MAX (210). Experimental overdrive values (211..=255 hardware) are applied in RAM only, read back from firmware, and guarded on USB disconnect.
  • Profile path sanitization: Local JSON profile names are sanitized via sanitize_name() (src/profiles.rs) before constructing paths inside the user's profiles directory (~/.config/mad68-linux/profiles/ on Linux) to prevent path traversal and invalid filenames.

There aren't any published security advisories