telepathy-butterfly crashed with TypeError in b64decode()

Bug #401028 reported by Alan Pope 🍺🐧🐱 🦄
This bug affects 450 people
Affects Status Importance Assigned to Milestone
pymsn
Fix Released
Medium
papyon (Ubuntu)
Fix Released
Low
Unassigned
Nominated for Lucid by Petr Tomeš
Karmic
Won't Fix
Medium
Unassigned
pymsn (Ubuntu)
Invalid
Medium
raphael
Nominated for Lucid by Petr Tomeš
Karmic
Invalid
Undecided
Unassigned

Bug Description

Binary package hint: telepathy-butterfly

Started Empathy, it connected to all my networks, then I got the crash message many times. Up to date karmic.

ProblemType: Crash
Architecture: i386 and AMD64
Date: Sat Jul 18 10:58:39 2009
DistroRelease: Ubuntu 9.10
ExecutablePath: /usr/lib/telepathy/telepathy-butterfly
InterpreterPath: /usr/bin/python2.6
Package: telepathy-butterfly 0.3.4-1
Package Architecture: all
ProcCmdline: /usr/bin/python /usr/lib/telepathy/telepathy-butterfly
ProcEnviron:
 SHELL=/bin/bash
 PATH=(custom, user)
 LANG=en_GB.UTF-8
ProcVersionSignature: Ubuntu 2.6.31-3.19-generic
PythonArgs: ['/usr/lib/telepathy/telepathy-butterfly']
SourcePackage: telepathy-butterfly
Title: telepathy-butterfly crashed with TypeError in b64decode()
Uname: Linux 2.6.31-3-generic i686
UserGroups: adm admin audio cdrom dialout dip fax fuse lpadmin netdev plugdev sambashare tape vboxusers video

Revision history for this message
Alan Pope 🍺🐧🐱 🦄 (popey) wrote :
tags: removed: need-duplicate-check
visibility: private → public
affects: telepathy-butterfly (Ubuntu) → pymsn (Ubuntu)
Revision history for this message
In , Cristian Aravena Romero (caravena) wrote :

Open Bug in LP:
https://bugs.edge.launchpad.net/ubuntu/+source/pymsn/+bug/401028

"Started Empathy, it connected to all my networks, then I got the crash message. Up to date karmic."

Revision history for this message
In , Cristian Aravena Romero (caravena) wrote :

Traceback (most recent call last):
  File "/usr/lib/python2.6/dist-packages/pymsn/msnp/base.py", line 106, in _dispatch_command
    handler(command)
  File "/usr/lib/python2.6/dist-packages/pymsn/msnp/notification.py", line 347, in _handle_ILN
    self._handle_NLN(command)
  File "/usr/lib/python2.6/dist-packages/pymsn/msnp/notification.py", line 386, in _handle_NLN
    urllib.unquote(command.arguments[5]))
  File "/usr/lib/python2.6/dist-packages/pymsn/p2p.py", line 160, in parse
    shac = base64.b64decode(shac)
  File "/usr/lib/python2.6/base64.py", line 76, in b64decode
    raise TypeError(msg)
TypeError: Incorrect padding

Changed in pymsn:
status: Unknown → Confirmed
Revision history for this message
Elliott Hird (penguinofthegods) wrote :

This would make the final version of Karmic unusable for me if it stays like this. I have no idea what on earth happens after the crash, as Empathy's contact list will still display. It's very confusing not knowing whether you're being ignored by a human or a computer. :)

Revision history for this message
oh (oystein-homelien) wrote :

This happens to me several times per day. Seems easy to fix, please do :)

Revision history for this message
Giovanni (giovanni-kenpachi) wrote :

This bug, happens several times per day for me too. So i use pidgin

Revision history for this message
Claus Toft (claus-toft) wrote :

Same problem on up-to-date 9.10 amd64.

Revision history for this message
Luís Louro (lapisdecor) wrote :

same problem here on a E5200 running karmic dev-branch

Changed in pymsn (Ubuntu):
importance: Undecided → Medium
status: New → Triaged
Revision history for this message
Pedro Villavicencio (pedro) wrote :

happens to me several times today, assigning to ken for now so he can have a look to it. Thanks all.

Changed in pymsn (Ubuntu):
assignee: nobody → Ken VanDine (ken-vandine)
Revision history for this message
Rolando Garza (rolandog) wrote :

Happens to me several times per minute, so I ignored future crashes.

Revision history for this message
Markus Korn (thekorn) wrote :

The traceback in one of the duplicates (bug 449556) shows that this bug is also affecting papyon, that's why I've added to task for this package.

Revision history for this message
Luís Louro (lapisdecor) wrote :

still active after last updates

Revision history for this message
Laurent Dinclaux (dreadlox) wrote :

Left my computer on for the night and found it this morning with more that 30 errors like that.

Revision history for this message
bill goldberg (billgoldbergmania) wrote :

Had this error for the first time today, after I updated. Been using it since Alpha 5.

Revision history for this message
Juancarlo An~ez (apalala) wrote :

With the latest updates, I get this error as soon as I launch the app. I'm back to Pidgin until further notice.

Revision history for this message
Yorirou (yorirou) wrote :

Same as Juanca

Revision history for this message
Evertjan Garretsen (egarretsen) wrote :

get this error-message after almost each message i send.

Revision history for this message
Gen (dagen) wrote :

So far I have only gotten this while my screen is locked
though my screen Has been locked for quite some time today..

Revision history for this message
cento (cento-autistici) wrote :

i have upgrade my butterfly-telepathy this morning, and i have this error many time for hours. At last, i think don't work video/audio on msn (i cant see video icons)

Revision history for this message
stefano (loste) wrote :

I have the same problem after jaunty dist-update to karmic. FYI, audio or video calls over gchat are not working too. I hope this helps someway to fix the bug.

Revision history for this message
Ken VanDine (ken-vandine) wrote :

Can someone post the current error, the error should no longer by from pymsn as it isn't used anymore. It should be from papyon.

Please include your version of python-papyon and telepathy-butterfly

Thanks

Changed in papyon (Ubuntu):
assignee: nobody → Ken VanDine (ken-vandine)
importance: Undecided → Low
Revision history for this message
Juancarlo An~ez (apalala) wrote : Re: [Bug 401028] Re: telepathy-butterfly crashed with TypeError in b64decode()

I'm no longer getting the error at startup with Empathy 2.28.1-1ubuntu1,
telepathy-buterfly 0.5.2-0ubuntu1 on this laptop. I'll leave it on to see if
it crashes later on.

I'll check on my desktop later.

Revision history for this message
octavio bernal quiroz (poisonman-1) wrote :

happens to me several times today, assigning to ken for now so he can have a look to it. Thanks all.

Revision history for this message
Per Jonsson (per-ankarlift) wrote :

Seems to happen to happen to me every 5 minutes or so.

Revision history for this message
Simon de Vlieger (ikanobori) wrote :

Same here, happens every 5-10 minutes. Should have something to do with a certain event.

Revision history for this message
pongtawat (pongtawat) wrote :

I have this problem on Karmic AMD64 too. :(

Revision history for this message
Ken VanDine (ken-vandine) wrote :

Can someone please reproduce this and attach the crash log? I can't reproduce it locally, and the original crash report isn't valid considering it was from pymsn. I really need to see it with papyon.

Revision history for this message
Juancarlo An~ez (apalala) wrote :

I was one of the original reporters, and I haven't had any (visible) crashes
any more.

It is weired, though, that on the laptop I get only the "letter" toolbar
icon that leads to both Empathy and Evolution, while on the desktop Empathy
gets it's own (green circle) icon.

On Mon, Nov 2, 2009 at 11:46 AM, Ken VanDine <email address hidden>wrote:

> Can someone please reproduce this and attach the crash log? I can't
> reproduce it locally, and the original crash report isn't valid
> considering it was from pymsn. I really need to see it with papyon.
>
> --
> telepathy-butterfly crashed with TypeError in b64decode()
> https://bugs.launchpad.net/bugs/401028
> You received this bug notification because you are a direct subscriber
> of the bug.
>

--
Juanca

Revision history for this message
Calum Leslie (calumleslie) wrote :

It's happening for me, but with Empathy; is that good enough? Which log would you need?

Revision history for this message
Juancarlo An~ez (apalala) wrote :

I can't find traces of any more crashes on my system logs.

Revision history for this message
doubled916 (drew-triplici) wrote :

this is still happening a couple of times per hour

Seems to happen the most for me when one of my contacts comes online. If am away from my computer for a while and return, I will have 3-6 apport windows open waiting for my interaction

This computer is an upgrade from 9.04 to 9.10 final. 9.04 had only been installed for about a month prior to the upgrade

Revision history for this message
Christophe Dumez (hydr0g3n) wrote :

Yes, I'm experiencing this bug with empathy too.

Revision history for this message
Will Varfar (varfar) wrote :

Happens to ever since I started using Empathy after upgrading (painfully) to karma.

Revision history for this message
Julien SALMON (juliensalmon) wrote :

Quite stupidly I checked the box "Do not warn me about this crash anymore" so now I can no longer see if it's crashing. Do you know if their is a way to undo this, so that the crash can be displayed again ?

Thanks

Revision history for this message
luxio81 (berardi-luciano) wrote :

Hi Julien,

sorry i don't know where you canfind the specific configuration parameter.
Maybe you could search between log configuration files..but is just an idea.

Sorry
Bye

On Tue, Nov 3, 2009 at 12:58 PM, Julien SALMON <email address hidden> wrote:

> Quite stupidly I checked the box "Do not warn me about this crash
> anymore" so now I can no longer see if it's crashing. Do you know if
> their is a way to undo this, so that the crash can be displayed again ?
>
> Thanks
>
> --
> telepathy-butterfly crashed with TypeError in b64decode()
> https://bugs.launchpad.net/bugs/401028
> You received this bug notification because you are a direct subscriber
> of a duplicate bug.
>
> Status in Python msn library: Confirmed
> Status in “papyon” package in Ubuntu: New
> Status in “pymsn” package in Ubuntu: Triaged
>
> Bug description:
> Binary package hint: telepathy-butterfly
>
> Started Empathy, it connected to all my networks, then I got the crash
> message. Up to date karmic.
>
> ProblemType: Crash
> Architecture: i386
> Date: Sat Jul 18 10:58:39 2009
> DistroRelease: Ubuntu 9.10
> ExecutablePath: /usr/lib/telepathy/telepathy-butterfly
> InterpreterPath: /usr/bin/python2.6
> Package: telepathy-butterfly 0.3.4-1
> PackageArchitecture: all
> ProcCmdline: /usr/bin/python /usr/lib/telepathy/telepathy-butterfly
> ProcEnviron:
> SHELL=/bin/bash
> PATH=(custom, user)
> LANG=en_GB.UTF-8
> ProcVersionSignature: Ubuntu 2.6.31-3.19-generic
> PythonArgs: ['/usr/lib/telepathy/telepathy-butterfly']
> SourcePackage: telepathy-butterfly
> Title: telepathy-butterfly crashed with TypeError in b64decode()
> Uname: Linux 2.6.31-3-generic i686
> UserGroups: adm admin audio cdrom dialout dip fax fuse lpadmin netdev
> plugdev sambashare tape vboxusers video
>

Revision history for this message
nightfalcon (promoterg25) wrote :

I believe it can be related to my Pidgin login out without a reason (and without my knowledge because the list used to stay up), it happened often in 9.04.

description: updated
Revision history for this message
sangwoo (borishim) wrote :

Here is my crash log with python-papyon.

Revision history for this message
In , temugen (temugen) wrote :

This bug is actually a DoS vulnerability in the way papyon handles MSNObject data in p2p.py.

There is no exception handling for malformed fields, such as the SHA1C in the bug filer's case. It tries to base 64 decode whether or not the string is properly encoded in base 64. If it isn't, it will crash silently with a traceback in the logs. The user will continue thinking he is talking to the person with the malformed checksum, but in reality, no messages will be sent or received.

More importantly, while going over this code, it appears that the checksum isn't even used when sending or receiving, yet it is stored in the object. If this is the intent, then malformed field exceptions should be ignored and a warning logged instead of crashing. However, it would be best if papyon verified the integrity of the fields and then compared checksums (just like what is done for the SHA1D). If the checksums do not match or the fields are malformed, then notify the user and drop the object from further processing.

I can kind of see the methodology behind what is being done now. The data hash is being checked and compared for integrity, and that's all you care about - the data. If this is the case and you see the checksum as redundant, then at least handle malformed ones by ignoring them instead of crashing on a bash 64 decode.

temugen (temugen)
security vulnerability: no → yes
Revision history for this message
temugen (temugen) wrote :

I've reproduced this locally by sending a malformed SHA1C value via an msn_object avatar. It's not as trivial to reproduce using the telepathy/papyon framework since SHA1C values are normally ignored in all cases, but still processed. Yes, you read that correctly.

Going along with upstream's methodology that the checksum is redundant and all that is necessary is the data (for which the hash is properly compared and handled), I've written a patch to silently ignore malformed checksums and log a warning when doing so. Other than that, I guess we'll have to wait for upstream to decide how they want to properly handle this field, since as of now it's just a waste of clock cycles as far as I can tell.

My patch right now only addresses the base 64 decoding issue in SHA1C parsing that everyone seems to be having, and there is more to take care of as far as DoSing with unexpected data goes. For example, a ParseError is raised when there is no xml data, but that again crashes the conversation. KeyErrors are raised when certain attributes are missing from the xml, which too crash the conversation.

For upstream see bug #24138.

Revision history for this message
In , temugen (temugen) wrote :

Created an attachment (id=31049)
Quilt patch

The attached quilt patch ignores malformed SHA1Cs so that conversations don't crash. As mentioned earlier, though, there are a lot more places where checking needs to be done to make this framework secure. Check for KeyErrors in the xml, TypeErrors in the decodings, etc. I've managed to cause a crash remotely using several different methods.

Revision history for this message
Juancarlo An~ez (apalala) wrote : Re: [Bug 401028] Re: telepathy-butterfly crashed with TypeError in b64decode()

Temugen's analysis makes me think that Empathy/Telepathy is no ready for
prime time...

Several others have said that they're doing fine with Pidgin.

Revision history for this message
cento (cento-autistici) wrote :

I think the main problem was the idea of insert immature technologies into a stable constest such as Ubuntu. I fully understand that empathy (and the whole framework telepathy) is a step forward towards the idea of modern desktop, but at present there aren't real benefits to justify the use of this manifestly imperfect software. I think that the adoption of telepathy would have to be postponed as has been done for gnome-shell.
imho.

Revision history for this message
Juancarlo An~ez (apalala) wrote :

OTOH, 9.10 is not an LTS, and it's still free, so that kind of makes this
reporting and commenting a part of the job of contributing to the effort.

OMP, I'll continue to use Empathy, and switch to something else only in the
moments I must.

Revision history for this message
Anareon (neurostatic+launchpad) wrote :

I don't think it's an issue really. Just click ignore future crashes of this version and it's fine since it doesn't affect functionality at all.

Revision history for this message
John Dong (jdong) wrote :

Whether or not you feel Telepathy is "ready" is not the subject of this bug; the point is an uncaught exception allows Empathy to malfunction in an unexpected manner (the conversation in question will silently fail to transmit or receive messages), which is a remotely exploitable denial of service.

temugen's patch is a great start to addressing the case that everyone is seeing, but in my opinion all the mentioned cases where an uncaught exception would bubble up to the conversation level should be addressed in a patch, then published to karmic-security.

Security team, your opinion?

Revision history for this message
cento (cento-autistici) wrote :

I consider very clever use of launchpad' space to leave comments too general. I agree with those who say we should talk about the bugs, and avoid philosophical discourse. My consideration of the maturity of the project was a sincere exchange of views with all those who follow this bug. I think it is a right for all to comment on the status of a project, since everyone are part of the project (by testing, reporting bugs, writing on the forum). So I reject the criticism and I shall stop the offtopic discussion is created. I hope to read technical comments on the bug, and any proposed solution. Everyone here love the evolution of Ubuntu, including telepathy. Everybody here have the same dream.

Revision history for this message
Ken VanDine (ken-vandine) wrote :

Attached debdiff including the patch from temugen, thanks!

Revision history for this message
nightfalcon (promoterg25) wrote :

Is the problem solved? How do I install this patch?

Revision history for this message
John Dong (jdong) wrote :

No, it's not "solved"; but solutions are in the works....

Re. #43, two comments with motu-sru hat on:

(1) Versioning, of course; and possibly Security Team input of whether this should be SRU or security.
(2) I feel temugen should be credited in the changelog for his investigative work that went into his patch
(3) See comment #41; this is an incomplete fix for the overall problem of uncaught exceptions bubbling up to the conversation level.

Revision history for this message
John Dong (jdong) wrote :

FYI:

<jdong> IMO it's in the category of remotely triggerable DoS
[12:06pm] <jdong>
(do you want this handled in -security or as a universe SRU?)
[12:06pm] <kees>
jdong: agreed, though we don't tend to give a lot of priority to client application crashes like that. I'm fine with it going through SRU.

This will be handled as a SRU per the above comment from the Security Team.

Kees Cook (kees)
Changed in papyon (Ubuntu):
status: New → Triaged
security vulnerability: yes → no
Revision history for this message
In , tester@tester.ca (testertester.ca) wrote :

*** Bug 25526 has been marked as a duplicate of this bug. ***

Revision history for this message
In , Olivier Le Thanh Duong (olethanh) wrote :

Thanks for you patch, I have pushed it into master. Could you please open bugs for all the area where such fallback are needed? Thanks in advance

Changed in pymsn:
status: Confirmed → Fix Released
tags: added: bugpattern-needed
Revision history for this message
In , Jonny-lamb (jonny-lamb) wrote :

*** Bug 26135 has been marked as a duplicate of this bug. ***

Revision history for this message
LGB [Gábor Lénárt] (lgb) wrote :

I have this problem too. I can read here that "fix released" which version does this fix? I have:

lgb@vega:~$ dpkg -S /usr/lib/telepathy/telepathy-butterfly
telepathy-butterfly: /usr/lib/telepathy/telepathy-butterfly
lgb@vega:~$ dpkg -s telepathy-butterfly | grep -i version
Version: 0.5.2-0ubuntu1

It's up-to-date karmic running on x86 32 bit system.

According to the crash file in /var/crash I have similar problem as this bug report is about (that's why I was commented here) but there are minor differences too, here it is:

PythonArgs: ['/usr/lib/telepathy/telepathy-butterfly']
Traceback:
 Traceback (most recent call last):
   File "/usr/lib/pymodules/python2.6/papyon/msnp/base.py", line 107, in _dispatch_command
     handler(command)
   File "/usr/lib/pymodules/python2.6/papyon/msnp/notification.py", line 453, in _handle_NLN
     urllib.unquote(command.arguments[idx]))
   File "/usr/lib/pymodules/python2.6/papyon/p2p.py", line 162, in parse
     shac = base64.b64decode(shac)
   File "/usr/lib/python2.6/base64.py", line 76, in b64decode
     raise TypeError(msg)
 TypeError: Incorrect padding

Thanks!

Revision history for this message
vincenzo (vinclomb) wrote :

The problem occurred after switching to Ubuntu 10.04 Lucid Lynx

tags: added: bugpattern-written
removed: bugpattern-needed
Revision history for this message
lakiu (lakiu-deactivatedaccount-deactivatedaccount) wrote :

lucid daily build, installed today (11th feb)
and still crashesh that occured in 9.10 too.
it's annoying, as i told
it doesn't really affect anything during the session, but
when i disconnect from msn, i'm unable to connect again.
quitting and starting empathy again doesn't solve it. i must at least logout and log back in to get it working.

Revision history for this message
piratemurray (mez-pahlan) wrote :

Agree with all the above. Affects me. AMD64 Lucid Lynx alpha 2

Revision history for this message
Laurent Bigonville (bigon) wrote :

last version (0.4.4) should fix this bug

Changed in papyon (Ubuntu):
status: Triaged → Fix Committed
assignee: Ken VanDine (ken-vandine) → nobody
Changed in pymsn (Ubuntu):
assignee: Ken VanDine (ken-vandine) → nobody
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package papyon - 0.4.4-1ubuntu1

---------------
papyon (0.4.4-1ubuntu1) lucid; urgency=low

  * Resync on Debian (lp: #401028, #520699)
  * debian/control:
    - add missing XB-Python-Version field
    - build-depends and depends on python-crypto, build-depends on quilt
    - remove python-gst0.10 and python-farsight from Depends field
  * debian/patches/01_add_pycrypto_dep.diff patch:
    - use python-crypto instead of an embedded copy of pyDes

papyon (0.4.4-1) unstable; urgency=low

  * New upstream release.
  * debian/rules: remove override_dh_auto_install target, not needed anymore.
  * debian/control: update python-gobject to >= 2.10 in Build-Depends and
    Depends fields.
  * debian/control: update python-openssl to >= 0.6 in Build-Depends and
    Depends fields.
  * Update Debian packaging copyright.
  * debian/control: remove python (>= 2.5) from Depends field.
  * Bump Standards-Version to 3.8.4.
 -- Sebastien Bacher <email address hidden> Wed, 17 Feb 2010 19:46:13 +0100

Changed in papyon (Ubuntu):
status: Fix Committed → Fix Released
Revision history for this message
John Dong (jdong) wrote :

This bug is IMO SRU-worthy, if someone would like to adapt temugen's patch into a karmic-proposed debdiff, I'm sure Karmic users would be happier!

Revision history for this message
lakiu (lakiu-deactivatedaccount-deactivatedaccount) wrote :

What's papyon? I don't have that package listed anywhere, not installed, not in repositories; in Lucid. There's only python-papyon, and it's 0.4.4-1ubuntu2.

Revision history for this message
Nigel Babu (nigelbabu) wrote :

Justification for SRU: This bug affects 371 users and has a bug heat of 1860. It is also a potential security issue. As per above comments, security team has agreed to let this bug fixed according to the SRU process.

Upstream has accepted temugen's patch and papyon 0.4.4-1ubuntu1 in lucid includes this patch.

TEST CASE: As per comment #36, this bug can be reproduced by sending a malformed SHA1C value via an msn_object avatar, for example by modifying papyon to the following: http://pastebin.ubuntu.com/390204/

This patch is already in new upstream version and working fine on lucid. Regresion potential is low

Changed in papyon (Ubuntu Karmic):
importance: Undecided → Medium
status: New → Triaged
Revision history for this message
Petr Tomeš (ptomes) wrote :

Just happened on today updated Lucid.

Revision history for this message
Petr Tomeš (ptomes) wrote :

Happens all the time with python-papyon 0.4.4-1ubuntu2 in lucid. The apport system redirected me here.

Revision history for this message
Pedro Villavicencio (pedro) wrote :

the bug is in papyon, closing the pymsn task. thanks all.

Changed in pymsn (Ubuntu):
status: Triaged → Invalid
Changed in pymsn (Ubuntu Karmic):
status: New → Invalid
Revision history for this message
TiagoCruz (tiagocruz) wrote :

Same here (dell latitude e4300) with all updates installed.

$ lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu lucid (development branch)
Release: 10.04
Codename: lucid

Revision history for this message
temugen (temugen) wrote :

Can anyone with the error on lucid please file a separate bug and attach a backtrace?
On launchpad, insist that it is not a duplicate bug.

The original exception is caught and ignored, so this exception must be happening elsewhere, likely in the b64decode of the other data hash nearby (sha1d).

Changed in pymsn (Ubuntu):
assignee: nobody → raphael (raphael-jacomelle)
Revision history for this message
cmyrland (carl-rahien) wrote :

I can't report this as a new bug since Launchpad/apport only a bugreport already exists. Anyhoo, I have this problem several times an hour, and although I can't really see anything bad happening it's really quite annoying. And the automatic bug report doesn't let me view the details of the crash directly, so I guess I have to search through the logs to find anything. It merely states "telepathy-butterfly has unexpectedly crashed" or something to that effect.

Revision history for this message
Martin Pitt (pitti) wrote : Please test proposed package

Accepted papyon into karmic-proposed, the package will build now and be available in a few hours. Please test and give feedback here. See https://wiki.ubuntu.com/Testing/EnableProposed for documentation how to enable and use -proposed. Thank you in advance!

Changed in papyon (Ubuntu Karmic):
status: Triaged → Fix Committed
tags: added: verification-needed
Revision history for this message
Anmar Oueja (anmar) wrote :

I just installed it and still have apport popping up saying that butterfly is crashing.

Revision history for this message
Anmar Oueja (anmar) wrote :

I just updated to the latest papyon and still have apport saying that it is broken but I did test it and it seems to work so I am not sure what is apport complaining about. python-papyon version: 0.4.5-1ubuntu2

Revision history for this message
Prosthetic Head (propanone) wrote :

Fully up to date (~1 hour ago) 64bit Lucid (10.04) beta and this is still happening despite all the talk of 'Fix Released' above. Do you need any more data I could provide?

Revision history for this message
Steve Langasek (vorlon) wrote :

reopening based on feedback.

Changed in papyon (Ubuntu):
status: Fix Released → Triaged
Revision history for this message
temugen (temugen) wrote :

Can anyone please attach a backtrace?

Revision history for this message
Prosthetic Head (propanone) wrote :

I'd be happy to provide a backtrace if you can tell me how or link to a how-to. I'm away from the internet for a week from tomorrow (Thursday 25th) evening so if its after then someone else will have to get the backtrace for you.

Revision history for this message
Brewster Malevich (brews) wrote :

I'm getting this crash nearly every 30 seconds.

Revision history for this message
ecubuntu (ecubuntu) wrote :

Second time firs on lucid 32 bits and this time on 64 bits

Revision history for this message
In , Laurent Bigonville (bigon) wrote :

Still happening with version (0.4.5)

Traceback:
 Traceback (most recent call last):
   File "/usr/lib/pymodules/python2.6/papyon/msnp/base.py", line 107, in _dispatch_command
     handler(command)
   File "/usr/lib/pymodules/python2.6/papyon/msnp/notification.py", line 453, in _handle_NLN
     urllib.unquote(command.arguments[idx]))
   File "/usr/lib/pymodules/python2.6/papyon/p2p.py", line 159, in parse
     shad = base64.b64decode(shad)
   File "/usr/lib/python2.6/base64.py", line 76, in b64decode
     raise TypeError(msg)
 TypeError: Incorrect padding

Revision history for this message
In , Laurent Bigonville (bigon) wrote :

Created an attachment (id=34733)
Proposed patch

Revision history for this message
Laurent Bigonville (bigon) wrote :

Traceback:
 Traceback (most recent call last):
   File "/usr/lib/pymodules/python2.6/papyon/msnp/base.py", line 107, in _dispatch_command
     handler(command)
   File "/usr/lib/pymodules/python2.6/papyon/msnp/notification.py", line 453, in _handle_NLN
     urllib.unquote(command.arguments[idx]))
   File "/usr/lib/pymodules/python2.6/papyon/p2p.py", line 159, in parse
     shad = base64.b64decode(shad)
   File "/usr/lib/python2.6/base64.py", line 76, in b64decode
     raise TypeError(msg)
 TypeError: Incorrect padding

Revision history for this message
Laurent Bigonville (bigon) wrote :

A patch for that should (no tested) fix backtrace of comment #71

Revision history for this message
temugen (temugen) wrote :

Laurent: First off, thanks so much for the backtrace; it's exactly what I thought it would be. Should this not be filed as a new bug?

The patch for the corrupt shac value blatantly ignores the exception (just logs it) because the value is not used anywhere else, and ignoring it follows the logic of the rest of the codebase. However, ignoring corrupted shad values in this way could be a bad idea. If the data hash is corrupt, that signals that the data (a profile icon for example) could also be corrupt. Now, there are two reasonable ways to fix this:
A) Follow the logic set in place by the codebase as if the data hashes, while valid, don't match. I haven't look at the code yet but I believe that logic is to drop the invalid data message. After logging, this would be the proper way to handle corrupt data imo.
B) Let FD.o take care of it. It should be up to them how they want to handle corrupt messages.

Unfortunately there are still many unchecked exceptions throughout papyon aside from this one.

Revision history for this message
In , Olivier Le Thanh Duong (olethanh) wrote :

Like I said on irc, I'm pretty sure that's a dup of https://bugs.freedesktop.org/show_bug.cgi?id=26804 so I would like to see if it can be reproduced with the patch or some logs.

Revision history for this message
Tim Wright (timw) wrote :

FYI, I just hit the exact same crash as comment #71, at least according to /var/crash/_usr_lib_telepathy_telepathy-butterfly.1000.crash.

Revision history for this message
In , Jonny-lamb (jonny-lamb) wrote :

(In reply to comment #9)
> Like I said on irc, I'm pretty sure that's a dup of
> https://bugs.freedesktop.org/show_bug.cgi?id=26804 so I would like to see if it
> can be reproduced with the patch or some logs.

Unfortunately, it's not a duplicate as Laurent is running papyon with the said fix.

Olivier, do you have any objections against Laurent's patch? I personally don't know how else to go about fixing this.

Revision history for this message
In , Olivier Le Thanh Duong (olethanh) wrote :

(In reply to comment #10)
> (In reply to comment #9)
> > Like I said on irc, I'm pretty sure that's a dup of
> > https://bugs.freedesktop.org/show_bug.cgi?id=26804 so I would like to see if it
> > can be reproduced with the patch or some logs.
>
> Unfortunately, it's not a duplicate as Laurent is running papyon with the said
> fix.
>
> Olivier, do you have any objections against Laurent's patch? I personally don't
> know how else to go about fixing this.

I'm ok with it, but perhaps we should add more debug info in each exception it may proves helpfuls

Revision history for this message
In , Jonny-lamb (jonny-lamb) wrote :

(In reply to comment #11)
> perhaps we should add more debug info in each exception it
> may proves helpfuls

What kind of extra info do you mean? Check out my branch to fix this bug; I added another commit.

Revision history for this message
In , Olivier Le Thanh Duong (olethanh) wrote :

I mean having the failed sha[cd] in the exceptions, since most people don't provide the log but only the traceback that could be useful

Revision history for this message
In , Jonny-lamb (jonny-lamb) wrote :

(In reply to comment #13)
> I mean having the failed sha[cd] in the exceptions, since most people don't
> provide the log but only the traceback that could be useful

Yeah can't hurt. Check out my branch for all this then.

Revision history for this message
Trygve Vea (trygve-vea-gmail) wrote :

I have no idea when this error appears, it seems to just pop up randomly - but; #47 and #71 looks to be a match against what I'm experiencing. My Traceback:

Traceback:
 Traceback (most recent call last):
   File "/usr/lib/pymodules/python2.6/papyon/msnp/base.py", line 107, in _dispatch_command
     handler(command)
   File "/usr/lib/pymodules/python2.6/papyon/msnp/notification.py", line 453, in _handle_NLN
     urllib.unquote(command.arguments[idx]))
   File "/usr/lib/pymodules/python2.6/papyon/p2p.py", line 159, in parse
     shad = base64.b64decode(shad)
   File "/usr/lib/python2.6/base64.py", line 76, in b64decode
     raise TypeError(msg)
 TypeError: Incorrect padding

Revision history for this message
Mathias Lustig (delaylama) wrote :

Hi guys,

just wanted to add that I'm affected of this bug, too. (Ubuntu 10.04 amd64 with all available updates)
Is there currently anything helpfull that I can do?

Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package papyon - 0.4.6-0ubuntu1

---------------
papyon (0.4.6-0ubuntu1) lucid; urgency=low

  * New upstream version:
    Fixes:
    - Don't try to reconnect in an infinite loop in HTTP mode
    - Fix parse error in HTTPMessage
    - Display presence of contacts using web messenger
  * debian/patches/02_git_nln_handler.patch,
    debian/patches/90_git_clean_trailing_x00.patch:
    - the changes are in the new version
  * debian/patches/03_extra_infos_logger.patch:
    - the change is not required since the issue is solved now
  * debian/patches/90_git_no_b64_crasher.patch:
    - upstream change to fix telepathy-butterfly crash report in b64decode()
      (lp: #401028)
  * debian/patches/91_upstream_on_error_exception.patch:
    - upstream change to not raise an on_error exception (lp: #194494)
  * debian/patches/92_upstream_catch_exception.patch:
    - upstream change to catch gaierror exceptions (lp: #467217)
 -- Sebastien Bacher <email address hidden> Mon, 12 Apr 2010 18:24:37 +0200

Changed in papyon (Ubuntu):
status: Triaged → Fix Released
Revision history for this message
Martin Pitt (pitti) wrote :

Anyone who can test the karmic-proposed package? I'll remove it soon if there is no testing feedback. Thank you!

Revision history for this message
Martin Pitt (pitti) wrote :

Removed from karmic-proposed due to lack of testing for half a year.

Changed in papyon (Ubuntu Karmic):
status: Fix Committed → Won't Fix
Changed in pymsn:
importance: Unknown → Medium
Changed in pymsn:
importance: Medium → Unknown
Changed in pymsn:
importance: Unknown → Medium
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.