Context varargs can smuggle graph-runtime references past the borrow tree's lifetime discipline
メンテナーはふだん 1 日以内に返信
まだ誰も着手していません。
評価
- 難易度
- 5/5
- 見積もり時間
- 1週間以上
- 初心者へのやさしさ
- 25/100
- issue の種類
- バグ
- 明瞭さ
- 説明が足りない
- 活発さ
- 静か
- 技術スタック
- rust
調査の方向性
まず OwnedContextImpl::with_vararg、NodeContainer のライフタイム処理、Monitor ノードの IORecord スナップショット経路を追跡し、その後 #4335 のランク多相性の変更を確認します。context API と vararg API が、グラフランタイムへの参照を有効なライフタイムの外へ、グラフの再コンパイルをまたぐ場合も含めて、もはや逃がさないようになり、かつ safe code の保証を弱めていなければ完了です。
索引モデルが issue の本文から書いたものです。
説明
Reported by @TrueDoctor following the rank polymorphism PR (#4335). Three existing mechanisms combine into an unsound API surface:
- The borrow tree launders lifetimes:
NodeContainerderefs*const TypeErasedNode<'static>to&'static, so references handed out inside the graph (the&PlatformEditorApiscope wire,&WgpuExecutor, or any reference to node-owned state) are typed'staticbut actually live only until the next graph recompilation deallocates their owner. OwnedContextImpl::with_varargaccepts anyBox<dyn AnyHash + Send + Sync>. Its'staticbound cannot distinguish real ownership from a laundered reference, so safe code in any node can store such a reference into a context. #4335 made this channel idiomatic (render boundary config, per-item lambda rows).- Contexts escape the graph: the Monitor node snapshots
IORecord { input: Context, output }into anArc<dyn Any>that the editor introspects and can retain across recompiles.
Combined: a node stores a laundered reference as a vararg, a Monitor captures the context, the graph recompiles and frees the referent, and the editor reads freed memory through entirely safe code (vararg() + downcast_ref). A vararg with interior mutability would similarly let context readers mutate graph-owned state as a covert return channel.
All current with_vararg callers box owned data, so no UB exists in the code today. But the risk remains for the API permitting it silently.
- 主要言語
- Rust
- スター
- 27.8k
- フォーク
- 1.3k
- 平均マージ
- 10時間 53分
- マージ済み PR(30日)
- 195
環境構築
このプロジェクトの開発コンテナを、あなたの GitHub アカウントでブラウザ上に起動します。
- Dockerfile・Docker Compose ファイルなし
- プルリクエストのテンプレートあり
- コントリビューションガイドなし
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
GraphiteEditor/Graphite のほかの issue
-
`third-party-licenses` fails on Windows when the parent process is PowerShell対応中かも @sahilshingate01 が 12 日前に担当しました。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 76/100
GraphiteEditor/Graphite#4745 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
-
Resizing a text box by one edge handle incorrectly locks both Max Width and Max Height, silently clipping text再び着手できるかも このイシューのプルリクエストはマージされずにクローズされました。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
GraphiteEditor/Graphite#4396 · コメント 2 件 ·
メンテナーはふだん 1 日以内に返信
-
Type hint is selected in node graph view再び着手できるかも このイシューのプルリクエストはマージされずにクローズされました。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 76/100
GraphiteEditor/Graphite#4311 ·
メンテナーはふだん 1 日以内に返信
-
`cargo run` fails on WebAssembly target due to `CARGO_BUILD_TARGET` leaking into `rustc_codegen_spirv` build再び着手できるかも このイシューのプルリクエストはマージされずにクローズされました。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 68/100
GraphiteEditor/Graphite#3939 · コメント 2 件 · リアクション 1 件 ·
メンテナーはふだん 1 日以内に返信
-
難易度 3/5 1〜2日 初心者へのやさしさ 50/100
GraphiteEditor/Graphite#4901 ·
メンテナーはふだん 1 日以内に返信
GraphiteEditor/Graphite の issue をすべて見る
似ている issue
-
docs(metrics): replace stale src/metrics.rs line anchors in dashboard-metrics.md with symbol namesオープン
難易度 2/5 1〜3時間 初心者へのやさしさ 88/100
メンテナーはふだん 1 日以内に返信
-
ci-cd desktop size:low telemetry-improvement telemetry-round-1
難易度 2/5 1〜3時間 初心者へのやさしさ 66/100
vfarcic/dot-agent-deck#2079 ·
メンテナーはふだん 1 日以内に返信
-
修改文件名时主键盘上的数字无法输入オープンbug
難易度 2/5 1〜3時間 初心者へのやさしさ 63/100
qingjian-team/qingjian#894 ·
メンテナーはふだん 2 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 85/100
rubys/roundhouse#1757 ·
-
enhancement user-priority/P3
難易度 2/5 1〜3時間 初心者へのやさしさ 68/100
メンテナーはふだん 1 日以内に返信