Hacktoberfest 2026:メンテナが10月に向けて印を付けた、オープンで初心者向けの issue。 Hacktoberfest の issue を見る

PE files parsed incorrectly with sections that overlap

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

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

評価

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

調査の方向性

Start at the mentioned PEView::RVAToFileOffset entry point and reproduce the failure with the Dogbolt binary hash 215bec7e5a30eac4ff15051dac1bc2c634a48ebb4caeac6d0047e9195967889d. Use bv.relocation_ranges_at(here) and the rebasing steps to inspect relocation parsing; done means the relocation directory parses without an out-of-bounds error and the vftable pointer rebases correctly.

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

説明

File Format: PE

Version and Platform (required):

  • Binary Ninja Version: 5.4.10303-dev
  • Edition: Ultimate
  • OS: macOS
  • OS Version: 26.6
  • CPU Architecture: arm64

Bug Description:
In certain PE files, parsing some of the relocation data fails due to the resource section overlapping in our binary parsing.

Steps To Reproduce:

  1. Open the binary from dogbolt with hash 215bec7e5a30eac4ff15051dac1bc2c634a48ebb4caeac6d0047e9195967889d
  2. Observe error: [BinaryView.PEView] Failed to parse relocation directory: read out of bounds
  3. Navigate to 10016160
  4. Python: bv.relocation_ranges_at(here)
  5. Rebase binary to 20000000
  6. Observe vftable pointer is not rebased properly

Expected Behavior:
I expected all of the relocations to be parsed.

Screenshots/Video Recording:
Image

Binary:
Dogbolt binary, PE/windows-x86, with hash 215bec7e5a30eac4ff15051dac1bc2c634a48ebb4caeac6d0047e9195967889d

Additional Information:
Codex says that PEView::RVAToFileOffset is incorrect and causing the binary reader to read from the rsrc section's offset when trying to read bytes from the reloc section. Codex suggested a significantly more complicated fix than I was expecting. Attempting to map an address to an RVA and vice versa is apparently much more complicated than I thought.

主要言語
C++
スター
1.3k
フォーク
298
平均マージ
4日 13時間
マージ済み PR(30日)
20

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

このリポジトリのコントリビューションガイドは索引されていません

はじめの一歩

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

Vector35/binaryninja-api のほかの issue

Vector35/binaryninja-api の issue をすべて見る

似ている issue

C++ の issue をもっと見る

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

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