VirusTotal / yara

The pattern matching swiss knife
https://virustotal.github.io/yara/
BSD 3-Clause "New" or "Revised" License
7.93k stars 1.42k forks source link

Test failure on OpenBSD - tests/test-pe.c:390: rule does not match contents #2085

Open lcheylus opened 1 month ago

lcheylus commented 1 month ago

Bug

Expected behavior All tests should pass.

Please complete the following information:

plusvic commented 2 weeks ago

This looks like a difference between openssl and libressl. I don't have an installation with libressl around, could you try to comment out lines in the test below until you get a more minimalistic test that reproduces the issue?

https://github.com/VirusTotal/yara/blob/8616165472424d9949c434a5da26858e7880affb/tests/test-pe.c#L294-L388

lcheylus commented 2 weeks ago

After a lot of iterations (modify test-pe in tests/test-pe.c, rebuild and test with make check), I have 2 cases of minimalist test that reproduces the issue:

After some searchs in issues, mine seems to be a duplicate of #2046.

lcheylus commented 2 weeks ago

I would like to try to build Yara on OpenBSD using OpenSSL lib instead of LibreSSL.

I don't find in configure script how to use OpenSSL instead of LibreSSL. Is there an options/flag in configure script to do this ? I checked configure.ac file for AC_CHECK_HEADERS / AC_CHECK_LIB for openssl/crypto but I don't find how to modify theses checks.

lcheylus commented 2 days ago

FYI, I succeeded to compile and test Yara with OpenSSL instead of LibreSSL on OpenBSD (amd64).