aboutsummaryrefslogtreecommitdiffstats
path: root/tools/create-buildroot-image.sh
diff options
context:
space:
mode:
authorKuniyuki Iwashima <kuniyu@amazon.com>2022-09-06 16:34:28 +0000
committerDmitry Vyukov <dvyukov@google.com>2022-09-08 10:47:48 +0200
commitf30274687d34e8d50307008f4c9989eaef077696 (patch)
tree4f6feb9ae1c7ddf2ab9488db7232d4738d491c7f /tools/create-buildroot-image.sh
parent435aeef7d61a4cff6e6d918216b9124a6d44e061 (diff)
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 <kuniyu@amazon.com>
Diffstat (limited to 'tools/create-buildroot-image.sh')
-rwxr-xr-xtools/create-buildroot-image.sh1
1 files changed, 1 insertions, 0 deletions
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.