NationalSecurityAgency / ghidra

Ghidra is a software reverse engineering (SRE) framework
https://www.nsa.gov/ghidra
Apache License 2.0
51.35k stars 5.85k forks source link

`bsim_ctl start` fails on Fedora 40 #7084

Open gemesa opened 1 day ago

gemesa commented 1 day ago

Describe the bug bsim_ctl start fails on Fedora 40. After some investigation I found that the issue arises from Fedora using a much newer OpenSSL version (3.2.2) compared to Ubuntu 22.04 (3.0.2). This newer version does not work well with PostgreSQL 15.3.

To Reproduce Steps to reproduce the behavior:

  1. Install Fedora (or any other distro with newer packages)
  2. Install Ghidra 11.2 from the releases or build master branch from source, then:
$ cd Ghidra/Features/BSim
$ ./make-postgres.sh
$ cd ../../../
$ ./support/bsim_ctl start ~/git-repos/bsim-db/            
openjdk version "21.0.4" 2024-07-16 LTS
OpenJDK Runtime Environment Temurin-21.0.4+7 (build 21.0.4+7-LTS)
OpenJDK 64-Bit Server VM Temurin-21.0.4+7 (build 21.0.4+7-LTS, mixed mode)
Server started
SSL error: Remote host terminated the handshake
Server shutdown complete

There is no useful information in the log file generated by pg_ctl.

Expected behavior

$ ./support/bsim_ctl start ~/git-repos/bsim-db/           
openjdk version "21.0.4" 2024-07-16 LTS
OpenJDK Runtime Environment Temurin-21.0.4+7 (build 21.0.4+7-LTS)
OpenJDK 64-Bit Server VM Temurin-21.0.4+7 (build 21.0.4+7-LTS, mixed mode)
Server started
BSim extension enabled

I have installed OpenSSL 3.0.2 from source (to /usr/local/ssl) and it fixed the problem:

$ LD_PRELOAD=/usr/local/ssl/lib64/libssl.so:/usr/local/ssl/lib64/libcrypto.so ./support/bsim_ctl start ~/git-repos/bsim-db/
openjdk version "21.0.4" 2024-07-16 LTS
OpenJDK Runtime Environment Temurin-21.0.4+7 (build 21.0.4+7-LTS)
OpenJDK 64-Bit Server VM Temurin-21.0.4+7 (build 21.0.4+7-LTS, mixed mode)
Server started
BSim extension enabled

Screenshots N/A

Attachments N/A

Environment (please complete the following information):

Additional context N/A

gemesa commented 1 day ago

This issue relates to #6115