From f30274687d34e8d50307008f4c9989eaef077696 Mon Sep 17 00:00:00 2001 From: Kuniyuki Iwashima Date: Tue, 6 Sep 2022 16:34:28 +0000 Subject: tools/create-buildroot-image.sh: configure sftp subsystem create-buildroot-image.sh creates a minimal sshd_config, which does not configure sftp. Thus, if the initial scp to setup syz-fuzzer uses sftp, it fails with the error below, and syz-manager never starts fuzzing. 2022/09/06 16:03:44 failed to copy binary: failed to run ["scp" "-P" "14125" ... "/home/ec2-user/syzkaller/bin/linux_amd64/syz-fuzzer" "root@localhost:/syz-fuzzer"]: exit status 255 Warning: Permanently added '[localhost]:14125' (ED25519) to the list of known hosts. subsystem request failed on channel 0 Connection closed We can see sftp throws the same sequences by manually running scp in verbose mode. $ scp -v -P 14125 /home/ec2-user/syzkaller/bin/linux_amd64/syz-fuzzer root@localhost:/syz-fuzzer Executing: program /usr/bin/ssh host localhost, user root, command sftp ... debug1: Connecting to localhost [localhost] port 14125. debug1: Connection established. ... debug1: Sending subsystem: sftp subsystem request failed on channel 0 Connection closed Signed-off-by: Kuniyuki Iwashima --- tools/create-buildroot-image.sh | 1 + 1 file changed, 1 insertion(+) (limited to 'tools/create-buildroot-image.sh') diff --git a/tools/create-buildroot-image.sh b/tools/create-buildroot-image.sh index c2c4aa245..1de0a66a8 100755 --- a/tools/create-buildroot-image.sh +++ b/tools/create-buildroot-image.sh @@ -180,6 +180,7 @@ PermitRootLogin yes PasswordAuthentication yes PermitEmptyPasswords yes ClientAliveInterval 420 +Subsystem sftp /usr/libexec/sftp-server EOF # Generate sshd host keys. -- cgit mrf-deployment