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 685394 - Segfault if any of the string attribute values to password_store_sync() are None
Segfault if any of the string attribute values to password_store_sync() are None
Status: RESOLVED DUPLICATE of bug 686015
Product: libsecret
Classification: Other
Component: General
unspecified
Other Linux
: Normal major
: ---
Assigned To: libsecret maintainer(s)
libsecret maintainer(s)
Depends on:
Blocks:
 
 
Reported: 2012-10-03 14:06 UTC by Nirbheek Chauhan
Modified: 2012-10-15 12:30 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Nirbheek Chauhan 2012-10-03 14:06:28 UTC
I only tested this with the Python introspection bindings, but if the value of any of the string attributes passed to Secret.password_store_sync() is None instead of "", I get a segfault:

Program received signal SIGSEGV, Segmentation fault.
g_utf8_validate (str=0x0, max_len=-1, end=0x0) at gutf8.c:1629
(gdb) bt
  • #0 g_utf8_validate
    at gutf8.c line 1629
  • #1 _secret_attributes_validate
    at secret-attributes.c line 246
  • #2 secret_password_storev_sync
    at secret-password.c line 283
  • #3 ffi_call_unix64
    at ../src/x86/unix64.S line 75
  • #4 ffi_call
    at ../src/x86/ffi64.c line 492
  • #5 g_callable_info_invoke
    at girepository/gicallableinfo.c line 680
  • #6 g_function_info_invoke
    at girepository/gifunctioninfo.c line 274
  • #7 _invoke_callable
    at pygi-invoke.c line 52
  • #8 _wrap_g_callable_info_invoke
    at pygi-invoke.c line 633
  • #9 ext_do_call
    at Python/ceval.c line 4331
  • #10 PyEval_EvalFrameEx
    at Python/ceval.c line 2705
  • #11 PyEval_EvalCodeEx
    at Python/ceval.c line 3253
  • #12 fast_function
    at Python/ceval.c line 4117
  • #13 call_function
    at Python/ceval.c line 4042
  • #14 PyEval_EvalFrameEx
    at Python/ceval.c line 2666
  • #15 fast_function
    at Python/ceval.c line 4107
  • #16 call_function
    at Python/ceval.c line 4042
  • #17 PyEval_EvalFrameEx
    at Python/ceval.c line 2666
  • #18 PyEval_EvalCodeEx
    at Python/ceval.c line 3253
  • #19 function_call
    at Objects/funcobject.c line 526
  • #20 PyObject_Call
    at Objects/abstract.c line 2529
  • #21 PyEval_CallObjectWithKeywords
    at Python/ceval.c line 3890
  • #22 pygi_signal_closure_marshal
    at pygi-signal-closure.c line 168
  • #23 g_closure_invoke
    at gclosure.c line 777
  • #24 signal_emit_unlocked_R
    at gsignal.c line 3551
  • #25 g_signal_emit_valist
    at gsignal.c line 3300
  • #26 g_signal_emit
    at gsignal.c line 3356
  • #27 _g_closure_invoke_va
    at gclosure.c line 840
  • #28 g_signal_emit_valist
    at gsignal.c line 3211
  • #29 g_signal_emit
    at gsignal.c line 3356
  • #30 button_activate_timeout
    at gtkbutton.c line 1988
  • #31 gdk_threads_dispatch
    at gdk.c line 788
  • #32 g_timeout_dispatch
    at gmain.c line 4026
  • #33 g_main_dispatch
    at gmain.c line 2715
  • #34 g_main_context_dispatch
    at gmain.c line 3219
  • #35 g_main_context_iterate
    at gmain.c line 3290
  • #36 g_main_context_iteration
    at gmain.c line 3351
  • #37 g_application_run
    at gapplication.c line 1607
  • #38 ffi_call_unix64
    at ../src/x86/unix64.S line 75
  • #39 ffi_call
    at ../src/x86/ffi64.c line 492
  • #40 g_callable_info_invoke
    at girepository/gicallableinfo.c line 680
  • #41 g_function_info_invoke
    at girepository/gifunctioninfo.c line 274
  • #42 _invoke_callable
    at pygi-invoke.c line 52
  • #43 _wrap_g_callable_info_invoke
    at pygi-invoke.c line 633
  • #44 ext_do_call
    at Python/ceval.c line 4331
  • #45 PyEval_EvalFrameEx
    at Python/ceval.c line 2705
  • #46 PyEval_EvalCodeEx
    at Python/ceval.c line 3253
  • #47 fast_function
    at Python/ceval.c line 4117
  • #48 call_function
    at Python/ceval.c line 4042
  • #49 PyEval_EvalFrameEx
    at Python/ceval.c line 2666
  • #50 fast_function
    at Python/ceval.c line 4107
  • #51 call_function
    at Python/ceval.c line 4042
  • #52 PyEval_EvalFrameEx
    at Python/ceval.c line 2666
  • #53 PyEval_EvalCodeEx
    at Python/ceval.c line 3253
  • #54 PyEval_EvalCode
    at Python/ceval.c line 667
  • #55 run_mod
    at Python/pythonrun.c line 1353
  • #56 PyRun_FileExFlags
    at Python/pythonrun.c line 1339
  • #57 PyRun_SimpleFileExFlags
    at Python/pythonrun.c line 943
  • #58 Py_Main
    at Modules/main.c line 643
  • #59 __libc_start_main
    at libc-start.c line 226
  • #60 _start

I'm unsure whether this is a bug in libsecret, libsecret's introspection data, gobject-introspection, or pygobject. I'm guessing the libsecret maintainers would be able to figure this out, and so I'm filing this here. :)
Comment 1 Stef Walter 2012-10-15 12:30:53 UTC
This is a duplicate of this bug. 

It's invalid to pass a NULL value as one of the attributes, and we now have a better check for that. The attributes are used for keys to lookup passwords, so it doesn't really make sense for them to be NULL.

*** This bug has been marked as a duplicate of bug 686015 ***