After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 783839 - "dummy" connections crash the control center
"dummy" connections crash the control center
Status: RESOLVED FIXED
Product: gnome-control-center
Classification: Core
Component: Network
git master
Other Linux
: Normal critical
: ---
Assigned To: Control-Center Maintainers
Control-Center Maintainers
Depends on:
Blocks:
 
 
Reported: 2017-06-15 21:16 UTC by Mantas Mikulėnas (grawity)
Modified: 2017-06-16 17:49 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
network: Avoid crashing if the NMDevice doesn't have a hw-address (880 bytes, patch)
2017-06-16 10:26 UTC, Rui Matos
none Details | Review
network: Avoid crashing if the NMDevice doesn't have a hw-address (1.53 KB, patch)
2017-06-16 17:46 UTC, Rui Matos
committed Details | Review

Description Mantas Mikulėnas (grawity) 2017-06-15 21:16:10 UTC
Just built 3.25.2.r48.g29abc2307, opened the 'Network' panel, and got this:

(gnome-control-center:9540): GLib-GObject-WARNING **: g_object_get_is_valid_property: object class 'NMDeviceDummy' has no property named 'hw-address'
*** Error in `gnome-control-center': double free or corruption (out): 0x00007fffa4cb4b70 ***

Haven't rebuilt with debug symbols yet, but it very reliably crashes whenever a type=dummy connection is active.
Comment 1 Rui Matos 2017-06-16 10:26:16 UTC
Created attachment 353878 [details] [review]
network: Avoid crashing if the NMDevice doesn't have a hw-address

--

Does this make it work?

I'm afraid there might be other crashes for "exotic" device
types. Perhaps we should white list the ones we're interested in
showing...
Comment 2 Mantas Mikulėnas (grawity) 2017-06-16 16:05:40 UTC
Tested the patch, it works.

(Now that I think of it, maybe it's also a NM bug? Dummy interfaces themselves *do* have MAC addresses...)
Comment 3 Rui Matos 2017-06-16 17:46:05 UTC
Created attachment 353908 [details] [review]
network: Avoid crashing if the NMDevice doesn't have a hw-address

The property might not exist and we would g_free() an uninitialized
pointer. Using the proper API avoids all that.
Comment 4 Rui Matos 2017-06-16 17:49:07 UTC
Attachment 353908 [details] pushed as ca667d9 - network: Avoid crashing if the NMDevice doesn't have a hw-address