lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <62ae487a-f927-22a2-e8bb-be2927393551@synaptics.com>
Date:	Tue, 19 Jul 2016 17:02:46 -0700
From:	Andrew Duggan <aduggan@...aptics.com>
To:	Dmitry Torokhov <dmitry.torokhov@...il.com>
CC:	<linux-input@...r.kernel.org>, <linux-kernel@...r.kernel.org>,
	Jiri Kosina <jikos@...nel.org>,
	Benjamin Tissoires <benjamin.tissoires@...hat.com>,
	Vincent Huang <vincent.huang@...synaptics.com>,
	Nick Dyer <nick@...anahar.org>,
	Chris Healy <cphealy@...il.com>,
	Nitin Chaudhary <nitinchaudhary1289@...il.com>,
	<stable@...r.kernel.org>
Subject: Re: [PATCH] Input: synaptics-rmi4: Fix maximum size check for F12
 control register 8

On 07/19/2016 05:00 PM, Dmitry Torokhov wrote:
> On Tue, Jul 19, 2016 at 04:43:41PM -0700, Andrew Duggan wrote:
>> According to the RMI4 spec the maximum size of F12 control register 8 is
>> 15 bytes. The current code incorrectly reports an error if control 8 is
>> greater then 14. Making sensors with a control register 8 with 15 bytes
>> unusable.
>>
>> Signed-off-by: Andrew Duggan <aduggan@...aptics.com>
>> Reported-by: Chris Healy <cphealy@...il.com>
>> Cc: stable@...r.kernel.org
>> ---
>>   drivers/input/rmi4/rmi_f12.c | 7 ++++---
>>   1 file changed, 4 insertions(+), 3 deletions(-)
>>
>> diff --git a/drivers/input/rmi4/rmi_f12.c b/drivers/input/rmi4/rmi_f12.c
>> index c30fd86..9b0d9f7 100644
>> --- a/drivers/input/rmi4/rmi_f12.c
>> +++ b/drivers/input/rmi4/rmi_f12.c
>> @@ -68,7 +68,7 @@ static int rmi_f12_read_sensor_tuning(struct f12_data *f12)
>>   	struct rmi_device *rmi_dev = fn->rmi_dev;
>>   	int ret;
>>   	int offset;
>> -	u8 buf[14];
>> +	u8 buf[15];
>>   	int pitch_x = 0;
>>   	int pitch_y = 0;
>>   	int clip_x_low = 0;
>> @@ -88,8 +88,9 @@ static int rmi_f12_read_sensor_tuning(struct f12_data *f12)
>>   
>>   	offset = rmi_register_desc_calc_reg_offset(&f12->control_reg_desc, 8);
>>   
>> -	if (item->reg_size > 14) {
>> -		dev_err(&fn->dev, "F12 control8 should be 14 bytes, not: %ld\n",
>> +	if (item->reg_size > 15) {
> Do you mind if I change this to sizeof(buf)?

Nope, that is fine with me.

Thanks,
Andrew

>
>> +		dev_err(&fn->dev,
>> +			"F12 control8 should be a maximum of 15 bytes, not: %ld\n",
>>   			item->reg_size);
>>   		return -ENODEV;
>>   	}
>> -- 
>> 2.7.4
>>

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ