[General]: SYSCALL leaves the new code segment's internal role fields uninitialized

クローズ 初心者向け
#62 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る

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

評価

難易度
2/5
見積もり時間
1〜3時間
初心者へのやさしさ
75/100
issue の種類
バグ
明瞭さ
明確に書かれている
活発さ
活発
技術スタック
xml

調査の方向性

SYSCALL の定義は data/instruction/SYSCALL.xml にあります。まず new_cs の構築と既存の CS ロールフィールドを調べてください。マッピングされた IA32_LSTAR ターゲットを使用する 64 ビットの 0F 05 のケースを再現し、その後 48 0F 07 をフェッチしてください。フェッチとリターン命令が uninitializedRead を発生させなくなり、アーキテクチャ上の代入が変更されていなければ完了です。

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

説明

Executable specification issue

Problem

SYSCALL builds a fresh Segment record and assigns its architectural CS fields, but omits the internal is_code, is_stack and is_64bit_mode_segment fields. Later executable-model helpers read those fields. This creates an uninitialized model value after an otherwise valid control transfer.

Concrete case

Execute a valid 64-bit SYSCALL with FRED and shadow-stack handling disabled and a canonical mapped IA32_LSTAR target. Then fetch an instruction at that target. The new CS has the expected architectural descriptor bits but lacks the internal role fields used by the fetch/address helpers. Executing SYSCALL and then fetching at the new entry point raises uninitializedRead in the executable model.

Expected behavior and references

References use Intel SDM 325462-093, checked on 2026-10-01. PDF page numbers below refer to the combined manual.

Source

Source checked at Intel SDM repository commit b5218b0f1cf512304d4b3cb364433a08fcee47cb.

The helper links are the readable current pages. Their reviewed definitions are in the compressed definition database at the pinned commit.

Suggested correction

When constructing new_cs, copy is_code, is_stack and is_64bit_mode_segment from the existing CS. Preserve the existing assignments to architectural descriptor fields and leave intentionally unspecified fields unspecified.

Evidence

Model execution of SYSCALL (0F 05) followed by an instruction fetch of 48 0F 07 at the configured kernel entry fails with uninitializedRead because the new CS lacks its role fields. Preserving is_code, is_stack and is_64bit_mode_segment allows the subsequent fetch and return instruction to execute.

AI disclosure

Assisted by Codex

主要言語
HTML
スター
61
フォーク
4
PR マージ指標
30日以内にマージされた PR はありません

環境構築

はじめの一歩

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

intel/SDM のほかの issue

intel/SDM の issue をすべて見る

似ている issue

Operating Systems の issue をもっと見る

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

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