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: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Mon, 24 Oct 2011 13:32:04 -0700
From:	Dmitry Torokhov <dmitry.torokhov@...il.com>
To:	Christoph Fritz <chf.fritz@...glemail.com>
Cc:	Denilson Figueiredo de Sá 
	<denilsonsa@...il.com>, linux-kernel@...r.kernel.org,
	Jiri Kosina <jkosina@...e.cz>, linux-input@...r.kernel.org,
	linux-usb@...r.kernel.org
Subject: Re: Linux USB HID should ignore values outside Logical
 Minimum/Maximum range

Hi Christoph,

On Mon, Oct 24, 2011 at 07:09:43PM +0200, Christoph Fritz wrote:
> Hi Denilson,
> 
>  please see my comment below.
> 
> On Sat, 2011-10-22 at 09:42 -0200, Denilson Figueiredo de Sá wrote:
> > Short description:
> > 
> > An absolute pointing device using USB HID defines a LOGICAL_MINIMUM and
> > a LOGICAL_MAXIMUM for X, Y axes, and then sends a HID report containing
> > values outside that range.
> > 
> > Linux kernel should ignore values outside that range, as they are not
> > meaningful.
> 
> To answer with a quote from the comment above input.h:"struct
> input_absinfo":
> 
>  *
>  * Note that input core does not clamp reported values to the
>  * [minimum, maximum] limits, such task is left to userspace.
>  *
> 
> to do so, use this from input.h:
> 
> #define EVIOCGABS(abs)		_IOR('E', 0x40 + (abs), struct input_absinfo)	/* get abs value/limits */
> #define EVIOCSABS(abs)		_IOW('E', 0xc0 + (abs), struct input_absinfo)	/* set abs value/limits */

While input core does not clam or validate the values reported by the
driver it might make sense to do so in hid-input; I am not sure how
often these limits programmed intorrectly. Jiri i sprobably the best
person to answer this question.

Thanks.

-- 
Dmitry
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ