View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
0001023 | SOGo | SOPE | public | 2010-12-01 19:06 | 2011-06-16 15:41 |
Reporter | buzzdee | Assigned To | ludovic | ||
Priority | normal | Severity | crash | Reproducibility | always |
Status | resolved | Resolution | fixed | ||
Product Version | 1.3.4 | ||||
Target Version | 1.3.8 | ||||
Summary | 0001023: a specific mail always aborts the sogo instance | ||||
Description | entering a folder with attached mail, stops sogo with an abort, assuming a double free. (gdb) r -WOUseWatchDog NO -WONoDetach YES Program received signal SIGABRT, Aborted. | ||||
Additional Information | this happens always. In case there are many mails in hte folder, someone needs to scroll to the evil mail. Happens on OpenBSD i386, libiconv-1.13p2, sope/sogo 1.3.4, gnustep-base-1.20.1p0, I also tried with libiconv-1.13.1, but its still aborting. uncommenting the free(cd); in iconv_close() in libiconv, then the error doesn't happen, but I think the problem is somewhere in sope and not in libiconv. in sogod.log I see: | ||||
Tags | No tags attached. | ||||
Can you attach the culprit mail? |
|
sure, I actually thought I did with the initial report. |
|
2010-12-01 21:13
|
evil-mail.txt (2,097 bytes)
Return-Path: <owner-misc+M92201@openbsd.org> Received: from smtp.l00-bugdead-prods.de ([unix socket]) by communicator.ds9 (Cyrus v2.3.12) with LMTPA; Wed, 11 Nov 2009 14:14:02 +0100 X-Sieve: CMU Sieve 2.3 Received: from localhost (localhost.ds9 [127.0.0.1]) by smtp.l00-bugdead-prods.de (Postfix) with ESMTP id 3DAB6D2FDB for <sebastia@l00-bugdead-prods.de>; Wed, 11 Nov 2009 14:14:02 +0100 (CET) X-Virus-Scanned: amavisd-new at example.com Received: from smtp.l00-bugdead-prods.de ([127.0.0.1]) by localhost (communicator.ds9 [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id WiQuuZAZ1T1L for <sebastia@l00-bugdead-prods.de>; Wed, 11 Nov 2009 14:13:27 +0100 (CET) Received: from shear.ucar.edu (lists.openbsd.org [192.43.244.163]) by smtp.l00-bugdead-prods.de (Postfix) with ESMTP id 6F353D2F0E for <sebastia@l00-bugdead-prods.de>; Wed, 11 Nov 2009 14:13:26 +0100 (CET) Received: from openbsd.org (localhost.ucar.edu [127.0.0.1]) by shear.ucar.edu (8.14.3/8.14.3) with ESMTP id nABD9rxU024809; Wed, 11 Nov 2009 06:09:53 -0700 (MST) Received: from mail.dnsba.com (hostbw-4.dnsba.com [190.2.55.4]) by shear.ucar.edu (8.14.3/8.14.3) with ESMTP id nABD71af025009 for <misc@openbsd.org>; Wed, 11 Nov 2009 06:07:02 -0700 (MST) Received: from Malibu (unknown [190.244.170.28]) by mail.dnsba.com (Postfix) with ESMTP id 18FA6A7884ED for <misc@openbsd.org>; Wed, 11 Nov 2009 11:08:17 -0200 (ARST) MIME-Version: 1.0 From: "San Telmo Computacion" <stc@santelmocomputacion.com.ar> Reply-To: stc@santelmocomputacion.com.ar To: misc@openbsd.org Subject: =?windows-1252http-equivContent-Type?Q?San_Telmo_Computaci=F3n_-_Servicio?= =?windows-1252http-equivContent-Type?Q?s_Web?= Content-Type: text/plain; charset="us-ascii" X-Mailer: SendBlaster.1.6.0 Date: Wed, 11 Nov 2009 10:06:48 -0200 Message-ID: <2100642349922361827132@Malibu> X-Converted-To-Plain-Text: from multipart/alternative by demime 1.01d X-Converted-To-Plain-Text: Alternative section used was text/plain X-Loop: misc@openbsd.org Precedence: list Sender: owner-misc@openbsd.org )"> |
Works for me. |
|
2010-12-01 21:17
|
|
I'll see whether I can find more of those evil e-mails, since I can reproduce the problem all the time here. |
|
Here another backtrace from another evil mail, also ending in an abort: Program received signal SIGABRT, Aborted. And the log output from sogod.log: |
|
2010-12-02 07:57
|
evil-mail2.txt (3,075 bytes)
Return-Path: <owner-tech+M21613@openbsd.org> Received: from smtp.l00-bugdead-prods.de ([unix socket]) by communicator.ds9 (Cyrus v2.3.14) with LMTPA; Sat, 25 Sep 2010 08:39:21 +0200 X-Sieve: CMU Sieve 2.3 Received: from localhost (localhost [127.0.0.1]) by smtp.l00-bugdead-prods.de (Postfix) with ESMTP id 9ACA774EB8 for <sebastia@l00-bugdead-prods.de>; Sat, 25 Sep 2010 08:39:21 +0200 (CEST) X-Virus-Scanned: amavisd-new at l00-bugdead-prods.de Received: from smtp.l00-bugdead-prods.de ([127.0.0.1]) by localhost (communicator.ds9 [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 9LfamfnXQmx5 for <sebastia@l00-bugdead-prods.de>; Sat, 25 Sep 2010 08:39:13 +0200 (CEST) Received: from shear.ucar.edu (lists.openbsd.org [192.43.244.163]) by smtp.l00-bugdead-prods.de (Postfix) with ESMTP id 15D1974EB7 for <sebastia@l00-bugdead-prods.de>; Sat, 25 Sep 2010 08:39:12 +0200 (CEST) Received: from openbsd.org (localhost.ucar.edu [127.0.0.1]) by shear.ucar.edu (8.14.3/8.14.3) with ESMTP id o8P6bcX1005615; Sat, 25 Sep 2010 00:37:38 -0600 (MDT) Received: from vps.usuarioweb.com.ar (static-222-178-73-69.nocdirect.com [69.73.178.222]) by shear.ucar.edu (8.14.3/8.14.3) with ESMTP id o8P6aK5G007896 (version=TLSv1/SSLv3 cipher=DHE-DSS-AES256-SHA bits=256 verify=NO) for <tech@openbsd.org>; Sat, 25 Sep 2010 00:36:21 -0600 (MDT) Received: from [186.137.189.236] (helo=929e12e0d6a2490) by vps.usuarioweb.com.ar with esmtpsa (TLSv1:AES256-SHA:256) (Exim 4.69) (envelope-from <ministerios@newssmail.com.ar>) id 1OzOMt-00034l-Re for tech@openbsd.org; Sat, 25 Sep 2010 02:36:20 -0400 MIME-Version: 1.0 From: "Ministerios" <ministerios@newssmail.com.ar> Reply-To: difusionfeedback@gmail.com To: tech@openbsd.org Subject: =?iso-8859-1http-equivContent-Type?Q?PERD=D3N?= Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Mailer: SendBlaster.1.5.5 Date: Sat, 25 Sep 2010 03:36:17 -0300 Message-ID: <2196337086320114731484@929e12e0d6a2490> X-AntiAbuse: This header was added to track abuse, please include it with any abuse report X-AntiAbuse: Primary Hostname - vps.usuarioweb.com.ar X-AntiAbuse: Original Domain - openbsd.org X-AntiAbuse: Originator/Caller UID/GID - [47 12] / [47 12] X-AntiAbuse: Sender Address Domain - newssmail.com.ar X-Converted-To-Plain-Text: from text/html by demime 1.01d List-Help: <mailto:majordomo@openbsd.org?body=help> List-Owner: <mailto:tech-owner@openbsd.org> List-Post: <mailto:tech@openbsd.org> List-Subscribe: <mailto:majordomo@openbsd.org?body=sub%20tech> List-Unsubscribe: <mailto:majordomo@openbsd.org?body=unsub%20tech> X-Loop: tech@openbsd.org Precedence: list Sender: owner-tech@openbsd.org Mail para ser visto con conexisn, si no puede verlo, click aqum [IMAGE] Si usted no esta interesado en recibir mas informacisn proporcionada por Feedback, Agencia de Prensa, envmenos un e-mail indicando " Remover" de la Lista "Prensa y Difusisn" a prensafeedback@gmail.com Nuevamente disculpe por las molestias que le pudimos haber ocasionado. |
That mail also works just fine. |
|
also with the two defaults added that you recommended in bug report 0001022, the abort still happens reproducible. Are there any other defaults I could try to set which might affect the abort? |
|
after more debugging with gdb, and looking at the logs again, I found that the FromEncoding here is the problem: Both subjects use "strange" encodings. The iconv_wrapper method in NSString+Encoding.m, gets an error back, when calling type = iconv_open(From, To). Then "type" is checked for errors I added a check in the patch, to only call iconv_close when it is not (iconv_t)-1 |
|
2010-12-10 22:40
|
patch-sope-core_NGExtensions_FdExt_subproj_NSString+Encoding_m (487 bytes)
$OpenBSD$ fix abort(), when there was an error with iconv_open getting a conversion descriptor --- sope-core/NGExtensions/FdExt.subproj/NSString+Encoding.m.orig Tue Nov 2 15:12:13 2010 +++ sope-core/NGExtensions/FdExt.subproj/NSString+Encoding.m Fri Dec 10 19:58:24 2010 @@ -256,7 +256,7 @@ static char *iconv_wrapper(id self, char *_src, unsign return outbuf; CLEAR_AND_RETURN: - if (type) + if (type && (type != (iconv_t)-1)) iconv_close(type); if (outbuf) { |
I can't reproduce this. I copied evil-mail.txt 1:1 in my IMAP-folder and this is the result: 188.105.130.106 - - [13/Dec/2010:22:58:08 GMT] "POST /SOGo/so/pop05579/Mail//0/folderINBOX/117864/view?noframe=1 HTTP/1.1" 200 937/0 0.352 2601 63% 0 |
|
2010-12-13 22:00
|
|
Bild 3.png show the result in my SOGo installation. Version 1.3.4, running on CentOS 5.5 with latest patches installed. |
|
I don't know why it is not aborting on Linux. However, the OpenBSD malloc is different to others, not tolerating programming errors that stay uncovered on other systems. I think the A option (enabled by default) to OpenBSD malloc.conf causes the abort(). As far as I can see, my patch seems to be right. Not freeing sth. that was not allocated seems reasonable for me. Please let me know if I am wrong. |
|
could this be reviewed and commented, or even included if its fine? Shortly after a release is a good time to add new stuff, since the plenty of time for testing till the next release ;) |
|
asking again, is there anything wrong with this patch? |
|
Nothing wrong with the patch - will be included for 1.3.8. |
|
Patch pushed: http://mtn.inverse.ca/revision/diff/856965845eee02997e104f46f22a199238f9ed24/with/c209a0a647b14e436b77bc38e0b7b04cc2213d0d |
|
Date Modified | Username | Field | Change |
---|---|---|---|
2010-12-01 19:06 | buzzdee | New Issue | |
2010-12-01 20:46 | ludovic | Note Added: 0001902 | |
2010-12-01 21:12 | buzzdee | Note Added: 0001903 | |
2010-12-01 21:13 | buzzdee | File Added: evil-mail.txt | |
2010-12-01 21:16 | ludovic | Note Added: 0001904 | |
2010-12-01 21:17 | ludovic | File Added: Screen shot 2010-12-01 at 4.16.52 PM.png | |
2010-12-02 07:28 | buzzdee | Note Added: 0001908 | |
2010-12-02 07:56 | buzzdee | Note Added: 0001909 | |
2010-12-02 07:57 | buzzdee | File Added: evil-mail2.txt | |
2010-12-02 15:41 | ludovic | Note Added: 0001915 | |
2010-12-02 18:22 | buzzdee | Note Added: 0001923 | |
2010-12-10 22:37 | buzzdee | Note Added: 0001944 | |
2010-12-10 22:40 | buzzdee | File Added: patch-sope-core_NGExtensions_FdExt_subproj_NSString+Encoding_m | |
2010-12-13 21:59 | gienger | Note Added: 0001945 | |
2010-12-13 22:00 | gienger | File Added: Bild 3.png | |
2010-12-13 22:01 | gienger | Note Added: 0001946 | |
2010-12-14 08:33 | buzzdee | Note Added: 0001947 | |
2011-02-18 02:13 | ludovic | Status | new => assigned |
2011-02-18 02:13 | ludovic | Assigned To | => ludovic |
2011-04-13 11:37 | buzzdee | Note Added: 0002375 | |
2011-05-05 22:29 | buzzdee | Note Added: 0002430 | |
2011-05-05 22:30 | buzzdee | Note Edited: 0002430 | |
2011-06-15 20:54 | ludovic | Note Added: 0002580 | |
2011-06-15 20:54 | ludovic | Target Version | => 1.3.8 |
2011-06-16 15:41 | ludovic | Note Added: 0002591 | |
2011-06-16 15:41 | ludovic | Status | assigned => resolved |
2011-06-16 15:41 | ludovic | Resolution | open => fixed |