Bug 1243078 - nm_utils_ssid_to_utf8 returns NULL when LANG is not set
Summary: nm_utils_ssid_to_utf8 returns NULL when LANG is not set
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: NetworkManager
Version: 23
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Lubomir Rintel
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2015-07-14 18:10 UTC by David Shea
Modified: 2015-10-04 22:52 UTC (History)
4 users (show)

Fixed In Version: NetworkManager-1.0.6-6.fc22
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2015-10-04 22:52:43 UTC


Attachments (Terms of Use)
backtrace (9.97 KB, text/plain)
2015-07-14 18:10 UTC, David Shea
no flags Details
handle illegal characters in nm_utils_ssid_to_utf8() (2.42 KB, patch)
2015-07-14 19:36 UTC, David Shea
no flags Details | Diff

Description David Shea 2015-07-14 18:10:03 UTC
Created attachment 1051947 [details]
backtrace

This is a problem when attempting to activate a wifi connection with a non-ascii, non-utf8 SSID via dbus, because NetworkManager will crash with SIGABRT. Backtrace of such a situation attached: things go wrong in complete_connection when it tries to call nm_utils_complete_generic with a NULL ssid.

The environ of the process contains only two variables: PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin and GIO_USE_VFS=local

Here's a simpler reproducer:

dshea@spectre:~$ unset LANG
dshea@spectre:~$ python3
Python 3.4.3 (default, Jun 29 2015, 12:16:01) 
[GCC 5.1.1 20150618 (Red Hat 5.1.1-4)] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import gi
>>> gi.require_version('NetworkManager', '1.0') 
>>> from gi.repository import NetworkManager
>>> print(NetworkManager.utils_ssid_to_utf8(b'test\xedng'))
None


Version-Release number of selected component (if applicable):
NetworkManager-1.0.4-0.5.git20150713.38bf2cb0.fc23.x86_64

How reproducible:
Always

Comment 1 David Shea 2015-07-14 19:36:52 UTC
Created attachment 1051994 [details]
handle illegal characters in nm_utils_ssid_to_utf8()

The problem is that in such a case, the final attempt to convert the string ends up being:

g_convert_with_fallback(ssid, len, "UTF-8", "ANSI_X3.4-1968", "?", NULL, NULL, NULL);

and that will fail if ssid has non-ascii characters. Attached a patch to add another fallback if g_covert_with_fallback fails.

Comment 2 Jan Kurik 2015-07-15 13:16:39 UTC
This bug appears to have been reported against 'rawhide' during the Fedora 23 development cycle.
Changing version to '23'.

(As we did not run this process for some time, it could affect also pre-Fedora 23 development
cycle bugs. We are very sorry. It will help us with cleanup during Fedora 23 End Of Life. Thank you.)

More information and reason for this action is here:
https://fedoraproject.org/wiki/BugZappers/HouseKeeping/Fedora23

Comment 3 Jirka Klimes 2015-07-16 12:26:32 UTC
Commited upstream:
master: 568b4ad libnm: handle illegal characters in nm_utils_ssid_to_utf8() (rh #1243078)
nm-1-0: bfb6c78 libnm: handle illegal characters in nm_utils_ssid_to_utf8() (rh #1243078)

Thanks, David!

Comment 4 Fedora Update System 2015-08-13 16:04:00 UTC
network-manager-applet-1.0.4-2.fc22, NetworkManager-1.0.6-0.1.20150813git7e2caa2.fc22 has been submitted as an update for Fedora 22.
https://admin.fedoraproject.org/updates/FEDORA-2015-10143/NetworkManager-1.0.6-0.1.20150813git7e2caa2.fc22,network-manager-applet-1.0.4-2.fc22

Comment 5 Fedora Update System 2015-08-15 02:19:08 UTC
Package network-manager-applet-1.0.4-2.fc22, NetworkManager-1.0.6-0.1.20150813git7e2caa2.fc22:
* should fix your issue,
* was pushed to the Fedora 22 testing repository,
* should be available at your local mirror within two days.
Update it with:
# su -c 'yum update --enablerepo=updates-testing network-manager-applet-1.0.4-2.fc22 NetworkManager-1.0.6-0.1.20150813git7e2caa2.fc22'
as soon as you are able to, then reboot.
Please go to the following url:
https://admin.fedoraproject.org/updates/FEDORA-2015-10143/NetworkManager-1.0.6-0.1.20150813git7e2caa2.fc22,network-manager-applet-1.0.4-2.fc22
then log in and leave karma (feedback).

Comment 6 Fedora Admin XMLRPC Client 2015-08-18 15:00:55 UTC
This package has changed ownership in the Fedora Package Database.  Reassigning to the new owner of this component.

Comment 7 Fedora Admin XMLRPC Client 2015-08-18 15:01:04 UTC
This package has changed ownership in the Fedora Package Database.  Reassigning to the new owner of this component.

Comment 8 Fedora Update System 2015-08-19 08:08:17 UTC
Package network-manager-applet-1.0.4-2.fc22, NetworkManager-1.0.6-0.2.20150813git7e2caa2.fc22:
* should fix your issue,
* was pushed to the Fedora 22 testing repository,
* should be available at your local mirror within two days.
Update it with:
# su -c 'yum update --enablerepo=updates-testing network-manager-applet-1.0.4-2.fc22 NetworkManager-1.0.6-0.2.20150813git7e2caa2.fc22'
as soon as you are able to, then reboot.
Please go to the following url:
https://admin.fedoraproject.org/updates/FEDORA-2015-10143/NetworkManager-1.0.6-0.2.20150813git7e2caa2.fc22,network-manager-applet-1.0.4-2.fc22
then log in and leave karma (feedback).

Comment 9 Fedora Update System 2015-08-22 02:52:20 UTC
NetworkManager-1.0.6-0.2.20150813git7e2caa2.fc22, network-manager-applet-1.0.4-2.fc22 has been pushed to the Fedora 22 testing repository. If problems still persist, please make note of it in this bug report.\nIf you want to test the update, you can install it with \n su -c 'yum --enablerepo=updates-testing update NetworkManager network-manager-applet'. You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2015-10143

Comment 10 Fedora Update System 2015-08-23 01:49:24 UTC
NetworkManager-1.0.6-0.2.20150813git7e2caa2.fc22, network-manager-applet-1.0.4-2.fc22 has been pushed to the Fedora 22 testing repository. If problems still persist, please make note of it in this bug report.\nIf you want to test the update, you can install it with \n su -c 'yum --enablerepo=updates-testing update network-manager-applet NetworkManager'. You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2015-10143

Comment 11 Fedora Update System 2015-09-02 16:22:00 UTC
NetworkManager-1.0.6-2.fc22, NetworkManager-openswan-1.0.6-2.fc22, NetworkManager-openvpn-1.0.6-3.fc22, NetworkManager-vpnc-1.0.6-3.fc22, network-manager-applet-1.0.6-2.fc22 has been pushed to the Fedora 22 testing repository. If problems still persist, please make note of it in this bug report.\nIf you want to test the update, you can install it with \n su -c 'yum --enablerepo=updates-testing update network-manager-applet NetworkManager-openvpn NetworkManager-vpnc NetworkManager NetworkManager-openswan'. You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2015-10143

Comment 12 Fedora Update System 2015-09-08 11:15:05 UTC
NetworkManager-1.0.6-3.fc22 NetworkManager-openswan-1.0.6-2.fc22 NetworkManager-openvpn-1.0.6-3.fc22 NetworkManager-vpnc-1.0.6-3.fc22 network-manager-applet-1.0.6-2.fc22 has been submitted as an update to Fedora 22. https://bodhi.fedoraproject.org/updates/FEDORA-2015-10143

Comment 13 Fedora Update System 2015-09-08 21:26:42 UTC
NetworkManager-1.0.6-4.fc22, NetworkManager-openswan-1.0.6-2.fc22, NetworkManager-openvpn-1.0.6-3.fc22, NetworkManager-vpnc-1.0.6-3.fc22, network-manager-applet-1.0.6-2.fc22 has been pushed to the Fedora 22 testing repository. If problems still persist, please make note of it in this bug report.\nIf you want to test the update, you can install it with \n su -c 'yum --enablerepo=updates-testing update network-manager-applet NetworkManager NetworkManager-openvpn NetworkManager-openswan NetworkManager-vpnc'. You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2015-10143

Comment 14 Fedora Update System 2015-09-28 21:00:51 UTC
NetworkManager-1.0.6-6.fc22 NetworkManager-openswan-1.0.6-2.fc22 NetworkManager-openvpn-1.0.6-3.fc22 NetworkManager-vpnc-1.0.6-3.fc22 network-manager-applet-1.0.6-2.fc22 has been submitted as an update to Fedora 22. https://bodhi.fedoraproject.org/updates/FEDORA-2015-10143

Comment 15 Fedora Update System 2015-10-02 03:49:26 UTC
NetworkManager-1.0.6-6.fc22, NetworkManager-openswan-1.0.6-2.fc22, NetworkManager-openvpn-1.0.6-3.fc22, NetworkManager-vpnc-1.0.6-3.fc22, network-manager-applet-1.0.6-2.fc22 has been pushed to the Fedora 22 testing repository. If problems still persist, please make note of it in this bug report.
If you want to test the update, you can install it with
$ su -c 'dnf --enablerepo=updates-testing update NetworkManager-openswan network-manager-applet NetworkManager NetworkManager-openvpn NetworkManager-vpnc'
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2015-10143

Comment 16 Fedora Update System 2015-10-04 22:52:12 UTC
NetworkManager-1.0.6-6.fc22, NetworkManager-openswan-1.0.6-2.fc22, NetworkManager-openvpn-1.0.6-3.fc22, NetworkManager-vpnc-1.0.6-3.fc22, network-manager-applet-1.0.6-2.fc22 has been pushed to the Fedora 22 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.