FS#50891 - [gufw] Segfaults when run as root

Attached to Project: Community Packages
Opened by Jeff Mickey (codemac) - Sunday, 25 September 2016, 21:18 GMT
Last edited by Doug Newgard (Scimmia) - Thursday, 13 October 2016, 16:36 GMT
Task Type Bug Report
Category Packages
Status Closed
Assigned To No-one
Architecture All
Severity High
Priority Normal
Reported Version
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 0
Private No

Details

Description:


Additional info:
* package version(s):
gufw Version : 15.10.0-2
ufw Version : 0.35-2
gtk3 Version : 3.20.9-1
polkit Version : 0.113-4
python2-gobject Version : 3.20.1-1
python2-netifaces Version : 0.10.5-1
webkitgtk Version : 2.4.11-1


* config and/or log files etc.



warning: Could not load shared library symbols for linux-vdso.so.1.
Do you need "set solib-search-path" or "set sysroot"?
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/usr/lib/libthread_db.so.1".
Core was generated by `python2 /usr/lib/python2.7/site-packages/gufw/gufw.py root'.
Program terminated with signal SIGSEGV, Segmentation fault.
#0 0x00007fb3f9bc68f9 in ?? () from /usr/lib/libgtk-3.so.0
(gdb) bt
#0 0x00007fb3f9bc68f9 in ?? () from /usr/lib/libgtk-3.so.0
#1 0x00007fb3f9a6e2a8 in ?? () from /usr/lib/libgtk-3.so.0
#2 0x00007fb3f9a82cf4 in ?? () from /usr/lib/libgtk-3.so.0
#3 0x00007fb3f9a6f5ec in ?? () from /usr/lib/libgtk-3.so.0
#4 0x00007fb3f9a82bdc in ?? () from /usr/lib/libgtk-3.so.0
#5 0x00007fb3f9a82c74 in ?? () from /usr/lib/libgtk-3.so.0
#6 0x00007fb3f9a6ff52 in ?? () from /usr/lib/libgtk-3.so.0
#7 0x00007fb4029c333f in g_type_create_instance () from /usr/lib/libgobject-2.0.so.0
#8 0x00007fb4029a520b in ?? () from /usr/lib/libgobject-2.0.so.0
#9 0x00007fb4029a6c1d in g_object_newv () from /usr/lib/libgobject-2.0.so.0
#10 0x00007fb4029a73d4 in g_object_new () from /usr/lib/libgobject-2.0.so.0
#11 0x00007fb3f9a8affa in ?? () from /usr/lib/libgtk-3.so.0
#12 0x00007fb3f9c5a4e7 in ?? () from /usr/lib/libgtk-3.so.0
#13 0x00007fb4029c333f in g_type_create_instance () from /usr/lib/libgobject-2.0.so.0
#14 0x00007fb4029a520b in ?? () from /usr/lib/libgobject-2.0.so.0
#15 0x00007fb4029a6c1d in g_object_newv () from /usr/lib/libgobject-2.0.so.0
#16 0x00007fb3f9a184c2 in ?? () from /usr/lib/libgtk-3.so.0
#17 0x00007fb3f9a198c5 in ?? () from /usr/lib/libgtk-3.so.0
#18 0x00007fb3f9a1b291 in ?? () from /usr/lib/libgtk-3.so.0
#19 0x00007fb4026ce417 in ?? () from /usr/lib/libglib-2.0.so.0
#20 0x00007fb4026cf243 in g_markup_parse_context_parse () from /usr/lib/libglib-2.0.so.0
#21 0x00007fb3f9a1b686 in ?? () from /usr/lib/libgtk-3.so.0
#22 0x00007fb3f9a157d1 in gtk_builder_add_from_file () from /usr/lib/libgtk-3.so.0
#23 0x00007fb40247e1c8 in ffi_call_unix64 () from /usr/lib/libffi.so.6
#24 0x00007fb40247dc2a in ffi_call () from /usr/lib/libffi.so.6
#25 0x00007fb402e427dc in ?? () from /usr/lib/python2.7/site-packages/gi/_gi.so
#26 0x00007fb402e442a8 in ?? () from /usr/lib/python2.7/site-packages/gi/_gi.so
#27 0x00007fb402e383b9 in ?? () from /usr/lib/python2.7/site-packages/gi/_gi.so
#28 0x00007fb405f05662 in PyObject_Call () from /usr/lib/libpython2.7.so.1.0
#29 0x00007fb405fa2665 in PyEval_EvalFrameEx () from /usr/lib/libpython2.7.so.1.0
#30 0x00007fb405fa6dcc in PyEval_EvalCodeEx () from /usr/lib/libpython2.7.so.1.0
#31 0x00007fb405f2bfab in function_call () from /usr/lib/libpython2.7.so.1.0
#32 0x00007fb405f05662 in PyObject_Call () from /usr/lib/libpython2.7.so.1.0
#33 0x00007fb405f14fba in instancemethod_call () from /usr/lib/libpython2.7.so.1.0
#34 0x00007fb405f05662 in PyObject_Call () from /usr/lib/libpython2.7.so.1.0
#35 0x00007fb405f9cc46 in PyEval_CallObjectWithKeywords () from /usr/lib/libpython2.7.so.1.0
#36 0x00007fb405f15d6f in PyInstance_New () from /usr/lib/libpython2.7.so.1.0
#37 0x00007fb405f05662 in PyObject_Call () from /usr/lib/libpython2.7.so.1.0
#38 0x00007fb405fa2665 in PyEval_EvalFrameEx () from /usr/lib/libpython2.7.so.1.0
#39 0x00007fb405fa6dcc in PyEval_EvalCodeEx () from /usr/lib/libpython2.7.so.1.0
#40 0x00007fb405fa6ed8 in PyEval_EvalCode () from /usr/lib/libpython2.7.so.1.0
#41 0x00007fb405fc135e in run_mod () from /usr/lib/libpython2.7.so.1.0
#42 0x00007fb405fc2621 in PyRun_FileExFlags () from /usr/lib/libpython2.7.so.1.0
#43 0x00007fb405fc3944 in PyRun_SimpleFileExFlags () from /usr/lib/libpython2.7.so.1.0
#44 0x00007fb405fd6150 in Py_Main () from /usr/lib/libpython2.7.so.1.0
#45 0x00007fb40591e291 in __libc_start_main () from /usr/lib/libc.so.6
#46 0x000055ad397e5819 in _start ()



Steps to reproduce:

run gufw, see that policykit gets mad:

; gufw
==== AUTHENTICATING FOR org.freedesktop.policykit.exec ===
Authentication is needed to run `/bin/gufw-pkexec' as the super user
Authenticating as: jmickey
Password:
polkit-agent-helper-1: error response to PolicyKit daemon: GDBus.Error:org.freedesktop.PolicyKit1.Error.Failed: No session for cookie
==== AUTHENTICATION FAILED ===
Error executing command as another user: Not authorized

This incident has been reported.
;

ok fine, let's run it as root

sudo gufw

Then it coredumps as above.
This task depends upon

Closed by  Doug Newgard (Scimmia)
Thursday, 13 October 2016, 16:36 GMT
Reason for closing:  Not a bug
Additional comments about closing:  Likely settings issue.
Comment by Doug Newgard (Scimmia) - Thursday, 29 September 2016, 15:02 GMT
This is likely a settings issue. Are you using dbus-launch anywhere at all? What WM/DE?
Comment by Jeff Mickey (codemac) - Friday, 07 October 2016, 23:20 GMT
Sorry I didn't respond in 6 days.

I don't call dbus-launch anywhere, for this repro, I just logged in as a test user, and did startx, and then ran gufw. Then I tried sudo gufw, and it did this.
Comment by Doug Newgard (Scimmia) - Friday, 07 October 2016, 23:23 GMT
The fact that gufw-pkexec exists tells me you should be using that, not sudo. sudo on graphical applications is always a craps shoot.

The error indicates a dbus problem. What is DBUS_SESSION_BUS_ADDRESS set to?
Comment by Jeff Mickey (codemac) - Monday, 10 October 2016, 18:28 GMT
It's set to nothing, I think this must be a problem with me not using dbus-launch.

gufw-pkexec worked much better as well. Ideally it wouldn't just segfault, but I guess I can run it now.
Comment by Doug Newgard (Scimmia) - Monday, 10 October 2016, 23:18 GMT
DBUS_SESSION_BUS_ADDRESS should be set to a file in /run. Something is very wrong with your setup, it's set by systemd when the socket is started for the user session. Make sure nothing is clearing it and that there is nothing wrong with your pam/polkit/systemd installations (using pacman -Qkk).

Loading...