Package: aflplusplus
Version: 5.02c-0.5
Severity: normal
Tags: patch upstream
User: [email protected]
Usertags: origin-ubuntu stonking
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.
Description: afl-cc: do not treat -fcf-protection as CFISAN request
Recording -fcf-protection as have_cfisan injected -flto in clang mode,
disabling PCGUARD instrumentation and causing the LLVM self-test to fail.
Track -fcf-protection in have_fcf instead.
Author: Eduard Orehov <[email protected]>
Origin: backport, https://github.com/AFLplusplus/AFLplusplus/commit/a9e8587ee86c8ff20a14de6aea6ec07d7d3f699f
Bug-Ubuntu: https://bugs.launchpad.net/ubuntu/+source/aflplusplus/+bug/2170639
Last-Update: 2026-10-13
--- a/src/afl-cc.c
+++ b/src/afl-cc.c
@@ -2883,7 +2883,7 @@
} else if (!strncmp(cur_argv, "-fcf-protection", strlen("-fcf-protection"))) {
- SCAN_KEEP(aflcc->have_cfisan, 1);
+ SCAN_KEEP(aflcc->have_fcf, 1);
} else if (!strncmp(cur_argv, "-O", 2)) {