Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

dissection.rb fails on ilo5_135.bin #8

Closed
saidelike opened this issue Dec 5, 2018 · 3 comments
Closed

dissection.rb fails on ilo5_135.bin #8

saidelike opened this issue Dec 5, 2018 · 3 comments
Labels
bug Something isn't working

Comments

@saidelike
Copy link
Contributor

The dissection.rb script does not work on ilo5_135.bin. At that time it is unclear if it is a quirk of this version or a problem with the script itself. From the output below it looks like it is not able to locate the first module name and also the type, offset and size fields seem wrong:

ilo4_toolbox/scripts/iLO5$ ruby dissection.rb ilo5_135.bin_outdir/elf_main.bin
ruby: warning: shebang line ending with \r may cause problems
> extract from ilo5_135.bin_outdir/elf_main.bin
--
  >                              - type 1946157056 - offset 0x00000000 - size 0x00000000 bytes
Traceback (most recent call last):
	4: from dissection.rb:346:in `<main>'
	3: from dissection.rb:324:in `extract_mods'
	2: from dissection.rb:324:in `each'
	1: from dissection.rb:335:in `block in extract_mods'
dissection.rb:335:in `join': no implicit conversion of nil into String (TypeError)

A working case with another firmware version e.g. on ilo5_130.bin is:

ilo4_toolbox/scripts/iLO5$ ruby dissection.rb ilo5_130.bin_outdir/elf_main.bin
ruby: warning: shebang line ending with \r may cause problems
> extract from ilo5_130.bin_outdir/elf_main.bin
--
  >               .dvrspi.elf.RO - type PROGBITS - offset 0x00007574 - size 0x00003f58 bytes
  >               .dvrspi.elf.RW - type PROGBITS - offset 0x0000b4cc - size 0x00000694 bytes
  >          .libINTEGRITY.so.RO - type PROGBITS - offset 0x0000bb60 - size 0x000048c0 bytes
  >          .libINTEGRITY.so.RW - type PROGBITS - offset 0x00010420 - size 0x00000018 bytes
  >                  .libc.so.RW - type PROGBITS - offset 0x00010438 - size 0x000009c0 bytes
  >        .VComCShared_RM.so.RW - type PROGBITS - offset 0x00010df8 - size 0x00000070 bytes
  >              .dvrgpio.elf.RW - type PROGBITS - offset 0x00010e68 - size 0x0000109c bytes
  >                  .libc.so.RO - type PROGBITS - offset 0x00011f04 - size 0x00035ff8 bytes
  >        .VComCShared_RM.so.RO - type PROGBITS - offset 0x00047efc - size 0x00008a90 bytes
  >              .dvrgpio.elf.RO - type PROGBITS - offset 0x0005098c - size 0x00008738 bytes
...
@alexgzt
Copy link
Contributor

alexgzt commented Dec 10, 2018

Hi Cédric,

We've reproduced the issue. Actually the root cause does not come from dissection.rb script. Instead, it is an illustration of the decompression issue we discovered while researching the secure boot feature.

We didn't take the time yet to fix our decompression code from the iLO5lib.py. Instead you can use the C source we've developped (quick and dirty re-implementation) to decompress properly the userland image and then use dissection.rb as you would have.

Please see commmit 092c1d2

@alexgzt alexgzt closed this as completed Dec 10, 2018
@alexgzt
Copy link
Contributor

alexgzt commented Dec 13, 2018

See commit 64c9715 for a proper fix of Python scripts.

@alexgzt alexgzt added the bug Something isn't working label Dec 13, 2018
@saidelike
Copy link
Contributor Author

Thanks. It does fix the problem.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants