secure_time: true can never sync — guest chrony is built without NTS

オープン
#745 コメント 2 件 リアクション 0 件 担当者 0 名 GitHub で見る

まだ誰も着手していません。

評価

難易度
3/5
見積もり時間
1〜2日
初心者へのやさしさ
68/100
issue の種類
バグ
明瞭さ
おおむね明確
活発さ
静か
技術スタック
rust

調査の方向性

meta-dstack/recipes-core/chrony/chrony%.bbappend から始め、その PACKAGECONFIG を upstream の chrony_4.8.bb と比較し、次に chronyc waitsync ゲートの周辺にある dstack-util/system_setup.rs を調べます。NTS を有効にしたイメージをビルドし、chronyc が同期できることを確認します。また、信頼できる時刻ソースが存在しない場合に secure_time が false になるよう、単一ノードのデフォルトも追跡します。

索引モデルが issue の本文から書いたものです。

説明

bug security
Problem

Guest images ship /etc/chrony/chrony.conf with every time server set to NTS (server <host> iburst nts), but chronyd is compiled without NTS support. Chrony therefore has zero usable sources and never synchronizes.

Any app with secure_time: true — the manifest default (default_true) — then blocks in dstack-util system_setup.rs on chronyc waitsync, which bails → boot.error → reboot. On SEV-SNP this is a hard loop (cpus are not resettable, terminating → VMM restarts forever); on TDX it's a boot failure.

Confirmed from inside a running CVM:

chronyd 4.8 starting (... -NTS ...)
Missing NTS support
Can't synchronise: no selectable sources (10 unreachable sources)

chronyc authdata shows Cook=0 for all servers (NTS-KE never attempted), and the clock was already correct (stepped 0.000000s) — so it's not a network, clock, or platform issue.

It has gone unnoticed because every real deployment sets secure_time: false; the broken NTS sync is silent until the strict gate is enabled.

Fix

In meta-dstack, recipes-core/chrony/chrony%.bbappend adds DEPENDS += "gnutls" and an NTS config but never enables the NTS build flag. Upstream chrony_4.8.bb gates it behind PACKAGECONFIG[nts]. Add:

PACKAGECONFIG:append = " nts"

Then chronyd is built with NTS and secure_time: true can actually sync.

Separately, single-node/no-gateway deploys (no trusted time source) should default secure_time: false.

主要言語
Rust
スター
546
フォーク
96
平均マージ
19時間 22分
マージ済み PR(30日)
109

コントリビューションガイド

コントリビューションガイドを開く

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

Dstack-TEE/dstack のほかの issue

Dstack-TEE/dstack の issue をすべて見る

似ている issue

Rust の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。