[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Date: Tue, 6 Jun 2017 12:39:40 +0200
From: David Sterba <dsterba@...e.cz>
To: "Gustavo A. R. Silva" <garsilva@...eddedor.com>
Cc: Jiri Kosina <jikos@...nel.org>,
Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
Jiri Slaby <JSlaby@...e.com>, linux-kernel@...r.kernel.org
Subject: Re: [PATCH] tty: ipwireless: fix potential NULL pointer dereference
On Mon, Jun 05, 2017 at 03:50:02PM -0500, Gustavo A. R. Silva wrote:
> Add null check before dereferencing pointer ver_packet.
> Print error message and exit in case pointer ver_packet
> is NULL.
And what next? The caller does not expect a failure and continues as if
the packet has been set up and sent and waiting for a response. This
will likely hang somewhere or just do nothing regarding
sending/receiving user packets. Failures of alloc_ctrl_packet are
handled elsewhere, even during the setup phase so this could be handled
more gracefully.
Powered by blists - more mailing lists