Re: [PATCH v2 2/2] Input: uinput: Sanity check on ff_effects_max and EV_FF

2015-12-18 Thread Dmitry Torokhov
On Sun, Nov 08, 2015 at 06:37:34PM +0100, Elias Vanderstuyft wrote: > Currently the user can set ff_effects_max to zero with the EV_FF bit > (and the FF_GAIN and/or FF_AUTOCENTER bits) set, > in this case the uninitialized methods > ff->set_gain and/or ff->set_autocenter can be dereferenced, > resu

[PATCH v2 2/2] Input: uinput: Sanity check on ff_effects_max and EV_FF

2015-11-08 Thread Elias Vanderstuyft
Currently the user can set ff_effects_max to zero with the EV_FF bit (and the FF_GAIN and/or FF_AUTOCENTER bits) set, in this case the uninitialized methods ff->set_gain and/or ff->set_autocenter can be dereferenced, resulting in a kernel oops. Check in uinput_create_device() and print a helpful m