Bug 1177799

Summary: [abrt] ModemManager: __strcmp_sse2_unaligned(): ModemManager killed by SIGSEGV
Product: [Fedora] Fedora Reporter: Bastiaan Jacques <bastiaan>
Component: ModemManagerAssignee: Lubomir Rintel <lkundrak>
Status: CLOSED EOL QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 21CC: dcbw
Target Milestone: ---   
Target Release: ---   
Hardware: x86_64   
OS: Unspecified   
URL: https://retrace.fedoraproject.org/faf/reports/bthash/bd64860b74b9dccf0cbe563de7be502a4b2fccc0
Whiteboard: abrt_hash:4432a272b65c6b41ba2391cca66523c4a7a7d41c
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2015-12-02 06:38:37 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: exploitable
none
File: limits
none
File: maps
none
File: open_fds
none
File: proc_pid_status
none
Fix none

Description Bastiaan Jacques 2014-12-30 13:04:11 UTC
Description of problem:
Plugged in a Firefox OS device. I received some notifications about an inability to mount an MTP device. The notification did not indicate from which program it originated. Then I was informed of the ModemManager crash by ABRT.

Version-Release number of selected component:
ModemManager-1.4.0-1.fc21

Additional info:
reporter:       libreport-2.3.0
backtrace_rating: 4
cmdline:        /usr/sbin/ModemManager
crash_function: __strcmp_sse2_unaligned
executable:     /usr/sbin/ModemManager
kernel:         3.17.7-300.fc21.x86_64
runlevel:       N 5
type:           CCpp
uid:            0

Truncated backtrace:
Thread no. 1 (9 frames)
 #0 __strcmp_sse2_unaligned at ../sysdeps/x86_64/multiarch/strcmp-sse2-unaligned.S:29
 #1 g_str_equal at ghash.c:1776
 #2 mm_plugin_supports_port at mm-plugin.c:711
 #3 port_probe_context_step at mm-plugin-manager.c:587
 #4 g_cclosure_marshal_VOID__OBJECTv at gmarshal.c:1312
 #5 _g_closure_invoke_va at gclosure.c:831
 #8 mm_device_grab_port at mm-device.c:328
 #9 device_added at mm-base-manager.c:347
 #14 monitor_event at /lib64/libgudev-1.0.so.0

Comment 1 Bastiaan Jacques 2014-12-30 13:04:13 UTC
Created attachment 974385 [details]
File: backtrace

Comment 2 Bastiaan Jacques 2014-12-30 13:04:14 UTC
Created attachment 974386 [details]
File: cgroup

Comment 3 Bastiaan Jacques 2014-12-30 13:04:16 UTC
Created attachment 974387 [details]
File: core_backtrace

Comment 4 Bastiaan Jacques 2014-12-30 13:04:17 UTC
Created attachment 974388 [details]
File: dso_list

Comment 5 Bastiaan Jacques 2014-12-30 13:04:18 UTC
Created attachment 974389 [details]
File: environ

Comment 6 Bastiaan Jacques 2014-12-30 13:04:19 UTC
Created attachment 974390 [details]
File: exploitable

Comment 7 Bastiaan Jacques 2014-12-30 13:04:20 UTC
Created attachment 974391 [details]
File: limits

Comment 8 Bastiaan Jacques 2014-12-30 13:04:21 UTC
Created attachment 974392 [details]
File: maps

Comment 9 Bastiaan Jacques 2014-12-30 13:04:22 UTC
Created attachment 974393 [details]
File: open_fds

Comment 10 Bastiaan Jacques 2014-12-30 13:04:23 UTC
Created attachment 974394 [details]
File: proc_pid_status

Comment 11 Bastiaan Jacques 2014-12-30 13:23:37 UTC
I think this is likely caused by glib API misuse. The crash origin is:

  g_str_equal (mm_device_utils_get_port_driver (port), "qmi_wwan")

mm_device_utils_get_port_driver() is apparently intended to return a NULL-terminated string and this call is intended to compare the two strings. However, we can read in the glib documentation that g_str_equal():

"... is primarily meant as a hash table comparison function. For a general-purpose, NULL-safe string comparison function, see g_strcmp0()."

And as it turns out, mm_device_utils_get_port_driver() can in fact return NULL. So it seems to me this bug can be fixed simply by substituting the calls to  g_str_equal() with g_strcmp0(), taking care to compare the result of the latter to zero for equality.

Comment 12 Bastiaan Jacques 2014-12-30 13:39:56 UTC
Created attachment 974406 [details]
Fix

As described above.

I rebuilt the ModemManager rpms with this patch and with them installed I don't receive notifications about ModemManager crashing when I plug the device in.

Comment 13 Fedora Admin XMLRPC Client 2015-08-18 14:53:48 UTC
This package has changed ownership in the Fedora Package Database.  Reassigning to the new owner of this component.

Comment 14 Fedora End Of Life 2015-11-04 10:49:39 UTC
This message is a reminder that Fedora 21 is nearing its end of life.
Approximately 4 (four) weeks from now Fedora will stop maintaining
and issuing updates for Fedora 21. It is Fedora's policy to close all
bug reports from releases that are no longer maintained. At that time
this bug will be closed as EOL if it remains open with a Fedora  'version'
of '21'.

Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, simply change the 'version' 
to a later Fedora version.

Thank you for reporting this issue and we are sorry that we were not 
able to fix it before Fedora 21 is end of life. If you would still like 
to see this bug fixed and are able to reproduce it against a later version 
of Fedora, you are encouraged  change the 'version' to a later Fedora 
version prior this bug is closed as described in the policy above.

Although we aim to fix as many bugs as possible during every release's 
lifetime, sometimes those efforts are overtaken by events. Often a 
more recent Fedora release includes newer upstream software that fixes 
bugs or makes them obsolete.

Comment 15 Fedora End Of Life 2015-12-02 06:38:39 UTC
Fedora 21 changed to end-of-life (EOL) status on 2015-12-01. Fedora 21 is
no longer maintained, which means that it will not receive any further
security or bug fix updates. As a result we are closing this bug.

If you can reproduce this bug against a currently maintained version of
Fedora please feel free to reopen this bug against that version. If you
are unable to reopen this bug, please file a new report against the
current release. If you experience problems, please add a comment to this
bug.

Thank you for reporting this bug and we are sorry it could not be fixed.