Vector35 / Vector35/binaryninja-api

parsing result of `ELF section` is wrong.

Open
#4,112 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Component: BinaryViewType Effort: Trivial File Format: ELF Impact: Low
Dominant language
C++
Stars
1.3k
Forks
298
Avg merge
5d 5h
Merged PRs (30d)
19

Description

Version and Platform (required):

  • Binary Ninja Version: 3.4.4149-dev (c431b49b)
  • OS: Ubuntu Linux
  • OS Version: 22.04
  • CPU Architecture: x64

Bug Description:
When binary ninja parses the following ELF files, the address of the ELF sections are not correct.

ELF file with program header size 0 (e.g. kernel module) && ELF file with other sections defined above the .text entry in the section headers

Such a file can be created by building a simple kernel module in ubuntu 20.04.

Steps To Reproduce:
poc.zip
Screenshot from 2023-03-16 14-13-10

  1. Compile hello.c and generate hello.ko
  2. Analyze hello.ko
  3. See sections table

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the poc.zip attachment and reproduce the issue by compiling hello.c into hello.ko on Ubuntu, then inspect the sections table in Binary Ninja. Trace the ELF section parsing path to determine why section addresses are wrong for a zero program-header size and for sections above .text. Done means the reproduced ELF sections show correct addresses.

Written by the indexing model from the issue text.

Assessment

Tech stack
cpp
Domain
reverse-engineering
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
30/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.