segfault in create_new_ap_item

Bug #1046210 reported by Patrik Fimml
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
network-manager-applet (Ubuntu)
Fix Released
High
Mathieu Trudel-Lapierre

Bug Description

In certain circumstances, nm-applet can crash in create_new_ap_item. This is caused by the "dupes" variable introduced in debian/patches/nm-applet-use-indicator.patch not being initialized.

Note that I first observed this only with optimizations turned off (-O0), so apparently if one gets lucky, -O2 will cause the variable to be initialized to NULL.

Tags: patch
Revision history for this message
Patrik Fimml (patrikf) wrote :
Revision history for this message
Ubuntu Foundations Team Bug Bot (crichton) wrote :

The attachment "fix_dupes_initialization.patch" of this bug report has been identified as being a patch. The ubuntu-reviewers team has been subscribed to the bug report so that they can review the patch. In the event that this is in fact not a patch you can resolve this situation by removing the tag 'patch' from the bug report and editing the attachment so that it is not flagged as a patch. Additionally, if you are member of the ubuntu-reviewers team please also unsubscribe the team from this bug report.

[This is an automated message performed by a Launchpad user owned by Brian Murray. Please contact him regarding any issues with the action taken in this bug report.]

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

Still wish we had the actual crash dump rather than just a patch -- I guess this makes sense though.

I'll manually debug this just to make sure, but the patch makes sense anyway. I may even have already fixed this if the compiler complained since, assuming that was for prior to quantal.

Could you please confirm exactly which Ubuntu release this was for?

Changed in network-manager-applet (Ubuntu):
status: New → Triaged
importance: Undecided → High
assignee: nobody → Mathieu Trudel-Lapierre (mathieu-tl)
Revision history for this message
Patrik Fimml (patrikf) wrote :

This was for network-manager-applet 0.9.4.1-0ubuntu2.

I don't see how this needs additional verification though. If you don't initialize dupes to NULL and it's not NULL by pure luck then the g_slist_add later is obviously going to fail.

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

Hum, I must have been drunk or something, because it's obviously a correct patch and it should have been included long ago. This doesn't need any further checking. GSLists should be initialized to NULL.

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

Fix Committed since it's now in the bzr branch, will make it with the next release of network-manager-applet or the next bug we fix...

Changed in network-manager-applet (Ubuntu):
status: Triaged → Fix Committed
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package network-manager-applet - 0.9.10.1-0ubuntu2

---------------
network-manager-applet (0.9.10.1-0ubuntu2) vivid; urgency=medium

  * debian/patches/nm-applet-use-indicator.patch: initialize GSList dupes var
    to NULL. Thanks to Patrik Fimml for the patch. (LP: #1046210)
  * debian/patches/rebuild_menu_after_init.patch: use a g_idle_add rather than
    a 30 second timeout, so as to make sure the menu update can't run until
    foo_set_initial_state did. (LP: #1418260)
  * debian/patches/hide_virtual_devices.patch: don't show bridge, bond, team,
    or vlan devices: they were only recently added to NM and nm-applet, and
    given that they are usually not managed, showing them tends to be
    confusing since they are usually the result of underlying software which
    might not expect their state to get changed by NM. (LP: #1423819)
 -- Mathieu Trudel-Lapierre <email address hidden> Wed, 01 Apr 2015 16:59:35 -0400

Changed in network-manager-applet (Ubuntu):
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

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