Skip to content

uefi-firmware fails on extraction #1530

@haeckle

Description

@haeckle

Component

Dasharo Tools Suite

Device

Dell OptiPlex 7010, Dell OptiPlex 9010

Dasharo version

No response

Dasharo Tools Suite version

v2.0.0-rc1 and newer

Test case ID

No response

Brief summary

As I'm working on #1283 (comment) I noticed that when I manually try to get the blobs based on the function blob_transmission() the step with uefi-firmware-parser always fails.

How reproducible

always

How to reproduce

  1. Get DTS version newer then v2.0.0-rc4 and start it. For example v2.0.0-rc5 used with QEMU:
bmaptool copy https://github.com/Dasharo/meta-dts/releases/download/v2.0.0-rc5/dts-base-image-v2.0.0-rc5.wic.gz dts-2-0-rc5.img
qemu-system-x86_64 -serial mon:stdio -global ICH9-LPC.disable_s3=1 -nographic -drive file=dts-2-0-rc7.img,if=ide,format=raw -device virtio-net,netdev=vmnic -netdev user,id=vmnic,hostfwd=tcp::5222-:22 -m 2G -smp 4 -M q35 -enable-kvm
  1. Enter the shell and manualy follow the steps to download and try to unpack the blobs:
wget --user-agent='Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1)' https://dl.dell.com/FOLDER05066036M/1/O7010A29.exe
binwalk --run-as=$(whoami) -e O7010A29.exe -C .
uefi-firmware-parser -e "_O7010A29.exe.extracted/65C10" -O

Note

binwalk also throws an error about missing extractors but that is uncritical as the main part get extracted correctly (I compared sha256 checksums with a successfully unpacked version)

The older 2.0.0-RCs seems to have a problem with binwalk, so the last working version is 1.2.23

Expected behavior

The UEFI firmware get extracted under _O7010A29.exe.extracted/65C10_output

Actual behavior

It fails with an error and nothing get unpacked:

Traceback (most recent call last):
File "/usr/bin/uefi-firmware-parser", line 196, in
_process_show_extract(firmware)
File "/usr/bin/uefi-firmware-parser", line 19, in _process_show_extract
parsed_object.showinfo('')
File "/usr/lib/python3.12/site-packages/uefi_firmware/init.py", line 130, in showinfo
self.objs[i].showinfo(ts, i)
File "/usr/lib/python3.12/site-packages/uefi_firmware/pfs.py", line 422, in showinfo
section.showinfo("%s " % ts)
File "/usr/lib/python3.12/site-packages/uefi_firmware/pfs.py", line 324, in showinfo
sub_object.showinfo("%s " % ts)
File "/usr/lib/python3.12/site-packages/uefi_firmware/base.py", line 198, in showinfo
self.object.showinfo(ts)
File "/usr/lib/python3.12/site-packages/uefi_firmware/me.py", line 675, in showinfo
partition.showinfo(" %s" % ts)
File "/usr/lib/python3.12/site-packages/uefi_firmware/me.py", line 625, in showinfo
purple(self.structure.Name.decode("utf-8")), purple(self.structure.Owner),
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
UnicodeDecodeError: 'utf-8' codec can't decode byte 0xe0 in position 0: invalid continuation byte

Screenshots

No response

Additional context

The OptiPlex documentation (which I currently overhaul) mention for uefi-firmware that version 1.9 is used. I installed this in Fedora 41 via pip and it actually also threws an error but successfully unpacks the needed files.

So I looked up what version got included in DTS and found that from Dasharo/meta-dts#158 (comment) it's always the latest.

Solutions you've tried

Using DTS version v1.2.23 (or older) works.

Also manually installing the tools under Fedora 41 everything is working as expected.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions