redballoonsecurity / ofrak

OFRAK: unpack, modify, and repack binaries.
https://ofrak.com
Other
1.82k stars 128 forks source link

Switch from Debian 11 to Debian 12 #467

Open ANogin opened 1 month ago

ANogin commented 1 month ago

One sentence summary of this PR (This should go in the CHANGELOG!) Changes the docker configuration to use Debian 12 Bookworm rather then Debian 11 Bullseye.

Link to Related Issue(s) N/A

Please describe the changes in your request. Changes the docker configuration to use Debian 12 Bookworm rather then Debian 11 Bullseye. This requires switching gcc-10 to gcc-12 for gcc installed from apt, and openjdk from 11 to 17.

Anyone you think should look at this, specifically? @whyitfor

ANogin commented 1 month ago

All tests pass, except for one - test_ofrak/components/test_elf_load_aligment_modifier.py::TestElfModifiers::test_elf_load_alignment_free_space_modifier[libc.so.6@debian-bullseye (with SCOP) ET_DYN Library] which fails with when

LD_PRELOAD=/tmp/ofrak_elf_modifier_out_vflqboxe/libc_elf_dyn_lib_aligned_free /ofrak_core/test_ofrak/components/assets/elf/echo_elf_dyn 'Hello world, echo!'

fails with

Inconsistency detected by ld.so: dl-call-libc-early-init.c: 37: _dl_call_libc_early_init: Assertion `sym != NULL' failed!

that I am not sure what to do about...

whyitfor commented 1 month ago

What prompted this change?

ANogin commented 1 month ago

@whyitfor binary ninja no longer installs correctly in the Debian 11 default configuration :(

OSError: /usr/lib/x86_64-linux-gnu/libstdc++.so.6: version `GLIBCXX_3.4.30' not found (required by /opt/rbs/binaryninja/python/binaryninja/../../libbinaryninjacore.so.1)

I am guessing they updated their build setup for a newer version of Linux?

whyitfor commented 1 month ago

@whyitfor binary ninja no longer installs correctly in the Debian 11 default configuration :(

OSError: /usr/lib/x86_64-linux-gnu/libstdc++.so.6: version `GLIBCXX_3.4.30' not found (required by /opt/rbs/binaryninja/python/binaryninja/../../libbinaryninjacore.so.1)

I am guessing they updated their build setup for a newer version of Linux?

Seems like it... https://github.com/mandiant/capa/issues/2098

rbs-jacob commented 1 week ago

Dan got the tests passing in the following branch. I have not yet reviewed the changes.

https://github.com/redballoonsecurity/ofrak/compare/master...Ivanov1ch:ofrak:feature/debian12