Bug 614057

Summary: [abrt] crash in get_permissions_cb()
Product: Red Hat Enterprise Linux 6 Reporter: Vladimir Benes <vbenes>
Component: NetworkManagerAssignee: Dan Williams <dcbw>
Status: CLOSED CURRENTRELEASE QA Contact: desktop-bugs <desktop-bugs>
Severity: medium Docs Contact:
Priority: low    
Version: 6.0CC: dcbw, dematron1986, dgunchev, james.brown, jklimes, matteopacini.informatica, mnowak, rlat, vbenes
Target Milestone: rc   
Target Release: ---   
Hardware: x86_64   
OS: Linux   
Whiteboard: abrt_hash:74d448e22426bedac1cf6b26c1ee094011b105c5
Fixed In Version: NetworkManager-0.8.1-3.el6 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: 603566 Environment:
Last Closed: 2010-11-10 19:31:47 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On: 603566    
Bug Blocks:    

Description Vladimir Benes 2010-07-13 15:35:52 UTC
+++ This bug was initially created as a clone of Bug #603566 +++

abrt 1.1.1 detected a crash.

architecture: i686
Attached file: backtrace
cmdline: /usr/bin/nm-connection-editor --type vpn
component: NetworkManager
crash_function: get_permissions_cb
executable: /usr/bin/nm-connection-editor
global_uuid: 74d448e22426bedac1cf6b26c1ee094011b105c5
kernel: 2.6.33.5-112.fc13.i686
package: NetworkManager-gnome-1:0.8.1-0.1.git20100510.fc13
rating: 4
reason: Process /usr/bin/nm-connection-editor was killed by signal 11 (SIGSEGV)
release: Fedora release 13 (Goddard)

How to reproduce
-----
1. Left-click NM
2. Go to VPN Connections->Configure VPN
3. Before the list of VPN connections has been displayed prexx [x] (the close button)

--- Additional comment from gunchev on 2010-06-13 17:49:18 EDT ---

Created an attachment (id=423695)
File: backtrace

--- Additional comment from dcbw on 2010-06-28 17:04:33 EDT ---

in ce-polkit-button.c we should allocate a structure that contains a pointer to the CEPolkitButton object and a boolean 'disposed' variable, and add that structure to a GSList in the private data of the CEPolkitButton, and pass that structure as the user data to nm_settings_system_interface_get_permissions().  Then in get_permissions_cb() we check the disposed member of that structure (which gets passed in as user data) and if it's disposed, we free the structure and return.  If it's not disposed, process as normal, remove the structure from priv->permissions_calls GSList, and free the structure.  In the CEPolkitButton dispose/finalize handler, run through the GSList of these structures and set 'disposed' to TRUE for each one (but *don't* free the structures since that has to happen in get_permissions_cb()).

--- Additional comment from dcbw on 2010-06-28 19:07:34 EDT ---

*** Bug 577000 has been marked as a duplicate of this bug. ***

--- Additional comment from dcbw on 2010-06-28 19:19:02 EDT ---

*** Bug 573208 has been marked as a duplicate of this bug. ***

--- Additional comment from dcbw on 2010-06-28 19:34:28 EDT ---

Upstream fix:

5978047977a17f35d9a3961023143506a73899f8 (master)
0d9a1ec1baa734187d1521ff213c11ddf6dcb3b1 (0.8.1)

--- Additional comment from jklimes on 2010-07-07 12:01:12 EDT ---

(In reply to comment #5)
> Upstream fix:
> 
> 5978047977a17f35d9a3961023143506a73899f8 (master)
> 0d9a1ec1baa734187d1521ff213c11ddf6dcb3b1 (0.8.1)    

These fixes missed adding the PermInfo structure to the GSlist in CEPolkitButton
priv data. That causes a crash when changing a system connection.

Corrected upstream fix:
9737403b155d303cffbd08fe4a84c510ac995c8b (master)
d1ed64f36588c953025972b73677a6c3af2d178f (0.8.1)

Nevertheless, I think the code is still not completely correct and needs deeper inspection.
The corrections try to prevent usage of disposed object in get_permissions_cb() and it works using 'info->disposed' flag. However, the issue is that get_permissions() is called even after finalize() and thus the CEPolkitButton object is officially 'dead' and should not be used any more.
Another doubt, do we need a perm_calls GSList at all?

--- Additional comment from dcbw on 2010-07-12 18:06:51 EDT ---

*** Bug 610760 has been marked as a duplicate of this bug. ***

--- Additional comment from dcbw on 2010-07-12 18:12:28 EDT ---

*** Bug 613486 has been marked as a duplicate of this bug. ***

--- Additional comment from vbenes on 2010-07-13 11:32:04 EDT ---

Package: NetworkManager-gnome-1:0.8.1-2.el6
Architecture: x86_64
OS Release: Red Hat Enterprise Linux Server release 6.0 Beta (Santiago)


How to reproduce
-----
1.I've created wpa network via nm-applet -> create new wireless network
2.while it was connecting I went into nm-c-e and edited the profile to add available to other users
3.entering root password - > crash

NetworkManager-0.8.1-2.el6.x86_64

Comment 2 Dan Williams 2010-07-14 20:52:25 UTC
Fixed in NetworkManager-0.8.1-3.el6

Comment 4 Radek Lat 2010-08-19 09:40:18 UTC
Tested and Verified on NetworkManager-0.8.1-5.el6.x86_64, moving to VERIFIED.

Comment 5 releng-rhel@redhat.com 2010-11-10 19:31:47 UTC
Red Hat Enterprise Linux 6.0 is now available and should resolve
the problem described in this bug report. This report is therefore being closed
with a resolution of CURRENTRELEASE. You may reopen this bug report if the
solution does not work for you.