Hacktoberfest 2026: le issue che i maintainer hanno segnato per ottobre, aperte e adatte ai principianti. Sfoglia le issue Hacktoberfest

Keep OpenVMM's report and console files readable under a restrictive umask

Aperta
#651 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

I maintainer di solito rispondono entro 1 giorno

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
3/5
Tempo stimato
1-2 giorni
Idoneità per principianti
62/100
Tipo di issue
Bug
Chiarezza
Abbastanza chiara
Stato di attività
Attiva
Stack tecnologico
rust
Ambito
backend

Direzione di ricerca

Start with openvmm/openvmm/openvmm_entry/src/microvm/report.rs and openvmm/openvmm/openvmm_entry/src/serial_io.rs to trace how the report and captured console files are created. Compare the two listed options and check how #628 handles file modes; done means both files remain readable by their owner under a restrictive umask without unintentionally changing console permissions under the common umask 022.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

Summary

An OpenVMM that nvx::host::process::launch spawns inherits the caller's umask. OpenVMM does not set the modes of the files it creates for the caller again, so under a umask that clears the owner's own read permission (for example 0400), the owner cannot read them:

  • The microVM report (openvmm/openvmm/openvmm_entry/src/microvm/report.rs) is staged in a tempfile created with mode 0600 and published without a chmod, so umask 0400 publishes it with mode 0200.
  • A console captured to a file (file_serial in openvmm/openvmm/openvmm_entry/src/serial_io.rs) is opened with create(true) (mode 0666), so umask 0400 leaves it at 0266.

The sandbox store already sets the modes of its own files again (#628), so its records stay usable under such a umask; this issue covers only the files that OpenVMM writes.

Options

  1. In nvx-rs, set a fixed umask such as 0o077 in the child's existing pre_exec hook (nvx-rs/src/host/sys/process.rs, detach). This also changes a console file from 0644 to 0600 under the common umask 022.
  2. In OpenVMM, set the intended mode of the report and the console file explicitly after creating them.

Notes

A umask that clears the owner's own permissions is unusual. This was found in the final review of #628 and deferred there as out of scope.

Lingua principale
Python
Stelle
408
Fork
28
Merge medio
16h 20m
PR unite (30g)
355

Preparare l'ambiente

Questo progetto non fornisce container di sviluppo, Dockerfile né guida per i contributori, quindi l'ambiente è a tuo carico: parti dal suo README e consulta la nostra guida al primo contributo per i passaggi generali.

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di microsoft/nvx

Tutte le issue di microsoft/nvx

Issue simili

Altre issue su Python

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.