[Spice-devel] spicy gets stuck (with SASL and wrong password)

Yaniv Kaul ykaul at redhat.com
Sun Nov 6 04:24:42 PST 2011


Hi,

I'm trying to run the following:
qemu (latest git, with spice from latest git):
./x86_64-softmmu/qemu-system-x86_64 -spice 
port=6901,disable-ticketing,sasl -k en-us -name XP -boot c -soundhw 
pcspk -m 1024 -cpu core2duo,+x2apic -smp 2 -balloon none -bios 
/usr/share/seabios/bios.bin -monitor stdio --parallel none -vga qxl

spicy is run, trying to connect to localhost:6901. I have no idea what 
password it is asking from me, so anyway the password is wrong. The 
result is that spicy seems to get stuck.
qemu stdio:

do_spice_init: starting 0.9.1
spice_server_add_interface: SPICE_INTERFACE_KEYBOARD
spice_server_add_interface: SPICE_INTERFACE_MOUSE
spice_server_add_interface: SPICE_INTERFACE_QXL
red_worker_main: begin
ensure_display_channel_created: create display channel
ensure_cursor_channel_created: create cursor channel
spice_server_add_interface: SPICE_INTERFACE_PLAYBACK
QEMU 0.15.50 monitor - type 'help' for more information
(qemu) reds_handle_auth_mechanism: Auth method: 2
reds_handle_auth_mechanism: Starting SASL
reds_start_auth_sasl: Available mechanisms for client: 'DIGEST-MD5'
reds_start_auth_sasl: Wait for client mechname length
reds_handle_auth_mechlen: Wait for client mechname
reds_handle_auth_mechname: Got client mechname 'DIGEST-MD5' check 
against 'DIGEST-MD5'
reds_handle_auth_mechname: Validated mechname 'DIGEST-MD5'
reds_handle_auth_startlen: Got client start len 0
reds_handle_auth_sasl_start: Start SASL auth with mechanism DIGEST-MD5. 
Data (nil) (0 bytes)
reds_handle_auth_sasl_start: SASL return data 167 bytes, 0x2400c20
reds_handle_auth_sasl_start: Authentication must continue (start)
reds_handle_auth_mechanism: Auth method: 2
reds_handle_auth_mechanism: Starting SASL
reds_start_auth_sasl: Available mechanisms for client: 'DIGEST-MD5'
reds_start_auth_sasl: Wait for client mechname length
reds_handle_auth_mechlen: Wait for client mechname
reds_handle_auth_mechname: Got client mechname 'DIGEST-MD5' check 
against 'DIGEST-MD5'
reds_handle_auth_mechname: Validated mechname 'DIGEST-MD5'
reds_handle_auth_startlen: Got client start len 0
reds_handle_auth_sasl_start: Start SASL auth with mechanism DIGEST-MD5. 
Data (nil) (0 bytes)
reds_handle_auth_sasl_start: SASL return data 167 bytes, 0x23ff9c0
reds_handle_auth_sasl_start: Authentication must continue (start)
reds_handle_auth_sasl_steplen: Got steplen 275
reds_handle_auth_sasl_step: Step using SASL Data 0x24007d0 (274 bytes)
reds_handle_auth_sasl_step: sasl step failed -20 (SASL(-13): user not 
found: no secret in database)


spicy (with --spice-debug, just relevant data):
(lt-spicy:19854): GSpice-DEBUG: spice-channel.c:1118 Client initialize 
SASL authentication 0
(lt-spicy:19854): GSpice-DEBUG: spice-channel.c:1148 Client SASL new 
host:'localhost' local:'127.0.0.1;58244' remote:'127.0.0.1;6901'
(lt-spicy:19854): GSpice-DEBUG: spice-channel.c:1215 Client start 
negotiation mechlist 'DIGEST-MD5'
(lt-spicy:19854): GSpice-DEBUG: spice-channel.c:1240 Server start 
negotiation with mech DIGEST-MD5. Data 0 bytes (nil) '(null)'
(lt-spicy:19854): GSpice-DEBUG: spice-channel.c:1266 Getting sever start 
negotiation reply
(lt-spicy:19854): GSpice-DEBUG: spice-channel.c:1291 Client start result 
complete: 0. Data 167 bytes 0xf25e90 
'nonce="Q0M2g53D4eAeUq+4Dgz2U89KEi7PPO5Nx6FEAJeFZxA=",realm="ykaul.tlv.redhat.com",qop="auth-conf",cipher="rc4-56,rc4,3des",maxbuf=8192,charset=utf-8,algorithm=md5-sess'
(lt-spicy:19854): GSpice-DEBUG: spice-channel.c:1044 Filled SASL interact
(lt-spicy:19854): GSpice-DEBUG: spice-channel.c:1325 Client step result 
1. Data 274 bytes 0xfa6cd0 
'username="ykaul",realm="ykaul.tlv.redhat.com",nonce="Q0M2g53D4eAeUq+4Dgz2U89KEi7PPO5Nx6FEAJeFZxA=",cnonce="neIJ96okvwMIvKSzfR1bUWR/odlI17QJxX03QgtMI44=",nc=00000001,qop=auth-conf,cipher=rc4,maxbuf=100000,digest-uri="spice/localhost",response=28918a1cee0d0be7f9ecd091981eddda'
(lt-spicy:19854): GSpice-DEBUG: spice-channel.c:1346 Server step with 
274 bytes 0xfa6cd0
(lt-spicy:19854): GSpice-DEBUG: spice-channel.c:717 Closing the 
connection: spice_channel_read() - ret=0
(lt-spicy:19854): GSpice-DEBUG: spice-channel.c:1842 channel has error, 
breaking loop
(lt-spicy:19854): GSpice-DEBUG: spice-channel.c:2024 Coroutine exit main-1:0
(lt-spicy:19854): GSpice-DEBUG: spice-channel.c:1882 Delayed unref 
channel main-1:0 0x1045a60

And then the spicy UI is gone, though it's still alive. Seems like the 
following fixes this (on the spice server), but I'm not sure what it 
might affect other than that:


diff --git a/server/reds.c b/server/reds.c
index acd8495..ce48ac5 100644
--- a/server/reds.c
+++ b/server/reds.c
@@ -2105,7 +2105,7 @@ static void reds_handle_auth_sasl_step(void *opaque)
          err != SASL_CONTINUE) {
          red_printf("sasl step failed %d (%s)",
                     err, sasl_errdetail(sasl->conn));
-        goto authabort;
+        goto authreject;
      }

      if (serveroutlen > SASL_DATA_MAX_LEN) {


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/spice-devel/attachments/20111106/bffada35/attachment.html>


More information about the Spice-devel mailing list