Commit graph

13 commits

Author SHA1 Message Date
John Humlick
f0289f0b90
libclamav: Fix compiler error on some Apple systems.
clamav_dbload_fuzzer.cpp and clamav_scanfile_fuzzer.cpp use __pid_t, which some
Apple systems do not define, and this causes a compilation error. This change
defines __pid_t as pid_t, which does exist on those systems and allows clamav
to build.
2025-05-30 12:41:45 -07:00
Val Snyder
7ff29b8c37
Bump copyright dates for 2025 2025-02-14 10:24:30 -05:00
Micah Snyder
9cb28e51e6 Bump copyright dates for 2024 2024-01-22 11:27:17 -05:00
Micah Snyder
6eebecc303 Bump copyright for 2023 2023-02-12 11:20:22 -08:00
Micah Snyder
2d99b49797 fuzz: stability of parallel fuzz testing
The fuzz targets that write a temp file currently use the same filename
every time. One of the users identified that if the tests are running
in parallel mode, many processes are accessing the same file.
This results in unstable input to the API being tested, where the file
may be overwritten as the function is being tested.

This commit fixes it by putting the fuzz process PID in the filenames
for the scanfile and dbload fuzz targets.

Resolves: https://github.com/Cisco-Talos/clamav/issues/432

Also fixed a CMake bug that built an extra fuzz target file that doesn't
serve any purpose.

Resolves: https://github.com/Cisco-Talos/clamav/issues/431
2022-03-30 13:17:02 -07:00
micasnyd
0037f5825b fuzz: fix cl_load fuzz target
I found two issues with the cl_load fuzz targets, one of which impacts
the scanfile and scanmap fuzz targets:

1. We were defining the preprocessor definitions incorrectly using
  "SCAN_TARGETS" instead of "TARGET" in unit_tests/CMakeLists.txt.
  For the scan fuzz targets this meant it wasn't properly defining
  unique settings for each compiled target.
  For the cl_load fuzz target it's worse, it wasn't setting the
  database file name correctly which means it rejected the filenames
  entirely for not having a legitimate suffix.

2. We were pre-compiling the engine before loading signatures.
  You can't load sigs for an engine that's already compiled, so this
  would also fail right away without trying to load any sigs.
2022-01-18 16:09:44 -07:00
micasnyd
140c88aa4e Bump copyright for 2022
Includes minor format corrections.
2022-01-09 14:23:25 -07:00
Andrew
5553a5e206 Minor fuzz testbench improvements 2021-03-20 09:20:52 -04:00
Micah Snyder (micasnyd)
b9ca6ea103 Update copyright dates for 2021
Also fixes up clang-format.
2021-03-19 15:12:26 -07:00
Micah Snyder
206dbaefe8 Update copyright dates for 2020 2020-01-03 15:44:07 -05:00
Micah Snyder
52cddcbcfd Updating and cleaning up copyright notices. 2019-10-02 16:08:18 -04:00
Micah Snyder
35f04d064c Improvements to the fuzz Makefile settings. 2019-10-02 16:08:17 -04:00
Micah Snyder (micasnyd)
ce6402f7fe Added oss-fuzz integration. 2019-10-02 16:08:17 -04:00