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] [day] [month] [year] [list]
Message-ID: <20170201172713.GD40045@dtor-ws>
Date:   Wed, 1 Feb 2017 09:27:13 -0800
From:   Dmitry Torokhov <dmitry.torokhov@...il.com>
To:     Benjamin Tissoires <benjamin.tissoires@...hat.com>
Cc:     linux-input@...r.kernel.org,
        David Herrmann <dh.herrmann@...il.com>,
        Rodrigo Rivas Costa <rodrigorivascosta@...il.com>,
        linux-kernel@...r.kernel.org
Subject: Re: [PATCH] Input: uinput - fix crash when mixing old and new init
 style

On Wed, Feb 01, 2017 at 09:49:25AM +0100, Benjamin Tissoires wrote:
> On Jan 31 2017 or thereabouts, Dmitry Torokhov wrote:
> > If user tries to initialize uinput device mixing old and new style
> > initialization (i.e. using old UI_SET_ABSBIT instead of UI_ABS_SETUP,
> > we forget to allocate input->absinfo and will crash when trying to send
> > absolute events:
> > 
> >         ioctl(ui, UI_DEV_SETUP, &us);
> >         ioctl(ui, UI_SET_EVBIT, EV_ABS);
> >         ioctl(ui, UI_SET_ABSBIT, ABS_X);
> >         ioctl(ui, UI_SET_ABSBIT, ABS_Y);
> >         ioctl(ui, UI_DEV_CREATE, 0);
> 
> Shouldn't we prevent completely the mix of the 2 versions? If the user
> used UI_DEV_SETUP, we should probably prevent the use of UI_SET_ABSBIT
> afterwards, or at least warn it somehow.

Why? If user does not wish to set up parameters of an axis then just
using UI_SET_ABSBIT is fine. In fact, I think it would be weird if we
allowed all UI_SET_*BIT except for ABS.

> 
> But the patch in itself doesn't hurt, so:
> Reviewed-by: Benjamin Tissoires <benjamin.tissoires@...hat.com>

Thanks.

-- 
Dmitry

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ