Skip to content

Restrict runtime event log permissions#602

Merged
kvinwang merged 1 commit intomasterfrom
issue/557-runtime-event-log-fs-perms
Mar 27, 2026
Merged

Restrict runtime event log permissions#602
kvinwang merged 1 commit intomasterfrom
issue/557-runtime-event-log-fs-perms

Conversation

@kvinwang
Copy link
Copy Markdown
Collaborator

This PR tightens filesystem permissions for the runtime event log so that it is only readable/writable by the owner (root).

  • Use fs_err::OpenOptionsExt on Unix to create /run/log/dstack/runtime_events.log with mode 0600
  • Keep the existing log format and location unchanged to avoid breaking consumers

This addresses part of the concern raised in #557 about other processes inside the CVM being able to tamper with the runtime event log. The CVM is not designed as a multi-tenant environment; untrusted workloads should be sandboxed by the application itself. However, making the log file private to the owning process is a straightforward hardening step with no downside.

@kvinwang kvinwang merged commit f8a8321 into master Mar 27, 2026
15 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant