USB PD: Structured VDM header is parsed without checking the VDM Type bit
まだ誰も着手していません。
評価
- 難易度
- 2/5
- 見積もり時間
- 1〜3時間
- 初心者へのやさしさ
- 82/100
- issue の種類
- バグ
- 明瞭さ
- 明確に書かれている
- 活発さ
- 活発
- 技術スタック
- rust
- 領域
- embedded-iot
調査の方向性
src/vdm/structured/header.rs#L100-L123を読み、Raw、u32、[u8; 4]に対するHeader::try_fromの公開パース経路を調べてください。コマンドビットが1である非構造化VDMが拒否されることを示すヘッダーレベルのテストを追加し、その後、関連するテストを実行してください。bit 15がクリアされたヘッダーがパース時に拒否され、既存の構造化ヘッダーのテストが引き続き成功すれば完了です。
索引モデルが issue の本文から書いたものです。
説明
Summary
Header::try_from never inspects bit 15, so an unstructured VDM whose low bits happen to look like a command parses successfully as a Structured VDM.
What the specification requires
USB PD R3.2 V1.2 S6.4.12.2, Table 6.33 (Structured VDM Header), bit 15:
1 = Structured VDM.
What the code does
src/vdm/structured/header.rs#L100-L123 parses Raw, u32 and [u8; 4] without testing bit 15. An unstructured VDM with low command bits equal to 1 is accepted as Discover Identity.
Suggested fix
Check bit 15 at the public parse boundary and return an error when it is clear, or document and enforce a precondition that the caller has already established the message is structured. Existing tests cover command enums only, not whole headers, so a header-level golden test should be added alongside the fix.
- 主要言語
- Rust
- スター
- 2
- フォーク
- 8
- 平均マージ
- 1日 10時間
- マージ済み PR(30日)
- 9
環境構築
- Dockerfile・Docker Compose ファイルなし
- プルリクエストのテンプレートなし
- コントリビューションガイドを読む
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
OpenDevicePartnership/embedded-usb-pd のほかの issue
-
USB PD: Structured VDM Command accepts values wider than the 5-bit field再び着手できるかも @RobertZ2011 が 35 日前に担当しましたが、オープン中のプルリクエストはありません。 オープンBREAKING CHANGE bug conformance
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
OpenDevicePartnership/embedded-usb-pd#92 · 担当者 1 名 ·
-
USB PD: deprecated and invalid Passive Cable VDO encodings are rejected instead of normalized再び着手できるかも @RobertZ2011 が 36 日前に担当しましたが、オープン中のプルリクエストはありません。 オープンbug conformance
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
OpenDevicePartnership/embedded-usb-pd#91 · コメント 1 件 · 担当者 1 名 ·
-
USB PD: extended Alert event 5 is rejected although it is defined再び着手できるかも @RobertZ2011 が 36 日前に担当しましたが、オープン中のプルリクエストはありません。 オープンbug conformance
難易度 2/5 1〜3時間 初心者へのやさしさ 73/100
OpenDevicePartnership/embedded-usb-pd#90 · コメント 1 件 · 担当者 1 名 ·
-
PD r3.2 v1.1 ->r3.2 v1.2 upgrade再び着手できるかも @RobertZ2011 が 36 日前に担当しましたが、オープン中のプルリクエストはありません。 オープン
OpenDevicePartnership/embedded-usb-pd#119 · 担当者 1 名 ·
-
難易度 5/5 1週間以上 初心者へのやさしさ 35/100
OpenDevicePartnership/embedded-usb-pd の issue をすべて見る
似ている issue
-
app bug session
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
メンテナーはふだん 1 日以内に返信
-
marketing
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
メンテナーはふだん 1 日以内に返信
-
bug
難易度 1/5 1時間未満 初心者へのやさしさ 92/100
メンテナーはふだん 1 日以内に返信
-
macOS autosubmit enable passes unsupported --wait to launchctl bootout対応中かも @iqdoctor が今日担当しました。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 82/100
junhoyeo/tokscale#1713 · コメント 3 件 ·
メンテナーはふだん 1 日以内に返信
-
bug
難易度 2/5 1〜3時間 初心者へのやさしさ 68/100
メンテナーはふだん 1 日以内に返信