[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20191016152914.ubzaluipboeku5zz@debian>
Date: Wed, 16 Oct 2019 16:29:14 +0100
From: Sudip Mukherjee <sudipm.mukherjee@...il.com>
To: Yue Haibing <yuehaibing@...wei.com>
Cc: dmitry.torokhov@...il.com, linux-kernel@...r.kernel.org,
linux-input@...r.kernel.org
Subject: Re: [PATCH] Input: walkera0701 - Fix possible NULL pointer
dereference in walkera0701_detach
On Tue, Apr 23, 2019 at 10:56:37PM +0800, Yue Haibing wrote:
> From: YueHaibing <yuehaibing@...wei.com>
>
> KASAN report this:
<snip>
>
> static void walkera0701_detach(struct parport *port)
> {
> struct walkera_dev *w = &w_dev;
>
> - if (!w->pardevice || w->parport->number != port->number)
> + if (!w->parport)
It doesn't look correct. This way the detach function will never know the
port number to which it is attached, and as a result it will try to do
detach() with all the ports in the system.
Please check the attached patch and maybe (if possible) ask Hulk Robot
to verify if it fixes the problem.
--
Regards
Sudip
View attachment "0001-Input-walkera0701-Fix-possible-NULL-pointer-derefere.patch" of type "text/x-diff" (1408 bytes)
Powered by blists - more mailing lists