Skip to content

fuzzing: Fix crypt2_load_fuzz to not touch const data

Milan Broz requested to merge fuzzer-const into main

The crypt2_load_fuzz fuzzer needs to calculate LUKS2 header checksum to speed up fuzzing. Currently we incorrectly touch const data input.

This patch

  • calculates only primary LUKS2 header checksum (ignores secondary header)
  • uses temporary struct for modified data
  • keps fuzzer going even with original data if checksum calc fails.

Hopefully solves unknown write issue in fuzzer (not real utils) on oss-fuzz.

Merge request reports