Ticket #8206 (closed patch: fixed)

Opened 20 months ago

Last modified 20 months ago

digest-md5 SASL challenges ending with a quoted value are parsed incorrectly (with cyrus-sasl disabled)

Reported by: yann Owned by: deryni
Milestone: 2.5.5 Component: XMPP
Version: 2.5.4 Keywords: sasl digest-md5 challenge quote
Cc:

Description

In the case where parse_challenge is at the last token of a challenge and this token has a quoted value, then it needs to rewind one character when cur is positioned at the terminal NULL.

This fixes an issue where libpurple would parse a realm value (for instance) as 'myrealm"' instead of 'myrealm' resulting in chaos and failure of the SASL negotiation.

I've seen this behaviour with Adium from subversion built with the latest tarball of libpurple. Applying this patch cures the problem (for libpurple without cyrus-sasl. It looks like stable binaries are built without, but cyrus-sasl is enabled in 1.4svn)

exemple of challenge:

algorithm=md5-sess,charset=utf-8,cipher="rc4,3des,des,rc4-56,rc4-40",maxbuf=16777215,nonce="e6439a7176aada7255ef04569a664583",qop="auth,auth-conf,auth-int",realm="dev.local"

and bogus response from libpurple:

username="partya",realm="dev.local"",nonce="e6439a7176aada7255ef04569a664583",cnonce="3d19d459123251610177a3ccfe",nc=00000001,qop=auth,digest-uri="xmpp/dev.local"",response=e8061ff7a5342aad60223db62b6f70e7,charset=utf-8

Thanks,

Yann Kerherve

Attachments

libpurple_challenge2.patch (0.5 kB) - added by yann 20 months ago.

Change History

Changed 20 months ago by yann

Changed 20 months ago by darkrain42

  • owner set to deryni
  • type changed from defect to patch
  • component changed from libpurple to XMPP

This patch depends on the one in #8207; I believe both are correct.

Changed 20 months ago by datallah

  • status changed from new to closed
  • resolution set to fixed
  • milestone set to 2.5.5

This was committed in revision [8b089c2f6fe2d4dd78d481892094de09dc76c1ec]. Thanks.

Changed 20 months ago by datallah@…

(In [f91e508404eacd7f37a7fa35f8bb6be7aec3b68d]):
Attribute Yann Kerherve for the XMPP SASL parser changes. Refs #8206, #8207.

Note: See TracTickets for help on using tickets.
All information, including names and email addresses, entered onto this website or sent to mailing lists affiliated with this website will be public. Do not post confidential information, especially passwords!