Hacktoberfest 2026: los issues que los mantenedores marcaron para octubre, abiertos y aptos para principiantes. Explorar issues de Hacktoberfest

PE files parsed incorrectly with sections that overlap

Abierto
#8,412 0 comentarios 0 reacciones 0 asignados Ver en GitHub

Nadie ha tomado este issue todavía.

Evaluación

Dificultad
4/5
Tiempo estimado
3-5 días
Aptitud para principiantes
50/100
Tipo de issue
Error
Claridad
Bastante claro
Estado de actividad
Tranquilo
Stack tecnológico
cpp

Línea de trabajo

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.

Escrito por el modelo de indexación a partir del texto del issue.

Descripción

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.

Lenguaje dominante
C++
Estrellas
1.3k
Forks
298
Merge medio
4 d 13 h
PR fusionados (30 d)
20

Guía de contribución

No hay ninguna guía de contribución indexada para este repositorio

Primeros pasos

  1. Lee el issue completo y luego la guía de contribución del proyecto.
  2. Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
  3. Haz un fork del repositorio y trabaja en una rama.
  4. Abre un pull request que haga referencia al número del issue.

Más de Vector35/binaryninja-api

Todos los issues de Vector35/binaryninja-api

Issues similares

Más issues de C++

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.