Park, Geon/(방법) AFL (AFL++) 디버깅 - setaffinity 문제와 해결 (bind_to_free_cpu에서 에러)

Created Mon, 22 Sep 2025 12:00:00 +0900 Modified Mon, 22 Sep 2025 14:56:53 +0900
139 Words

문제 예시

> ./afl-fuzz (후략)
afl-fuzz 2.57b by <lcamtuf@google.com>
[+] You have 64 CPU cores and 2 runnable tasks (utilization: 3%).
[+] Try parallel jobs - see docs/parallel_fuzzing.txt.
[*] Checking CPU core loadout...
[+] Found a free CPU core, binding to #0.

[-]  SYSTEM ERROR : sched_setaffinity failed
    Stop location : bind_to_free_cpu(), afl-fuzz.c:1134
       OS message : Invalid argument

해결 이를 우회하기 위한 환경변수인 AFL_NO_AFFINITY를 설정한다.

AFL_NO_AFFINITY=1 ./afl-fuzz (후략)

이 때 예상 가능한 오류No instrumentation detected 등이 있다. => (방법) AFL - No instrumentation detected, 혹은 Fork server handshake fail