Commit Graph

10 Commits

Author SHA1 Message Date
DavidKorczynski bc5ee4f128
clamav: rename git clone and get corpus in build script. CIFuzz-related (#6947) 2021-12-01 11:29:34 +00:00
DavidKorczynski 8d85237a84
clamav: update build to fix CIFuzz repo identification (#6943)
* clamav: update build to fix CIFuzz repo identification

* clamav: fix build
2021-11-30 23:03:10 +00:00
Micah Snyder c2abaa0bd3
[clamav] Fix build after libxml2 cmake change (#5820)
I updated ClamAV's Mussels recipe for libxml2 to the new 2.9.12 release
and to use CMake instead of the old build system. It seems the new CMake
build system installs the headers under <prefix>/include/libxml2 though.

This commit accounts for the header path change.
2021-05-24 09:39:04 +01:00
Micah Snyder 1aa590c4ff
[clamav] Switch from autotools to cmake (#5302)
For the CMake build, build all dependencies as static libraries first.
To automate this, the Dockerfile uses the Mussels tool.

The HAVE_MMAP variable is explicitly disabled so that malloc is used in
place of mmap, which will yield better fuzzing results.
2021-03-05 21:15:03 -08:00
Micah Snyder 7f9866ee90
[clamav] Add optional autogen.sh step; fix build (#4193)
ClamAV recently removed autotools generated materials (configure,
Makefile.in, etc) from the git repo. This commit adds tools and calls
necessary to generate those files if autogen.sh is present.
2020-07-26 18:40:34 -07:00
Micah Snyder 83ee390bc0
[clamav] Add flex, bison to Dockerfile (#3755)
Flex & Bison are needed to generate source files for yara syntax
support. While the generated source are currently in the clamav-devel
repo, the build system sometimes thinks the files must be regenerated.

In the future, these and the autotools generated files will be removed
from the clamav-devel repo and will need to be generated for every
build.

We're also planning to add CMake tooling (still a work in progress).

Once the generated files are removed, we'll either have ot build the
fuzz targets with CMake or bring in autoconf, automake, m4, libtool, and
pkg-config to generate the files in build.sh. At that time, we should
also update build.sh to build the dependencies statically, many of which
are missing at present meaning we're not getting great code coverage.
We'll also want to load a small signature set to improve code coverage
for the fuzz targets.
2020-05-03 14:28:30 -07:00
Micah Snyder 606824ae7c
[ClamAV] Disable mempool at compile time (#3304)
ClamAV's mempool feature uses mmap to improve performance for some
memory allocations. As currently implemented, on systems that support
mmap's MAP_ANONYMOUS flag, fmaps are backed by mmap'd memory.
Valgrind and ASan can't track mmap-backed memory, though, so it's more
difficult to track down fmap-related memory errors.

The changes in this commit to clamav's build script should disable mmap
usage, and hopefully allow oss-fuzz to catch more bugs.
2020-01-29 12:12:15 -08:00
Micah Snyder eeb5d8fa15 [ClamAV] Build script fix (#2105)
Correction to build.sh script so the script won't fail on clean checkout.
2019-01-23 14:04:47 -08:00
Micah Snyder 624693035b [ClamAV] Build script improvements (#2102)
Build script improvements to use the WORK dir, rather than polluting the SRC dir, and to use make in the clamav-devel/fuzz directory rather than building source files manually.
2019-01-23 09:26:18 -08:00
Micah Snyder 194c7de657 Added the clamav project. (#2047) 2018-12-21 11:19:14 -08:00