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 788104 - In "nmcli connection edit" describe . results in a segmentation fault
In "nmcli connection edit" describe . results in a segmentation fault
Status: RESOLVED FIXED
Product: NetworkManager
Classification: Platform
Component: nmcli
1.8.x
Other Linux
: High critical
: ---
Assigned To: NetworkManager maintainer(s)
NetworkManager maintainer(s)
Depends on:
Blocks:
 
 
Reported: 2017-09-24 17:15 UTC by Jonathan Birk
Modified: 2017-09-26 13:24 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
proposed patch (887 bytes, patch)
2017-09-25 17:40 UTC, Jonathan Birk
none Details | Review

Description Jonathan Birk 2017-09-24 17:15:35 UTC
When asked to describe . in editor the application crashes with a segmentation fault.

to reproduce start run 
nmcli connection edit
then choose any connection type and enter
describe .
Comment 1 André Klapper 2017-09-24 19:39:11 UTC
Thanks for taking the time to report this.
Without a stack trace from the crash it's very hard to determine what caused it.
Can you get us a stack trace? Please see https://wiki.gnome.org/Community/GettingInTouch/Bugzilla/GettingTraces for more information on how to do so. When pasting a stack trace in this bug report, please reset the status of this bug report from NEEDINFO to its previous status. Thanks in advance!
Comment 2 Thomas Haller 2017-09-25 10:32:15 UTC
I think with the present decription how to reproduce the issue, it's clear what's wrong.

Please review th/cli-interactive-mode-crash-bgo788104
Comment 3 Jonathan Birk 2017-09-25 17:40:03 UTC
Created attachment 360371 [details] [review]
proposed patch

if we check for null here we can avoid the segfault and provide useful information to the user
Comment 4 Beniamino Galvani 2017-09-26 12:44:15 UTC
(In reply to Thomas Haller from comment #2)
> I think with the present decription how to reproduce the issue, it's clear
> what's wrong.
> 
> Please review th/cli-interactive-mode-crash-bgo788104

Ack.
Comment 5 Thomas Haller 2017-09-26 13:24:08 UTC
(In reply to Jonathan Birk from comment #3)
> Created attachment 360371 [details] [review] [review]
> proposed patch
> 
> if we check for null here we can avoid the segfault and provide useful
> information to the user

Thanks Jonathan. Your patch is quite similar to what I did in comment 2.

(In reply to Beniamino Galvani from comment #4)
> (In reply to Thomas Haller from comment #2)
> > I think with the present decription how to reproduce the issue, it's clear
> > what's wrong.
> > 
> > Please review th/cli-interactive-mode-crash-bgo788104
> 
> Ack.

I merged the two patches from comment 2 to master: https://cgit.freedesktop.org/NetworkManager/NetworkManager/commit/?id=4ca2e1b10c1ce57c20c3d3e9464a170e98525688

And backported the fix for the crash to nm-1-8: https://cgit.freedesktop.org/NetworkManager/NetworkManager/commit/?id=b18ff17d3d4495722745c701826880bf14672827