Skip to content

v1.3.2 — .deb works on a fresh Ubuntu 24.04 box (AppArmor profile + /dev/shm fallback)

Choose a tag to compare

@cstrat cstrat released this 24 Apr 23:22
· 1 commit to master since this release

v1.3.2 — .deb works on a fresh Ubuntu 24.04 box

Hotfix for the .deb-only failure on Ubuntu 24.04+, where the LIVE PREVIEW tiles were blank, the log scrolled through URLs that all errored with ERR_FAILED, and the system log showed /dev/shm: No such process. The AppImage and npm start paths were unaffected.

Root cause

Ubuntu 24.04 ships kernel.apparmor_restrict_unprivileged_userns=1, which blocks unconfined binaries under /opt/ from creating user namespaces. Chromium needs user namespaces to spawn its <webview> guest renderers (even with --no-sandbox). The AppImage already has a system-shipped allowlist entry, which is why launch.sh worked while the .deb didn't.

Fixed

  • AppArmor profile installed by the .deb. A dpkg post-install script writes /etc/apparmor.d/stg-sase-traffic-generator granting userns, for the STG binary path and reloads AppArmor. The post-remove script tears it back down on uninstall. On distros without AppArmor (older Debian, Raspbian, …) the install step is a silent no-op.
  • --disable-dev-shm-usage added at startup in main.js. Belt-and-braces: on hardened VMs (and inside many container/VM images) /dev/shm is mounted with restrictive permissions or sized too small for Chromium's per-renderer shared-memory segments, so Chromium falls back to /tmp instead. Slightly slower than tmpfs, but reliable.

Install

Format arm64 x86-64
.deb (recommended) STG-1.3.2-arm64.deb STG-1.3.2-amd64.deb
.AppImage STG-1.3.2-arm64.AppImage STG-1.3.2-x86_64.AppImage
sudo apt install ./STG-1.3.2-amd64.deb     # or _arm64.deb

apt upgrades in place over 1.3.x / 1.2.x. The post-install script runs automatically on install and uninstall.

Included (from 1.3.0–1.3.1)

  • Renderer CSP (script-src 'self', object-src 'none', base-uri 'none', frame-src *)
  • HTML escaping at every dynamic innerHTML sink (logs, in-app report, exported HTML report)
  • Config sanitiser on load + import (rejects __proto__, non-http URLs, out-of-range counts)