Crash homescreen in case of connman dbus call error.
Description
Environment
Activity
Walt Miner February 23, 2023 at 9:50 PM
Close for NN 14.0.3

Naoto YAMAGUCHI November 23, 2022 at 2:40 PM
In connman-call.c
When connman dbus call was failed, connman_call return NULL.
A connman_get_properties function has debug log output without error check.
When connman_call return NULL, this DEBUG macro set NULL to g_variant_print arg.
reply = connman_call(ns, CONNMAN_AT_MANAGER, type_arg, method, NULL, error);
if (!reply) {
if (type_arg)
g_set_error(error, CONNMAN_ERROR, CONNMAN_ERROR_ILLEGAL_ARGUMENT,
"Bad %s %s", access_type, type_arg);
else
g_set_error(error, CONNMAN_ERROR, CONNMAN_ERROR_ILLEGAL_ARGUMENT,
"No %s", access_type);
}
DEBUG("properties: %s", g_variant_print(reply, TRUE));

Naoto YAMAGUCHI November 23, 2022 at 2:36 PM
(gdb) bt
#0 __pthread_kill_implementation (threadid=<optimized out>,
signo=signo@entry=6, no_tid=no_tid@entry=0) at pthread_kill.c:44
#1 0x0000fffff69d1ed8 in __pthread_kill_internal (signo=6,
threadid=<optimized out>) at pthread_kill.c:78
#2 0x0000fffff698dd50 in __GI_raise (sig=sig@entry=6)
at ../sysdeps/posix/raise.c:26
#3 0x0000fffff697af64 in __GI_abort () at abort.c:79
#4 0x0000fffff5d433a4 in g_assertion_message () from /usr/lib/libglib-2.0.so.0
#5 0x0000fffff5d43408 in g_assertion_message_expr ()
from /usr/lib/libglib-2.0.so.0
#6 0x0000fffff5d5aea8 in g_variant_print_string ()
from /usr/lib/libglib-2.0.so.0
#7 0x0000fffff5d5ae08 in g_variant_print () from /usr/lib/libglib-2.0.so.0
#8 0x0000fffff5ca56d8 in ?? () from /usr/lib/libconnman-glib.so.0
#9 0x0000fffff5ca3968 in connman_get_technologies ()
from /usr/lib/libconnman-glib.so.0
#10 0x0000fffff6e20d68 in Network::getTechnologies() ()
from /usr/lib/libqtappfw-network.so.0
#11 0x0000fffff6e213e8 in Network::Network(bool, QQmlContext*, QObject*) ()
from /usr/lib/libqtappfw-network.so.0
#12 0x0000aaaaaaaacbd4 in ?? ()
#13 0x0000aaaaaaaa893c in ?? ()
#14 0x0000fffff697b230 in __libc_start_call_main (
Details
Details
Assignee

Reporter

In our ces2023 demo integration, crash homescreen in case of connman dbus call error.
Log:
Sep 16 03:49:08 h3ulcb dbus-daemon[42]: [system] Rejected send message, 2 matched rules; type="method_call", sender=":1.24" (uid=1001 pid=335 comm="/usr/bin/homescreen") interface="net.connman.Manager" member="GetTechnologies" error name="(unset)" requested_reply="0" destination="net.connman" (uid=0 pid=83 comm="/usr/sbin/connmand -n")
Sep 16 03:49:08 h3ulcb homescreen[335]: ERROR: connman_call: Error calling manager GetTechnologies method: Rejected send message, 2 matched rules; type="method_call", sender=":1.24" (uid=1001 pid=335 comm="/usr/bin/homescreen") interface="net.connman.Manager" member="GetTechnologies" error name="(unset)" requested_reply="0" destination="net.connman" (uid=0 pid=83 comm="/usr/sbin/connmand -n")
Sep 16 03:49:08 h3ulcb homescreen[335]: GError set over the top of a previous GError or uninitialized memory.
This indicates a bug in someone's code. You must ensure an error is NULL before it's set.
The overwriting error message was: No technology
Sep 16 03:49:08 h3ulcb homescreen[335]: **
Sep 16 03:49:08 h3ulcb homescreen[335]: GLib:ERROR:../glib-2.72.3/glib/gvariant.c:2609:g_variant_print_string: code should not be reached
Sep 16 03:49:08 h3ulcb homescreen[335]: Bail out! GLib:ERROR:../glib-2.72.3/glib/gvariant.c:2609:g_variant_print_string: code should not be reached
Sep 16 03:49:08 h3ulcb homescreen[335]: g_variant_classify: assertion 'value != NULL' failed