The os-image-hash RTMR3 event records the key provider's answer, is emitted only on the KMS path, and has no reader
Los mantenedores suelen responder en 1 día
Nadie ha tomado este issue todavía.
Evaluación
- Dificultad
- 5/5
- Tiempo estimado
- Más de una semana
- Aptitud para principiantes
- 35/100
Línea de trabajo
Start with dstack-util/src/system_setup.rs:2338 and the key-provider paths at :2458-2476, then inspect dstack-attest/src/attestation.rs:1768-1788 and :1990-1993 for the measurement and image-hash readers. Decide which improvement direction is selected, document or implement that direction, and verify that the resulting event semantics and verifier behavior are consistent with the stated goal.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
Label: DESIGN. Nothing here is broken; the question is what the measurement commits to and what its name invites a reader to assume.
Base: origin/next @ 030fbb2183.
What the design currently is
dstack-util/src/system_setup.rs:2336-2339:
let response = kms_client.get_app_key(rpc::GetAppKeyRequest { ... }).await?;
emit_runtime_event("os-image-hash", &response.os_image_hash)
.context("failed to extend os-image-hash to the launch measurement")?;
response is the GetAppKeyResponse. The payload extended into RTMR3 is therefore the KMS's answer, not anything the guest computed or observed.
Three properties follow:
- The value is the key provider's assertion. When
key_provider_idis unpinned in app-compose — the default —verify_key_provider_idreturnsOk(())on an empty pin (system_setup.rs:2390-2393), andkms_urlscomes from the host-supplied.sys-config.json(system_setup.rs:2364-2384)..agent/THREAT-host-and-app.mdH-4 establishes that a host can pointkms_urlsat a KMS it operates inside a genuine TEE and nothing in the guest refuses it. In that configuration the host chooses this event's payload. - It is emitted only on the KMS path.
KeyProviderKind::Local,TpmandNone(system_setup.rs:2458-2476) produce noos-image-hashevent at all, so its absence carries no information. - Nothing reads it.
rg 'os-image-hash'acrossdstack/,sdk/anddocs/returns the producer at:2338, the KMS's own test fixtures, and no consumer.AppInfo.os_image_hashis read fromvm_config(dstack-attest/src/attestation.rs:1990-1993), never from this event.
Reachability
- Who can trigger it: the host, by selecting
kms_urls, whenever the tenant has not pinnedkey_provider_id. - What credential it needs: the ability to run a KMS that passes attestation — no tenant or operator credential.
- Who controls frequency: the host, every boot.
Steelman
Extending it is defence in depth. It makes the image identity the guest was told about part of mr_aggregated (dstack-attest/src/attestation.rs:1768-1788), so any attestation taken after key release commits to it, and a future verifier could cross-check it against vm_config for free. Emitting it at the point where the value first becomes known to the guest is the natural place to put it, and the .context() message shows the intent was precisely "make this part of the launch measurement".
It is also genuinely harmless today, because nothing consumes it.
What it costs
An event named os-image-hash sitting in a hardware-measured log invites a relying party to read it as the image identity. It is not that. It is "what my key provider told me my image hash is", and on the default configuration the host picks the key provider. A reader who does the obvious thing gets a host-influenced value carrying the authority of RTMR3.
This is a naming and documentation cost rather than a live bypass — but the whole point of an event log is that a third party can read it without knowing the emitter's internals.
Improvement directions
- Cheapest, and the minimum. A one-line comment at
system_setup.rs:2338recording that the payload is the provider's claim, not a guest observation. Stops the next reader from treating it as evidence. Zero risk, no measurement change. - Cheap and additive — the useful one. Have the verifier compare
find_event_payload("os-image-hash")againstvm_config.os_image_hashwhen the event is present, and surface the result. That turns a write-only measurement into an actual check, costs nothing on boots that do not emit it (see property 2 above), and composes with theos_image_hash_anchordirection in #1266. - Rename to say whose claim it is —
kms-os-image-hash, or fold it into the existingkey-providerevent payload, which already carries provider name and id (system_setup.rs:980-985). This changes RTMR3 for every image, so it is a measured-value change: it belongs with the nextevent_log_versionbump (dstack-attest/src/lib.rs:90-121), not on its own. Listed for completeness, not recommended as a standalone change.
(1)+(2) are cheap and independent. (3) is a deployment event.
- Lenguaje dominante
- Rust
- Estrellas
- 555
- Forks
- 97
- Merge medio
- 1 d 3 h
- PR fusionados (30 d)
- 195
Preparar el entorno
- Sin Dockerfile ni archivo de Docker Compose
- Sin plantilla de pull request
- Leer la guía de contribución
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Más de Dstack-TEE/dstack
-
Dificultad 5/5 Más de una semana Aptitud para principiantes 35/100
Dstack-TEE/dstack#1384 ·
Los mantenedores suelen responder en 1 día
-
Dificultad 5/5 Más de una semana Aptitud para principiantes 30/100
Dstack-TEE/dstack#1301 ·
Los mantenedores suelen responder en 1 día
-
Dificultad 3/5 1-2 días Aptitud para principiantes 55/100
Dstack-TEE/dstack#1300 ·
Los mantenedores suelen responder en 1 día
-
Dificultad 4/5 3-5 días Aptitud para principiantes 48/100
Dstack-TEE/dstack#1299 ·
Los mantenedores suelen responder en 1 día
-
Dificultad 4/5 3-5 días Aptitud para principiantes 48/100
Dstack-TEE/dstack#1298 ·
Los mantenedores suelen responder en 1 día
Todos los issues de Dstack-TEE/dstack
Issues similares
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 72/100
pnpm/pnpm#16635 · 1 comentario ·
Los mantenedores suelen responder en 1 día
-
bug llm translation
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 85/100
Los mantenedores suelen responder en 1 día
-
skillfs: one malformed chat-log line aborts the entire skill-usage analysis (skill_usage_from_chat_logs.py)Posiblemente ocupada @zjncs la tomó hoy. Abiertocomponent:skillfs
Dificultad 2/5 1-3 horas Aptitud para principiantes 82/100
agentic-os-org/ANOLISA#6116 · 1 comentario ·
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 88/100
indygreg/cryptography-rs#99 ·