[network]: gnome-control-center SIGSEGV in append_escaped_text() (invalid utf8 ssid name)

Bug #1198315 reported by Cedric
36
This bug affects 6 people
Affects Status Importance Assigned to Milestone
gnome-control-center
Expired
Medium
gnome-control-center (Ubuntu)
Fix Released
Medium
Mathieu Trudel-Lapierre
Saucy
Fix Released
Medium
Mathieu Trudel-Lapierre

Bug Description

[Impact]
Any user who tries to open the gnome-control-center, having a wireless network with extended characters (such as ö, ü, etc.) in range, or saved in connections in NetworkManager.

[Test Case]
1) With a wireless network in range or saved, named "üö" or with any such character in the SSID, try to open gnome-control-center network panel.

With the patch, the panel opens.
Without the patch, the panel doesn't open, gnome-control-center crashes.

[Regression Potential]
This changes the way the wireless network SSIDs are displayed in the UI. They will retain the method in which they are sorted, but in the event that multiple SSIDs with very similar names but with a different, complex character in the name in the same location (e.g. ABC vs. ABX, if C and X were special characters), they would both show with ? in place of any special character that cannot be represented in UTF-8. In the previous example; ABC and ABX would be in the right order, but both would be displayed as "AB?".

---

Got this on saucy

ProblemType: Crash
DistroRelease: Ubuntu 13.10
Package: gnome-control-center 1:3.6.3-0ubuntu29
ProcVersionSignature: Ubuntu 3.10.0-2.9-generic 3.10.0
Uname: Linux 3.10.0-2-generic x86_64
ApportVersion: 2.10.2-0ubuntu3
Architecture: amd64
CrashCounter: 1
Date: Fri Jul 5 21:43:59 2013
ExecutablePath: /usr/bin/gnome-control-center
InstallationDate: Installed on 2013-03-14 (113 days ago)
InstallationMedia: Ubuntu 12.04.2 LTS "Precise Pangolin" - Release amd64 (20130213)
MarkForUpload: True
ProcCmdline: gnome-control-center
SegvAnalysis:
 Segfault happened at: 0x7f9814028a20 <g_markup_escape_text+80>: movzbl (%rbx),%eax
 PC (0x7f9814028a20) ok
 source "(%rbx)" (0x7f97df5a8000) in non-readable VMA region: 0x7f97df5a8000-0x7f97df7a7000 ---p /usr/lib/libnm-gtk.so.0.0.0
 destination "%eax" ok
SegvReason: reading VMA /usr/lib/libnm-gtk.so.0.0.0
Signal: 11
SourcePackage: gnome-control-center
StacktraceTop:
 g_markup_escape_text () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
 ?? () from /usr/lib/control-center-1/panels/libnetwork.so
 ?? () from /usr/lib/control-center-1/panels/libnetwork.so
 g_closure_invoke () from /usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0
 ?? () from /usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0
Title: [network]: gnome-control-center crashed with SIGSEGV in g_markup_escape_text()
UpgradeStatus: No upgrade log present (probably fresh install)
UserGroups: adm cdrom dip lp lpadmin plugdev sambashare sudo
usr_lib_gnome-control-center:
 activity-log-manager 0.9.6-0ubuntu1
 deja-dup 27.3.1-0ubuntu1
 gnome-control-center-signon 0.1.7~+13.10.20130625-0ubuntu1
 gnome-control-center-unity 1.3daily13.06.14.1-0ubuntu1

Revision history for this message
Cedric (cedric-brandenbourger-deactivatedaccount-deactivatedaccount) wrote :
Revision history for this message
Apport retracing service (apport) wrote :

StacktraceTop:
 append_escaped_text (length=<optimized out>, text=<optimized out>, str=0x7f9816ba8f80) at /build/buildd/glib2.0-2.37.3/./glib/gmarkup.c:2148
 g_markup_escape_text (text=text@entry=0x7f97df57dec0 <escaped.16720> "B\374ro", length=<optimized out>, length@entry=-1) at /build/buildd/glib2.0-2.37.3/./glib/gmarkup.c:2224
 add_saved_connection (nm_device=<optimized out>, connection=0x7f9800003f00, device_wifi=0x7f9816df66d0) at net-device-wifi.c:535
 device_wifi_refresh_saved_connections (device_wifi=device_wifi@entry=0x7f9816df66d0) at net-device-wifi.c:582
 remote_settings_read_cb (remote_settings=<optimized out>, device_wifi=0x7f9816df66d0) at net-device-wifi.c:1787

Revision history for this message
Apport retracing service (apport) wrote : Stacktrace.txt
Revision history for this message
Apport retracing service (apport) wrote : ThreadStacktrace.txt
Changed in gnome-control-center (Ubuntu):
importance: Undecided → Medium
summary: [network]: gnome-control-center crashed with SIGSEGV in
- g_markup_escape_text()
+ append_escaped_text()
tags: removed: need-amd64-retrace
information type: Private → Public
Revision history for this message
Launchpad Janitor (janitor) wrote : Re: [network]: gnome-control-center crashed with SIGSEGV in append_escaped_text()

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in gnome-control-center (Ubuntu):
status: New → Confirmed
Revision history for this message
Stéphane Guillou (stephane-guillou) wrote :

How are people affected by this?
For me:
Gnome control center ("System settings") crashes systematically shortly after opening the Network settings, making it impossible to configure anything network-related, at least through the GUI.

Is that the right bug?

Revision history for this message
Sebastien Bacher (seb128) wrote :

the issue there seems to be that one of the ssid has a non utf-8 value name

Revision history for this message
Sebastien Bacher (seb128) wrote :

Hey Mathieu, could you check if that's a nm issue?

the g-c-c code is

" ssid = nm_setting_wireless_get_ssid (NM_SETTING_WIRELESS (setting));
        ssid_text = nm_utils_escape_ssid (ssid->data, ssid->len);
        title = g_markup_escape_text (ssid_text, -1);"

where the glib function is hitting an error because ssid_text seems invalid utf ... is nm_setting_wireless_get_ssid() supposed to return valid utf8 names?

summary: - [network]: gnome-control-center crashed with SIGSEGV in
- append_escaped_text()
+ [network]: gnome-control-center SIGSEGV in append_escaped_text()
+ (invalid utf8 ssid name)
Changed in gnome-control-center (Ubuntu):
assignee: nobody → Mathieu Trudel-Lapierre (mathieu-tl)
Revision history for this message
Sebastien Bacher (seb128) wrote :

could user having the issue run "nmcli dev wifi list" and share the list/give details on what is listed and if a name in there seems non standard/weird encoding?

Revision history for this message
Mathieu Trudel-Lapierre (cyphermox) wrote :

I uploaded a patch that seems to work for me (when trying with a local ad-hoc network setup with the same characters for testing).

It's in my PPA; it would be nice if someone else could confirm that it helps:

ppa:mathieu-tl/sru-staging

(https://launchpad.net/~mathieu-tl/+archive/sru-staging/+sourcepub/3670627/+listing-archive-extra)

The packages should be ready in about an hour.

Revision history for this message
Stéphane Guillou (stephane-guillou) wrote :

Hi Sebastien

This is what I get when running "nmcli dev wifi list":

SSID BSSID MODE FREQ RATE SIGNAL SECURITY ACTIVE
'JoinEduroam' 00:25:45:37:1C:40 Infrastructure 2437 MHz 54 MB/s 77 -- no
'JoinEduroam' 00:25:45:A3:47:70 Infrastructure 2412 MHz 54 MB/s 29 -- no
'eduroam' 00:25:45:37:1C:41 Infrastructure 2437 MHz 54 MB/s 100 WPA WPA2 Enterprise no
'Visitor-UQconnect' 00:25:45:A3:49:F2 Infrastructure 2412 MHz 54 MB/s 35 -- no
'JoinEduroam' 00:25:45:A3:49:F0 Infrastructure 2412 MHz 54 MB/s 35 -- no
'eduroam' 00:25:45:A3:F3:61 Infrastructure 2412 MHz 54 MB/s 49 WPA WPA2 Enterprise no
'eduroam' 00:25:45:A3:47:71 Infrastructure 2412 MHz 54 MB/s 30 WPA WPA2 Enterprise no
'eduroam' 00:25:45:A3:49:61 Infrastructure 2462 MHz 54 MB/s 32 WPA WPA2 Enterprise no
'JoinEduroam' 00:25:45:A3:49:60 Infrastructure 2462 MHz 54 MB/s 32 -- no
'Visitor-UQconnect' 00:25:45:A3:F3:62 Infrastructure 2412 MHz 54 MB/s 40 -- no
'Visitor-UQconnect' 00:25:45:A3:47:72 Infrastructure 2412 MHz 54 MB/s 40 -- no
'JoinEduroam' 00:25:45:A3:F3:60 Infrastructure 2412 MHz 54 MB/s 40 -- no
'eduroam' 00:25:45:A3:49:F1 Infrastructure 2412 MHz 54 MB/s 54 WPA WPA2 Enterprise yes
'eduroam' 00:25:45:A4:35:91 Infrastructure 2462 MHz 54 MB/s 30 WPA WPA2 Enterprise no
'Visitor-UQconnect' 00:25:45:37:1C:42 Infrastructure 2437 MHz 54 MB/s 70 -- no
'JoinEduroam' 00:25:45:A4:35:90 Infrastructure 2462 MHz 54 MB/s 32 -- no

However, something that is not visible here is a network with a weird name in my network list when I go in "Network indicator > Edit Connections..." (see attachment).
I just deleted this network and then I could get into "System settings... > Network" without it crashing !

Revision history for this message
Sebastien Bacher (seb128) wrote :

hum, shame that you deleted it before testing the ppa package to see if it fixed the issue :/

I guess you don't know how to add it back to test if the fix is working?

Revision history for this message
Mathieu Trudel-Lapierre (cyphermox) wrote :

Well, it's expected that when that network connection gets removed, g-c-c starts properly - it will try to parse existing connections and then list networks in range.

I'll go ahead and upload the fix I have, I'm reasonably confident it fixes the issue.

Changed in gnome-control-center:
importance: Unknown → Medium
status: Unknown → New
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package gnome-control-center - 1:3.6.3-0ubuntu47

---------------
gnome-control-center (1:3.6.3-0ubuntu47) trusty; urgency=low

  * debian/patches/sanitize_ssid_convert_utf8.patch: make sure we properly
    convert the SSID to UTF-8 where possible; using nm_utils_ssid_to_utf8(),
    rather than nm_utils_escape_ssid() which isn't meant to be used that way.
    (LP: #1198315)
 -- Mathieu Trudel-Lapierre <email address hidden> Wed, 20 Nov 2013 10:53:01 -0500

Changed in gnome-control-center (Ubuntu):
status: Confirmed → Fix Released
Changed in gnome-control-center (Ubuntu Saucy):
importance: Undecided → Medium
status: New → In Progress
assignee: nobody → Mathieu Trudel-Lapierre (mathieu-tl)
description: updated
Revision history for this message
Stéphane Graber (stgraber) wrote : Please test proposed package

Hello Cedric, or anyone else affected,

Accepted gnome-control-center into saucy-proposed. The package will build now and be available at http://launchpad.net/ubuntu/+source/gnome-control-center/1:3.6.3-0ubuntu45.2 in a few hours, and then in the -proposed repository.

Please help us by testing this new package. See https://wiki.ubuntu.com/Testing/EnableProposed for documentation how to enable and use -proposed. Your feedback will aid us getting this update out to other Ubuntu users.

If this package fixes the bug for you, please add a comment to this bug, mentioning the version of the package you tested, and change the tag from verification-needed to verification-done. If it does not fix the bug for you, please add a comment stating that, and change the tag to verification-failed. In either case, details of your testing will help us make a better decision.

Further information regarding the verification process can be found at https://wiki.ubuntu.com/QATeam/PerformingSRUVerification . Thank you in advance!

Changed in gnome-control-center (Ubuntu Saucy):
status: In Progress → Fix Committed
tags: added: verification-needed
Revision history for this message
Sebastien Bacher (seb128) wrote :

https://errors.ubuntu.com/problem/d4dca166eaf87c44dbf3be978e9d7520bc7f5586 seems to indicator the fix is working (no new report with the versions with the change), setting to verification done

tags: added: verification-done
removed: verification-needed
Revision history for this message
Stéphane Graber (stgraber) wrote : Update Released

The verification of this Stable Release Update has completed successfully and the package has now been released to -updates. Subsequently, the Ubuntu Stable Release Updates Team is being unsubscribed and will not receive messages about this bug report. In the event that you encounter a regression using the package from -updates please report a new bug using ubuntu-bug and tag the bug report regression-update so we can easily find any regresssions.

Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package gnome-control-center - 1:3.6.3-0ubuntu45.2

---------------
gnome-control-center (1:3.6.3-0ubuntu45.2) saucy-proposed; urgency=low

  * debian/patches/sanitize_ssid_convert_utf8.patch: make sure we properly
    convert the SSID to UTF-8 where possible; using nm_utils_ssid_to_utf8(),
    rather than nm_utils_escape_ssid() which isn't meant to be used that way.
    (LP: #1198315)
 -- Mathieu Trudel-Lapierre <email address hidden> Tue, 19 Nov 2013 17:41:12 -0500

Changed in gnome-control-center (Ubuntu Saucy):
status: Fix Committed → Fix Released
Changed in gnome-control-center:
status: New → Confirmed
Changed in gnome-control-center:
status: Confirmed → Expired
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.