feat(gateway): verify the trust of a launched driver binary in packaged installs
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 4/5
- Tempo stimato
- 3-5 giorni
- Idoneità per principianti
- 45/100
Direzione di ricerca
Start at the gateway's driver discovery path: the first binary found in driver_dir, the conventional libexec directories, or next to the gateway executable, and the launcher that execs it. Read #5384 and #5385 for the ownership check that was dropped, then isolate the trust decision into a pure function over the binary's owner, mode and parent directory, taking the user-namespace uid mapping as an input. Unit-test it for the initial namespace and a user namespace, and confirm the packaged tmachine systemd user unit (PrivateTmp=true) still starts the gateway with the check enabled.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
User Story
I run the gateway from the packaged systemd user unit and launch compute drivers (Docker, Podman, VM) from /usr/libexec/openshell. I directly encountered the gateway refusing to start a driver because of an ownership check on the driver binary, and I want a driver trust check that is both safe and works for packaged installs.
Problem Statement
The gateway executes the first driver binary it finds in driver_dir, the conventional libexec directories, or next to its own executable. On main it performs no ownership, mode or parent-directory check on that binary. The launcher PR keeps only a mode check (not writable by group or others) and drops an owner check, because the owner check broke packaged installs: the packaged user unit sets PrivateTmp=true, which runs the gateway in a user namespace where root-owned files appear owned by the overflow uid (65534), so "owned by root or the gateway user" rejected /usr/libexec/openshell/openshell-driver-docker.
Impact / Why This Matters
Without a trust check, a driver binary that another local user can replace is executed with the gateway's authority. The check must still work in a user namespace, or packaged installs fail to start.
Desired Workflow
The gateway verifies a driver binary before it launches it. A binary in a root-owned system directory passes in every supported deployment, including the packaged user unit. A binary or directory another user can modify is refused with an error that says why. Success: packaged installs start, and a replaceable binary is rejected.
Acceptance Criteria
- The check passes for root-owned binaries under
/usr/libexec/openshellwhen the gateway runs in a user namespace. - The binary's parent directory is checked, because a writable directory lets any file be replaced.
- The decision is a pure function with unit tests for the initial namespace and for a user namespace.
- The packaged tmachine environments start the gateway with the check enabled.
Related: #5384, #5385. Deferred from the launcher PR to keep that change free of new behaviour.
- Lingua principale
- Rust
- Stelle
- 21.5k
- Fork
- 2.1k
- Metriche di merge delle PR
- Nessuna PR unita negli ultimi 30g
Preparare l'ambiente
- Nessun Dockerfile né file Docker Compose
- Ha un modello di pull request
- Leggi la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di NVIDIA/OpenShell
-
state:triage-needed
Difficoltà 2/5 1-3 ore Idoneità per principianti 86/100
-
state:triage-needed
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
-
bug: Ready=False/PodTerminating is treated as a terminal sandbox failureForse già presa @TaylorMutch l’ha presa 9 giorni fa. Apertastate:accepted state:pr-opened
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
-
state:triage-needed
Difficoltà 1/5 1-3 ore Idoneità per principianti 78/100
-
state:triage-needed
Difficoltà 2/5 1-3 ore Idoneità per principianti 62/100
Tutte le issue di NVIDIA/OpenShell
Issue simili
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
I maintainer di solito rispondono entro 2 giorni
-
autofixer: follow-up
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
tursodatabase/turso#12531 ·
I maintainer di solito rispondono entro 1 giorno
-
bug help wanted ui
Difficoltà 2/5 1-3 ore Idoneità per principianti 82/100
userFRM/egui-charts#4292 ·
I maintainer di solito rispondono entro 1 giorno
-
CHANGELOG.md out of dateApertaIssue-Bug Need-Review
Difficoltà 1/5 1-3 ore Idoneità per principianti 85/100
PowerShell/DSC#1832 ·
I maintainer di solito rispondono entro 1 giorno
-
bug
Difficoltà 2/5 1-3 ore Idoneità per principianti 76/100
I maintainer di solito rispondono entro 1 giorno