`picotool seal` corrupts ELF files built with IAR toolchain
Nobody has claimed this yet.
Assessment
- Difficulty
- 4/5
- Estimated time
- 1-2 days
- Newbie friendliness
- 55/100
Research direction
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.
Written by the indexing model from the issue text.
Description
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
- Dominant language
- C++
- Stars
- 1k
- Forks
- 199
- Avg merge
- 7d 18h
- Merged PRs (30d)
- 4
Getting set up
- No Dockerfile or Docker Compose file
- Has a pull request template
- No contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from raspberrypi/picotool
-
Difficulty 2/5 1-3 hours Newbie friendliness 66/100
raspberrypi/picotool#371 · 1 comment ·
-
seal: ECDSA signature r/s shorter than 32 bytes is written wrong (der_to_raw copies 32-len bytes), ~1 in 256 seals do not verifyPossibly taken @will-v-pi claimed this 69 days ago. Open
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
raspberrypi/picotool#365 · 1 comment ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
raspberrypi/picotool#347 ·
-
Add 'partition' options to 'save' and 'verify' commandsPossibly taken A pull request linked to this issue is open or already merged. Open
Difficulty 3/5 1-2 days Newbie friendliness 68/100
raspberrypi/picotool#348 ·
-
Difficulty 3/5 1-2 days Newbie friendliness 45/100
raspberrypi/picotool#330 · 1 comment ·
All issues in raspberrypi/picotool
Similar issues
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 77/100
distante/esphome-components#50 · 1 comment ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 74/100
-
feat
Difficulty 2/5 1-3 hours Newbie friendliness 65/100
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
-
Difficulty 1/5 Under an hour Newbie friendliness 76/100
Maintainers usually reply within 1 day