Skip to content

Security: ArcadaLabs-Jason/WifiOptimizer

SECURITY.md

Security

Reporting a vulnerability

Please report security problems privately, not in a public issue: use Report a vulnerability on this repository's Security tab.

Include what you found, the plugin version, your device and OS, and the steps to reproduce it if you have them.

Why it matters here

The plugin's backend runs as root. Decky only does that for plugins that ask for it (the root flag in plugin.json), and this one does, because it changes NetworkManager profiles, kernel settings and system files. It also reads a settings file that lives in a directory your desktop user can write to. A bug in how it handles that input can be a way to run something as root. The plugin's own folder is owned by root when it was installed by install.sh or through Decky Loader 3.1.10 or newer. Before 3.1.10, Decky's Install Plugin from ZIP or URL left it owned by the desktop user, and the in-app updater replaces the files in it without changing who owns the folder. The plugins folder that holds it is Decky's to protect, and on a standard install the desktop user owns it, which is one more reason the desktop account is treated as trusted (see below). Within the plugin's own files, only the settings and log folders are meant to be writable by the desktop user.

The desktop account itself is trusted. Anything already running as that user can capture the sudo password through the user's own shell, so the install script is not hardened against it. Which local programs can call the plugin's functions is decided by Decky Loader, not by the plugin.

Signed releases

From v0.21.0-beta on, every release, stable and beta, carries the source tarball wifi-optimizer-v<version>.tar.gz, a SHA256SUMS file listing its checksum, and SHA256SUMS.minisig, a minisign signature of that list. The signature's trusted comment names the release, wifi-optimizer v<version>. From v0.24.3-beta on, releases also carry wifi-optimizer.zip, the plugin packaged for Decky's Install Plugin from ZIP or URL, and SHA256SUMS lists it too.

The in-app updater checks the signature against the keys below, which are built into the plugin, and checks that the comment names the version it is installing. It then checks the downloaded tarball against the signed checksum before unpacking it. If any of that fails, nothing is installed. A release without these files is not installed either. This checking starts with v0.21.0-beta. Earlier versions install what they download without checking, including the update that brings in v0.21.0-beta. On the beta channel the updater offers the newest release GitHub lists. If newer releases are taken down, the beta channel offers the newest remaining one as Go back to, but, from v0.24.6-beta on, never one older than the last release with a security fix. Nothing installs without your tap, and the stable channel never goes back.

The install script (install.sh) does not check signatures. It downloads the latest release's tarball, the one SHA256SUMS lists, from GitHub over HTTPS, and installs nothing if it can't find that release. Decky's Install Plugin from ZIP or URL doesn't check them either. If you want to check a release before installing it, use the steps below.

Release key, id FE0DCD913B7044FA:

RWT6RHA7kc0N/vvpQCVTRBrSXNZpv7hBFPZpSRX9m5v55Mrl15BB1heh

Rescue key, id 0DB3B91752AFFB43:

RWRD+69SF7mzDbaCBVP3Pj5/5sOngkf/rVfOxCocbSTf+H8OP115i+8g

The release key signs releases. The rescue key is kept apart from the release key, and is only used to sign a release that replaces the release key if that key is ever lost or leaked. The updater accepts a release signed with either key.

To check a release by hand, download SHA256SUMS, SHA256SUMS.minisig and the file you want (the tarball or the zip) into one directory and run:

minisign -Vm SHA256SUMS -P RWT6RHA7kc0N/vvpQCVTRBrSXNZpv7hBFPZpSRX9m5v55Mrl15BB1heh
sha256sum -c --ignore-missing SHA256SUMS

The first should print the trusted comment with the version you downloaded, and the second should report the file you downloaded as OK. A release signed with the rescue key verifies with the rescue key instead: use -P RWRD+69SF7mzDbaCBVP3Pj5/5sOngkf/rVfOxCocbSTf+H8OP115i+8g.

In scope

  • The plugin backend (main.py)
  • The NetworkManager dispatcher script (defaults/dispatcher.sh.tmpl, installed to /etc/NetworkManager/dispatcher.d/)
  • The updater (the update script in main.py, and how it downloads, checks and installs a release)
  • The install script (install.sh)

Problems in Decky Loader itself, SteamOS, NetworkManager or the kernel are best reported to those projects, though I am happy to hear about anything this plugin makes worse.

There aren't any published security advisories