Narrow an engine thread's capabilities on runc, not only the serving thread's

Aperta
#27 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à
5/5
Tempo stimato
Più di una settimana
Idoneità per principianti
35/100
Tipo di issue
Bug
Chiarezza
Abbastanza chiara
Stato di attività
Attiva
Stack tecnologico
go, linux

Direzione di ricerca

Read the runc initialization and serving paths around fz_init and fz_serve, then trace where cap_nested_userns writes its sysctl and which thread performs the capability change. Compare the two options in the issue, including their effects on engine templates that start threads early. Done means choosing and implementing a safe capability policy, with coverage for the affected thread and runc behavior.

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

Descrizione

enhancement

On runc, the zygote narrows its capabilities to CAP_SYS_ADMIN on the serving thread only. Capabilities are per thread, and the library installs no signal handler to broadcast the change. So an engine thread a template starts before fz_serve keeps the container's full set. No fiber inherits it, because every fiber forks from the serving thread.

Options.

  • Drop the capabilities in fz_init, before any thread exists. Then cap_nested_userns's sysctl write, which needs CAP_SYS_RESOURCE, must move there too.
  • Refuse to serve while another thread holds more than CAP_SYS_ADMIN. That breaks runc engine templates that start their thread early.
Lingua principale
Go
Stelle
5
Fork
5
Merge medio
15h 27m
PR unite (30g)
41

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 Azure/fiberd

Tutte le issue di Azure/fiberd

Issue simili

Altre issue su Go

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.