Alarm!, repro is not working, I'm blocked

 One of the initial tasks when you start working in the Linux Kernel as a newbie is fixing errors. To fix errors the way to go is pick an error from the syzkaller

 

I'll try to add here some tricks to help you work with less headaches based in my own headaches :

 

  1. The basic step to reproduce the error is run the repro C program that it's provided in the page of the selected error. The problem I had is after some successful tries to reproduce the error suddenly it didn't work anymore. I was able to run the program but it ends and with no error.
    1. What I've found is that the sandbox folder for the repro already exists and that caused the problem.
      1. The solution was as easy as to delete the syz-tmp folder in the image you're using to run your kernel and reproduce the error.

These two command in the host I use to run inside the qemu:

scp -i ~/LF/syz/syzkaller/trixie.id_rsa -P 10021 -o UserKnownHostsFile=/dev/null  -o StrictHostKeyChecking=no -o IdentitiesOnly=yes ./repro root@127.0.0.1:/root/
ssh -i ~/LF/syz/syzkaller/trixie.id_rsa -p 10021 -o UserKnownHostsFile=/dev/null  -o StrictHostKeyChecking=no -o IdentitiesOnly=yes root@127.0.0.1 'chmod +x ./repro && ./repro'
 

 The output you expect is:



executing program                               
executing program                         
executing program                                                                                                     
executing program       
executing program
executing program                                                                                                     
executing program
executing program
executing program                              
executing program                          
executing program                              
executing program                            
executing program                             


 

 But in case of and already existing syz-tmp you'll just see the program exit (and some debug from the scp,etc commands but nothing from the repro )



Warning: Permanently added '[127.0.0.1]:10021' (ED25519) to the list of known hosts.
repro.c                                                                                                                                                                                                   100%   43KB   4.2MB/s   00:00    
Warning: Permanently added '[127.0.0.1]:10021' (ED25519) to the list of known hosts.
repro                                                                                                                                                                                                     100%   43KB   3.7MB/s   00:00    
Warning: Permanently added '[127.0.0.1]:10021' (ED25519) to the list of known hosts.
bash: warning: setlocale: LC_ALL: cannot change locale (en_US.UTF-8): No such file or directory
 
 
So I just login the qmeu vm and delete the folder and continue to debug/fix the issue 
syzkaller login: root
Linux syzkaller 6.13.0-rc7-00039-gc3812b15000c-dirty #10 SMP PREEMPT_DYNAMIC Sat Sep 20 22:15:26 CEST 2025 x86_64

The programs included with the Debian GNU/Linux system are free software;
the exact distribution terms for each program are described in the
individual files in /usr/share/doc/*/copyright.

Debian GNU/Linux comes with ABSOLUTELY NO WARRANTY, to the extent
permitted by applicable law.
root@syzkaller:~# pwd
/root
root@syzkaller:~# ls
repro  repro.c  syz-tmp
root@syzkaller:~# rm -rf syz-tmp/
 

 

 

About my basic setup I used: 

I run the kernel I compile with the .config downloaded from syzkaller with this command

 

qemu-system-x86_64 \
-m 2G \
-smp 2 \
-kernel "~/LF/linux_work/linux_mainline/arch/x86/boot/bzImage" \
-append "root=/dev/sda console=ttyS0 earlyprintk=serial net.ifnames=0" \
-drive file="~/LF/syz/syzkaller/trixie.img",format=raw \
-net user,host=10.0.2.10,hostfwd=tcp::10021-:22 \
-net nic,model=e1000 \
-enable-kvm \
-nographic \
-s   
 

So the trixie.img is not the one you download from syzkaller with the kernel included as you need to compile you own kernel (and add your path to the bzImage) with the fixed you develop. A better explanation of how to download and create the image with the create-image.sh script that also will create the public/private keys needed to login in the qemu vm.

Comments

Popular posts from this blog

I need a i386 kernel.

End of the Mentorship start of new journey

My kernel is building ... after 1h `make` exits with no error