Bug 1123895

Summary: [abrt] claws-mail account Auto-configure crash: strlen(): claws-mail killed by SIGSEGV
Product: [Fedora] Fedora Reporter: Фукидид <fukidid>
Component: claws-mailAssignee: Andreas Bierfert <andreas.bierfert>
Status: CLOSED ERRATA QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 20CC: andreas.bierfert, bugs.michael, kupo
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Unspecified   
URL: https://retrace.fedoraproject.org/faf/reports/bthash/f232e655fe884c3ca2e9ede063cc719ceefab0da
Whiteboard: abrt_hash:3f4921f6ba833dd60e4860a407f78d40e46a9f5d
Fixed In Version: claws-mail-3.11.1-3.fc20 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2015-02-04 07:57:34 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Attachments:
Description Flags
File: backtrace
none
File: cgroup
none
File: core_backtrace
none
File: dso_list
none
File: environ
none
File: limits
none
File: maps
none
File: open_fds
none
File: proc_pid_status
none
File: var_log_messages
none
File: exploitable none

Description Фукидид 2014-07-28 15:02:08 UTC
Version-Release number of selected component:
claws-mail-3.10.1-1.fc20

Additional info:
reporter:       libreport-2.2.3
backtrace_rating: 4
cmdline:        /usr/bin/claws-mail
crash_function: strlen
executable:     /usr/bin/claws-mail
kernel:         3.15.6-200.fc20.x86_64
runlevel:       N 5
type:           CCpp
uid:            1000

Truncated backtrace:
Thread no. 1 (10 frames)
 #0 strlen at ../sysdeps/x86_64/strlen.S:106
 #1 g_strdup at gstrfuncs.c:363
 #2 auto_configure_cb at wizard.c:1389
 #3 _g_closure_invoke_va at gclosure.c:840
 #6 gtk_real_button_released at gtkbutton.c:1712
 #7 _g_closure_invoke_va at gclosure.c:840
 #10 gtk_button_button_release at gtkbutton.c:1604
 #11 _gtk_marshal_BOOLEAN__BOXED at gtkmarshalers.c:86
 #16 gtk_widget_event_internal at gtkwidget.c:5017
 #17 gtk_widget_event at gtkwidget.c:4814

Comment 1 Фукидид 2014-07-28 15:02:12 UTC
Created attachment 921779 [details]
File: backtrace

Comment 2 Фукидид 2014-07-28 15:02:14 UTC
Created attachment 921780 [details]
File: cgroup

Comment 3 Фукидид 2014-07-28 15:02:16 UTC
Created attachment 921781 [details]
File: core_backtrace

Comment 4 Фукидид 2014-07-28 15:02:17 UTC
Created attachment 921782 [details]
File: dso_list

Comment 5 Фукидид 2014-07-28 15:02:19 UTC
Created attachment 921783 [details]
File: environ

Comment 6 Фукидид 2014-07-28 15:02:20 UTC
Created attachment 921784 [details]
File: limits

Comment 7 Фукидид 2014-07-28 15:02:23 UTC
Created attachment 921785 [details]
File: maps

Comment 8 Фукидид 2014-07-28 15:02:24 UTC
Created attachment 921786 [details]
File: open_fds

Comment 9 Фукидид 2014-07-28 15:02:25 UTC
Created attachment 921787 [details]
File: proc_pid_status

Comment 10 Фукидид 2014-07-28 15:02:26 UTC
Created attachment 921788 [details]
File: var_log_messages

Comment 11 Фукидид 2014-07-28 15:02:28 UTC
Created attachment 921789 [details]
File: exploitable

Comment 12 Michael Schwendt 2014-07-28 16:04:29 UTC
#1  0x0000003c0e866723 in g_strdup (str=str@entry=0x1 <error: Cannot access memory at address 0x1>) at gstrfuncs.c:363
#2  0x000000000057e0e7 in auto_configure_cb (widget=<optimized out>, data=0x2b3e380) at wizard.c:1389
        address = 0x2c20c00 ""
        domain = 0x1 <error: Cannot access memory at address 0x1>

wizard.c
  1370          address = gtk_editable_get_chars(GTK_EDITABLE(wizard->email), 0, -1);
  1371  
  1372          if (strchr(address, '@') < 0) {

(!)

  1373                  g_free(address);
  1374                  gtk_label_set_text(GTK_LABEL(wizard->auto_configure_lbl),
  1375                             _("Failed (wrong address)"));
  1376          }
  1377          domain = strchr(address, '@') + 1;

(!)

This is fixed in upstream git already. Entering an email address that contains no '@' is not rejected properly because of line 1372, which makes no sense (since return type is a char ptr) and ought to check against "== NULL" not "< 0":

  http://git.claws-mail.org/?p=claws.git;a=blobdiff;f=src/wizard.c;h=717bb9fd0581adc47e3232c5e78dcceef8ba5867;hp=1686affca2642a4e6b1931c0f96fbae1bc283724;hb=HEAD;hpb=3c760e2a2994795f1360891ae88149bbc498b435

Work-around for you is to enter a valid email address before pressing the autoconfigure button.

Comment 14 Michael Schwendt 2015-01-15 13:11:04 UTC
Fixed upstream.

Comment 15 Fedora Update System 2015-01-18 20:20:22 UTC
claws-mail-3.11.1-3.fc20 has been submitted as an update for Fedora 20.
https://admin.fedoraproject.org/updates/claws-mail-3.11.1-3.fc20

Comment 16 Fedora Update System 2015-01-18 20:20:37 UTC
claws-mail-3.11.1-3.fc21 has been submitted as an update for Fedora 21.
https://admin.fedoraproject.org/updates/claws-mail-3.11.1-3.fc21

Comment 17 Fedora Update System 2015-01-20 21:08:15 UTC
Package claws-mail-3.11.1-3.fc20:
* should fix your issue,
* was pushed to the Fedora 20 testing repository,
* should be available at your local mirror within two days.
Update it with:
# su -c 'yum update --enablerepo=updates-testing claws-mail-3.11.1-3.fc20'
as soon as you are able to.
Please go to the following url:
https://admin.fedoraproject.org/updates/FEDORA-2015-0957/claws-mail-3.11.1-3.fc20
then log in and leave karma (feedback).

Comment 18 Fedora Update System 2015-02-04 07:57:34 UTC
claws-mail-3.11.1-3.fc21 has been pushed to the Fedora 21 stable repository.  If problems still persist, please make note of it in this bug report.

Comment 19 Fedora Update System 2015-02-04 08:03:48 UTC
claws-mail-3.11.1-3.fc20 has been pushed to the Fedora 20 stable repository.  If problems still persist, please make note of it in this bug report.