#1150752 aflplusplus: afl-cc mistakenly treats -fcf-protection as CFISAN request

Package:
aflplusplus
Source:
aflplusplus
Submitter:
Viktor Pashaiev
Date:
2026-10-13 09:19:03 UTC
Severity:
normal
Tags:
#1150752#5
Date:
2026-10-13 09:17:14 UTC
From:
To:
Dear Maintainer,

In src/afl-cc.c, the compiler flag -fcf-protection is parsed as:

  } else if (!strncmp(cur_argv, "-fcf-protection", strlen("-fcf-protection"))) {
    SCAN_KEEP(aflcc->have_cfisan, 1);

This incorrectly records -fcf-protection as a CFISAN request, which injects -flto in clang mode and disables PCGUARD instrumentation. As a result, compiling targets with -fcf-protection (and self-tests on systems where -fcf-protection is enabled by default) breaks.

Upstream already addressed this in commit a9e8587ee86c8ff20a14de6aea6ec07d7d3f699f:
https://github.com/AFLplusplus/AFLplusplus/commit/a9e8587ee86c8ff20a14de6aea6ec07d7d3f699f

The backported patch is attached.