Bug 139053

Summary: Email attachement with long filename, accents and .doc extension crash kio_imap
Product: [Frameworks and Libraries] kio Reporter: Davide Ferrari <vide80>
Component: imapAssignee: kdepim bugs <kdepim-bugs>
Status: RESOLVED WORKSFORME    
Severity: crash    
Priority: NOR    
Version: unspecified   
Target Milestone: ---   
Platform: Ubuntu   
OS: Linux   
Latest Commit: Version Fixed In:
Attachments: Sample mail message that cause the problem

Description Davide Ferrari 2006-12-20 16:55:24 UTC
Version:            (using KDE KDE 3.5.5)
Installed from:    Ubuntu Packages
OS:                Linux

I received a file attachment, downloaded from an IMAP server (Courier) that makes kio_imap use 100%, trigger a memory leak and take the entire machine down to his knees, consuming all memory (phisical and swap) in a matter of seconds.
I can reproduce this bug even with a 0 bytes attachement. You have to have these conditions:

- long file name (>50)
- accented characters (á, ú, ì, ñ etc.)
- .doc extension

if you have a .doc without accents, no problem. If you have, say, a .txt with accents, no crash. But with those 3 condtions, crash. And it's very very dangerous cause it can be considered as a remote DoS. I have to phisically reset my machine, no other ways. CTRL+ALT+BACKSPACE cannot kill X, ssh login need too much time, mouse and keyboard become useless. Trying to reproduce the bug, with "top" opened in a consolle I saw with my eyes how much a kio_imap process sucked all the processor power and all the memory.
I can reproduce this bug on a Kubuntu Edgy with KDE 3.5.5 and also on a Gentoo with KDE 3.5.5.
As said, I'm using Courier IMAP on server side, I can't test it with other IMAP servers.
Comment 1 Philip Rodrigues 2006-12-20 22:49:25 UTC
Can you attach a message that shows the problem?
Comment 2 Davide Ferrari 2006-12-21 20:50:22 UTC
A direct copy from the IMAP server does fit your request, or do you need a copy downloaded from a MUA? because in this case I cannot use Kmail to get it ;) tomorrow I'll attach a copy.
Comment 3 Philip Rodrigues 2006-12-22 12:52:58 UTC
I think either would be OK
Comment 4 Davide Ferrari 2006-12-28 16:03:16 UTC
Created attachment 19056 [details]
Sample mail message that cause the problem

Happens for sure if downloaded from an IMAP4 server (CourierIMAP, at least)
Comment 5 Davide Ferrari 2006-12-28 16:04:28 UTC
Uploaded a sample mail. I'll try to see if it happens with kio_pop3 as well
Comment 6 Thomas McGuire 2007-12-12 23:38:19 UTC
Reassigning the bugs of the SMTP, IMAP and POP ioslaves to kdepim-bugs.
Comment 7 Thomas McGuire 2007-12-12 23:41:38 UTC
Undo autoconfirm.
Comment 8 Davide Ferrari 2007-12-13 09:43:10 UTC
It seems fixed in Kmail Version 1.9.6 (enterprise 0.20070907.709405) (Kubuntu Gutsy with KDE 3.5.8)