Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

syz-fuzzer: add NULL check in supported features #4763

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Commits on May 4, 2024

  1. syz-fuzzer: add NULL check in supported features

    Kernel supported features are detected using debugfs.
    However, if the filesystem is not mounted, `syz-fuzzer` panics without
    providing any clues as to why.
    
    ```
    2024/05/04 10:12:49 connecting to manager...
    2024/05/04 10:12:49 fuzzer vm-1 connected
    2024/05/04 10:12:49 checking machine...
    panic: runtime error: invalid memory address or nil pointer dereference
    [signal SIGSEGV: segmentation violation code=0x1 addr=0x0 pc=0x6019a8]
    
    goroutine 1 [running]:
    main.main()
            /home/alessandro/go/src/syzkaller/syz-fuzzer/fuzzer.go:169 +0x958
    debug1: client_input_channel_req: channel 0 rtype exit-status reply 0
    debug1: channel 0: free: client-session, nchannels 2
    debug1: channel 1: free: 127.0.0.1, nchannels 1
    Transferred: sent 5180, received 6532 bytes, in 2.5 seconds
    Bytes per second: sent 2097.7, received 2645.2
    debug1: Exit status 2
    ```
    
    This simple patch prevents `syz-fuzzer` from crashing and allows it to
    terminate cleanly, while provides a possible cause why this issue is
    occurring.
    
    ```
    2024/05/04 10:15:14 connecting to manager...
    2024/05/04 10:15:14 fuzzer vm-1 connected
    2024/05/04 10:15:14 checking machine...
    2024/05/04 10:15:14 SYZFATAL: The currently running kernel image seems not to support any required feature, have you forgotten to mount debugfs?
    debug1: client_input_channel_req: channel 0 rtype exit-status reply 0
    debug1: channel 0: free: client-session, nchannels 2
    debug1: channel 1: free: 127.0.0.1, nchannels 1
    Transferred: sent 5160, received 5016 bytes, in 2.4 seconds
    Bytes per second: sent 2106.7, received 2047.9
    debug1: Exit status 1
    ```
    
    Signed-off-by: Alessandro Carminati <[email protected]>
    alessandrocarminati committed May 4, 2024
    Configuration menu
    Copy the full SHA
    da91492 View commit details
    Browse the repository at this point in the history

Commits on May 8, 2024

  1. Configuration menu
    Copy the full SHA
    0aa64a3 View commit details
    Browse the repository at this point in the history