patchlwIP - A Lightweight TCP/IP stack - Patches: patch #10333, Several improvements to fuzzing...

 
 

You are not allowed to post comments on this tracker with your current authentication level.

patch #10333: Several improvements to fuzzing performance

Submitter:  J. Neuschäfer <jne>
Submitted:  Mon 10 Apr 2023 12:12:34 PM UTC
   
 
Category:  None Priority:  3 - Low
Status:  In Progress Privacy:  Public
Assigned to:  goldsimon Open/Closed:  Open
Planned Release:  None

Sun 14 May 2023 08:55:07 AM UTC, comment #4: 


> Shouldn't we rather disable ASAN for fuzzing instead of raising the limit?


That works too.

The sanitizers are currently enabled in Common.allports.mk, and I think they make sense for unit tests, so I guess this requires some restructuring of the makefiles.

J. Neuschäfer <jne>
Sat 13 May 2023 12:59:01 PM UTC, comment #3: 

So what's your proposed solution? Shouldn't we rather disable ASAN for fuzzing instead of raising the limit?

Simon Goldschmidt <goldsimon>
Group administrator
Fri 12 May 2023 07:18:30 PM UTC, comment #2: 


> 0003: gives me this when starting:
> [-] Whoops, the target binary crashed suddenly, before receiving any input
>     from the fuzzer! Since it seems to be built with ASAN and you have a
>     restrictive memory limit configured, this is expected; please read
>     /usr/share/doc/afl/notes_for_asan.md for help.


The issue here is described as in the error message: lwIP's fuzzing harness is compiled with ASAN, which means it needs a lot of virtual address space (terabytes on a 64-bit system), so it doesn't work under AFL's restrictive memory limit. The solution (or workaround) is to launch afl-fuzz with "-m none" (no memory limit) or a sufficiently large memory limit.

J. Neuschäfer <jne>
Thu 11 May 2023 08:09:40 PM UTC, comment #1: 

0001: pushed, thanks for the patch, I'm not sure when this got broken (as it did work for me in the past) but afl doesn't work without this for me now (haven't tried it in a while)

0002: ACK and pushed as well

0003: gives me this when starting:
[-] Whoops, the target binary crashed suddenly, before receiving any input
    from the fuzzer! Since it seems to be built with ASAN and you have a
    restrictive memory limit configured, this is expected; please read
    /usr/share/doc/afl/notes_for_asan.md for help.

[-] PROGRAM ABORT : Fork server crashed with signal 6
         Location : afl_fsrv_start(), src/afl-forkserver.c:847

0004: gives me this when compiling:
[-] Whoops, the target binary crashed suddenly, before receiving any input
    from the fuzzer! Since it seems to be built with ASAN and you have a
    restrictive memory limit configured, this is expected; please read
    /usr/share/doc/afl/notes_for_asan.md for help.

[-] PROGRAM ABORT : Fork server crashed with signal 6
         Location : afl_fsrv_start(), src/afl-forkserver.c:847

I'm running this on debian bullseye...

Simon Goldschmidt <goldsimon>
Group administrator
Mon 10 Apr 2023 12:12:34 PM UTC, original submission:  

Jonathan Neuschäfer (4):
      test/fuzz: Fix CC default value in makefile
      test/fuzz: Build with -O2 by default
      test/fuzz: Switch to afl-clang-fast by default
      test/fuzz: Use AFL's deferred forkserver mode, if available

J. Neuschäfer <jne>

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by goldsimon (Posted a comment)
  • -email is unavailable- added by jne (Submitted the item)
  •  

    There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

     

    Follow 6 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2023-05-11 goldsimon StatusNone In Progress
        Assigned toNone goldsimon
    2023-04-10 jne Attached File- Added 0001-test-fuzz-Fix-CC-default-value-in-makefile.patch, #54589
        Attached File- Added 0002-test-fuzz-Build-with-O2-by-default.patch, #54590
        Attached File- Added 0003-test-fuzz-Switch-to-afl-clang-fast-by-default.patch, #54591
        Attached File- Added 0004-test-fuzz-Use-AFL-s-deferred-forkserver-mode-if-avai.patch, #54592

    Back to the top

    Powered by Savane 3.13-02a9.
    Corresponding source code