Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fuzz: fix cl_load fuzz target #401

Merged

Conversation

micahsnyder
Copy link
Contributor

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.

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.
@micahsnyder micahsnyder merged commit 0037f58 into Cisco-Talos:main Jan 18, 2022
@micahsnyder micahsnyder deleted the CLAM-1620-fix-cl_load-fuzz-target branch January 18, 2022 23:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants