Note: This bug is displayed in read-only format because
the product is no longer active in Red Hat Bugzilla.
RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
Description of problem:
Gnome session hung and gnome-shell dumped a core. The crash is because of null in source_device passed to _clutter_input_device_reset_scroll_info() in clutter-device-manager-xi2.c.
Version-Release number of selected component (if applicable):
1.20.0 and higher.
How reproducible:
One time occurrence only. Steps Not provided by the customer.
Actual results:
Gnome session hung and gnome-shell dumped a core.
Expected results:
The NULL values to be checked in clutter-device-manager-xi2.c, which resolves the problem.
Additional info:
I have created a patch in the upstream: https://bugzilla.gnome.org/show_bug.cgi?id=778807. I'm working on the patch for RHEL 7.2.
Hello Owen,
Today, we have a bi-weekly meeting with HPE-Japan.
In this meeting, we think the code in the clutter doesn't follow an usual practice, NULL check.
From gnome developer guide, g_hash_table_lookup() will return NULL if the key is not found.
c.f. https://developer.gnome.org/glib/stable/glib-Hash-Tables.html#g-hash-table-lookup
~~~
g_hash_table_lookup ()
gpointer
g_hash_table_lookup (GHashTable *hash_table,
gconstpointer key);
Looks up a key in a GHashTable. Note that this function cannot distinguish between a key that is not present and one which is present and has the value NULL. If you need this distinction, use g_hash_table_lookup_extended().
Parameters
hash_table : a GHashTable
key : the key to look up
Returns
the associated value, or NULL if the key is not found.
~~~
In clutter code, there are so many places which doesn't check whether the pointer is NULL or not.
HPE and I think that the code should have NULL check code like fopen(), malloc() in C code to confirm whether the function returns expected pointer or not before pass it to latter part of the code.
Current code looks too optimistic regarding the return value of g_has_table_lookup().
Actually, NULL reference check in another part of the function, clutter_device_manager_xi2_translate_event() was merged.
c.f. https://bugzilla.gnome.org/review?bug=678439&attachment=216819
So, we think that introducing null check for every g_has_table_lookup() looks usual fix.
How do you think about it?
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.
For information on the advisory, and where to find the updated
files, follow the link below.
If the solution does not work for you, open a new bug report.
https://access.redhat.com/errata/RHSA-2018:3140