GNOME Bugzilla – Bug 750816
mutter crashes when setting invalid properties
Last modified: 2015-07-14 21:45:49 UTC
https://bugzilla.redhat.com/show_bug.cgi?id=1228011 on a touchpad that doesn't have two-finger scrolling, setting the scroll method to that will cause a BadValue, which in turn brings the session down. These touchpads are fairly uncommon now, but it's quite nasty nonetheless.
looks like MetaDisplay is not set when we get here, it's called during meta_init. so a simple meta_error_trap_push/pop around the XIChangeProperty call doesn't work. This needs some bigger change then in call order, any hints would be appreciated. There's the other solution of checking each property separately for validity before we change it, but not sure that's sensible either.
https://git.gnome.org/browse/mutter/commit/?id=989f9630a43fe0c6efab64ea36e8a0e909d97c19
did this work for you? I'm getting a crash on the very first property (happens to be the left-handed one), and the cause of it appears to be libxcb. Part of that is misalignment of the properties [1] but the second part is that it looks like libxcb will assert on any data pointer passed in that's not 4-byte aligned (libxcb bug). So now I'm left wondering why this worked for you - luck of the compiler? [1] http://lists.freedesktop.org/archives/xcb/2015-June/010385.html
reverted, xcb-xinput doesn't work. https://git.gnome.org/browse/mutter/commit/?id=9747277b7e47fff5d0c7a9d2a60ede18b00a1d55
Created attachment 305355 [details] [review] 0001-input-settings-x11-check-properties-for-correctness-.patch To avoid the BadValue altogether, check the properties for correctness before sending the request. Not ideal, but better than a crash. Only three properties are checked where the BadValue is most likely to occur. The others are generally safer because most of them are booleans and we handle non-existing properties correctly already.
ping?
This bug makes it impossible for some users to log in to GNOME. Could anyone take a look at the patch?
Review of attachment 305355 [details] [review]: Not super happy with this patch, but let's land it for now if users are really crashing.
Peter, do you need someone to push this for you?
yes please. I may have git access (not sure) but I'm sure you have a better mutter build setup than I do :)
OK thanks. I think you would know if you had git access :)