package: deb postinst probes userns as root — chrome-sandbox lands 0755 and the installed app SIGTRAPs on Ubuntu 24.04 #490
Labels
No labels
agent-blocked
agent-working
autopilot
bug
deferred
deploy-pending
enhancement
landing-pr
model-haiku
model-opus
model-sonnet
needs-design
needs-info
needs-triage
no-triage
out-of-scope
priority
ready-for-agent
ready-for-human
ready-for-session
rehearsal-183
snapshot-pending
standing-drive
wayfinder:grilling
wayfinder:map
wayfinder:prototype
wayfinder:research
wayfinder:task
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
Matou/idss#490
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Symptom (live, #471's install proof, 2026-08-12)
apt installofourcloud_0.1.0_amd64.debon the reference target (Ubuntu 24.04,kernel.apparmor_restrict_unprivileged_userns=1) succeeds, but launching the installed app crashes at once (SIGTRAP core dump):ls -l /opt/OurCloud/chrome-sandboxafter install:-rwxr-xr-x root root— 0755, no SUID bit.Cause
electron-builder's stock deb postinst decides SUID-vs-not with:
That runs as root (apt maintainer script). Root is exempt from Ubuntu 24.04's AppArmor userns restriction (
apparmor_restrict_unprivileged_userns=1— the restriction 24.04 actually uses; the legacykernel.unprivileged_userns_clonesysctl reads1), sounshare --user truesucceeds in a context that proves nothing about the unprivileged user who launches the app. The 0755 branch is taken; the user's Chromium can neither create a userns (AppArmor) nor exec a SUID helper (no bit) → FATAL abort.ADR 0168's premise — "electron-builder's stock deb postinst root-SUIDs
chrome-sandbox" — is false on the reference target. #463's sandbox layout proof asserted the postinst carries a SUID story, not that the branch taken on Ubuntu 24.04 is the right one — the exact class of defect only #471's real install could surface.Fix
Ship our own deb
afterInstallscript (electron-builder:deb.fpm/afterInstallinelectron-builder.yml) that setschown root:root && chmod 4755onchrome-sandboxunconditionally — Google Chrome's own deb ships 4755 unconditionally; a SUID helper on a userns-capable system is harmless (Chromium prefers userns and ignores the helper), while the conditional is what crashes. Keep the rest of the stock template (update-alternatives, desktop DB refresh).scripts/package-layout-check.sh: assert the built deb's postinst contains the unconditional 4755 (and nounshare --userconditional) — sandbox-provable, keeps the regression pinned.sudo chmod 4755 /opt/OurCloud/chrome-sandbox.Acceptance
scripts/package-app.sh→ fresh.debwhose postinst SUIDschrome-sandboxunconditionally;package-layout-check.shasserts it.close-report for #490 — status
success✅ close-report gates passed — every claim verified against main; closing.
envelope
Comment=— the launcher entry is unparseable and the app is absent from GNOME's app grid #1799