0.11.1 ABI regression: qemu fails to access disk images via ssh://
Hello!
Sven Geuer recently reported https://bugs.debian.org/1085629 after Debian updated libssh from 0.10.6 to 0.11.1. This didn't bump the SONAME (still libssh.so.4 as before), but apparently introduces some binary incompatibility.
Reproducer, tested on current Debian testing:
- Install
qemu-system-x86_64and QEMU's ssh driver (in Debian that's in packageqemu-block-extra) - Set up key authentication to localhost, i.e.
ssh localhostshould work without password qemu-img create -f qcow2 /tmp/test.qcow2 1Gqemu-system-x86_64 -drive file=ssh://localhost/tmp/test.qcow2
This works fine with 0.10.6 (the version qemu was built against), but with 0.11.1 it fails:
qemu-system-x86_64: -drive file=ssh://localhost/tmp/test.qcow2: Could not read image for determining its format: Input/output error
I unfortunately don't know how to get more verbose logs here. Is there some $LIBSSH_DEBUG env or similar? strings only found SSH_MSG_DEBUG but that doesn't do anything (tried to set it to "1" or "9999")
The Debian bug report includes an abi-compliance-checker report which says that a couple of fields got added to struct ssh_callbacks_struct and ssh_channel_callbacks_struct. As these are compile-time header file definitions, a program built against 0.10.6 won't initialize these, so they may contain arbitrary junk. So libssh functions which already existed in 0.10.6 must not access them, only new functions introduced into 0.11. Perhaps that's what happened?