`picotool seal` corrupts ELF files built with IAR toolchain

Aperta
#374 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
4/5
Tempo stimato
1-2 giorni
Idoneità per principianti
55/100
Tipo di issue
Bug
Chiarezza
Abbastanza chiara
Stato di attività
Attiva
Stack tecnologico
cpp
Ambito
cli

Direzione di ricerca

Start by locating the picotool seal implementation and how it reads and writes ELF program headers; compare that behavior with the before and after readelf -l output in the issue. Reproduce with an ELF built using the IAR toolchain and inspect the headers before and after sealing. Done when sealing preserves valid program headers for that input.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

Illustrated by running readelf -l on the input and output ELF files:

Before
Elf file type is EXEC (Executable file)
Entry point 0x20000181
There is 1 program header, starting at offset 1742692

Program Headers:
  Type           Offset   VirtAddr   PhysAddr   FileSiz MemSiz  Flg Align
  LOAD           0x000034 0x20000000 0x20000000 0x09040 0x0a584 RWE 0x8

 Section to Segment mapping:
  Segment Sections...
   00     P1 P1_2
After
Elf file type is EXEC (Executable file)
Entry point 0x20000181
There are 2 program headers, starting at offset 1742692

Program Headers:
  Type           Offset   VirtAddr   PhysAddr   FileSiz MemSiz  Flg Align
  <unknown>: 100 0x1f6a0004 0x8ffc0001 0x00002000 0x100000 0x1f800004   E 0x2000
  <unknown>: 100 0x1ff50004 0x8ffc0001 0x00002000 0x100000 0x4ccf0004     0x42000

 Section to Segment mapping:
  Segment Sections...
   00
   01
Lingua principale
C++
Stelle
1k
Fork
195
Merge medio
11g 5h
PR unite (30g)
4

Preparare l'ambiente

  • Nessun Dockerfile né file Docker Compose
  • Ha un modello di pull request
  • Nessuna guida per i contributori

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di raspberrypi/picotool

Tutte le issue di raspberrypi/picotool

Issue simili

Altre issue su C++

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.