Skip to content

fuzz: fix cl_load fuzz target#401

Merged
val-ms merged 1 commit into
Cisco-Talos:mainfrom
val-ms:CLAM-1620-fix-cl_load-fuzz-target
Jan 18, 2022
Merged

fuzz: fix cl_load fuzz target#401
val-ms merged 1 commit into
Cisco-Talos:mainfrom
val-ms:CLAM-1620-fix-cl_load-fuzz-target

Conversation

@val-ms

@val-ms val-ms commented Dec 16, 2021

Copy link
Copy Markdown
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.
@val-ms val-ms requested a review from ragusaa January 15, 2022 23:41
@val-ms val-ms merged commit 0037f58 into Cisco-Talos:main Jan 18, 2022
@val-ms val-ms 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