[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <nycvar.YFH.7.76.1804090930390.28129@cbobk.fhfr.pm>
Date: Mon, 9 Apr 2018 09:30:48 +0200 (CEST)
From: Jiri Kosina <jikos@...nel.org>
To: Rodrigo Rivas Costa <rodrigorivascosta@...il.com>
cc: Benjamin Tissoires <benjamin.tissoires@...hat.com>,
linux-input@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH] hidraw: Fix crash on HIDIOCGFEATURE with a destroyed
device
On Fri, 6 Apr 2018, Rodrigo Rivas Costa wrote:
> Doing `ioctl(HIDIOCGFEATURE)` in a tight loop on a hidraw device
> and then disconnecting the device, or unloading the driver, can
> cause a NULL pointer dereference.
>
> When a hidraw device is destroyed it sets 0 to `dev->exist`.
> Most functions check 'dev->exist' before doing its work, but
> `hidraw_get_report()` was missing that check.
>
> Signed-off-by: Rodrigo Rivas Costa <rodrigorivascosta@...il.com>
Applied, thank you.
--
Jiri Kosina
SUSE Labs
Powered by blists - more mailing lists