Bug 706322 - [abrt] claws-mail-3.7.9-2.fc14: clamd_create_config_automatic: Process /usr/bin/claws-mail was killed by signal 11 (SIGSEGV)
Summary: [abrt] claws-mail-3.7.9-2.fc14: clamd_create_config_automatic: Process /usr/b...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: claws-mail
Version: 14
Hardware: All
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Andreas Bierfert
QA Contact: Fedora Extras Quality Assurance
URL: http://www.thewildbeast.co.uk/claws-m...
Whiteboard: abrt_hash:b1154aeed0e2ccb6c537c76bccd...
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2011-05-20 05:45 UTC by Neil Underwood
Modified: 2011-06-21 17:13 UTC (History)
3 users (show)

Fixed In Version: claws-mail-plugins-3.7.9-3.fc15
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2011-06-21 17:06:49 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)
File: backtrace (49.53 KB, text/plain)
2011-05-20 05:45 UTC, Neil Underwood
no flags Details

Description Neil Underwood 2011-05-20 05:45:30 UTC
abrt version: 1.1.18
architecture: x86_64
Attached file: backtrace, 50723 bytes
cmdline: /usr/bin/claws-mail
comment: Opened claws-mail, selected Preferences->Plugins->ClamAV.  Claws-mail briefly froze then crashed before ClamAV options even appeared.
component: claws-mail
Attached file: coredump, 86376448 bytes
crash_function: clamd_create_config_automatic
executable: /usr/bin/claws-mail
kernel: 2.6.35.13-91.fc14.x86_64
package: claws-mail-3.7.9-2.fc14
rating: 4
reason: Process /usr/bin/claws-mail was killed by signal 11 (SIGSEGV)
release: Fedora release 14 (Laughlin)
time: 1305870118
uid: 500

How to reproduce
-----
1. Open claws-mail
2. Select Preferences->ClamAV
3. Watch it crash

Comment 1 Neil Underwood 2011-05-20 05:45:32 UTC
Created attachment 499998 [details]
File: backtrace

Comment 2 Michael Schwendt 2011-05-20 08:31:32 UTC
#0  0x00007f3ed05a7627 in clamd_create_config_automatic (path=0x24be280 "/etc/clamd.conf") at clamd-plugin.c:213

   211          }
   212          fclose(conf);
   213          if (! Socket && (Socket->socket.port || Socket->socket.path)) {
   214                  /*g_error("%s: Not able to find required information", path);*/
   215                  alertpanel_error(_("%s: Not able to find required information\nclamd will be disabled"), path);
   216          }


The if-expression is questionable. It should check whether

  !Socket || (!Socket->socket.port && !Socket->socket.path)

(i.e. whether the Socket is not NULL  or whether neither port and path are set), which can be converted into

  ! (Socket && (Socket->socket.port || Socket->socket.path))

and requires extra brackets due to operator precedence. Or else it would dereference a NULL Socket ptr.

Comment 3 Neil Underwood 2011-05-20 08:43:05 UTC
I should add I had the ClamAV plugin loaded, but clamd was not running.  Therefore -> socket = NULL I'm assuming.

Comment 4 Michael Schwendt 2011-05-20 09:28:57 UTC
"Socket" here is just a pointer to a memory structure. The code allocates that memory depending on what options it finds in /etc/clamd.conf. In your case, I assume, it didn't find the options it searched for, and with a fixed if-expression would have shown the quoted error

  Not able to find required information
  clamd will be disabled

instead of crashing.

Comment 5 Fedora Update System 2011-05-20 18:18:32 UTC
claws-mail-plugins-3.7.9-3.fc14 has been submitted as an update for Fedora 14.
https://admin.fedoraproject.org/updates/claws-mail-plugins-3.7.9-3.fc14

Comment 6 Fedora Update System 2011-05-20 18:18:41 UTC
claws-mail-plugins-3.7.9-3.fc15 has been submitted as an update for Fedora 15.
https://admin.fedoraproject.org/updates/claws-mail-plugins-3.7.9-3.fc15

Comment 7 Fedora Update System 2011-05-25 03:08:42 UTC
Package claws-mail-plugins-3.7.9-3.fc14:
* should fix your issue,
* was pushed to the Fedora 14 testing repository,
* should be available at your local mirror within two days.
Update it with:
# su -c 'yum update --enablerepo=updates-testing claws-mail-plugins-3.7.9-3.fc14'
as soon as you are able to.
Please go to the following url:
https://admin.fedoraproject.org/updates/claws-mail-plugins-3.7.9-3.fc14
then log in and leave karma (feedback).

Comment 8 Fedora Update System 2011-06-21 17:06:44 UTC
claws-mail-plugins-3.7.9-3.fc14 has been pushed to the Fedora 14 stable repository.  If problems still persist, please make note of it in this bug report.

Comment 9 Fedora Update System 2011-06-21 17:13:38 UTC
claws-mail-plugins-3.7.9-3.fc15 has been pushed to the Fedora 15 stable repository.  If problems still persist, please make note of it in this bug report.


Note You need to log in before you can comment on or make changes to this bug.