[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <aAnnXQzzdqn-YXpC@hovoldconsulting.com>
Date: Thu, 24 Apr 2025 09:25:17 +0200
From: Johan Hovold <johan@...nel.org>
To: Alexei Safin <a.safin@...a.ru>
Cc: Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
linux-usb@...r.kernel.org, linux-kernel@...r.kernel.org,
lvc-project@...uxtesting.org
Subject: Re: [PATCH] usb: serial: ti_usb_3410_5052: Add NULL check for
read_urb in ti_open()
On Tue, Apr 22, 2025 at 11:51:40PM +0300, Alexei Safin wrote:
> Avoid dereferencing port->read_urb when it is NULL, which may happen if
> usb_alloc_urb() fails or initialization of usb_serial_port is incomplete.
>
> Dereferencing a NULL pointer in ti_open() leads to a kernel crash.
> This condition was detected by a static analyzer, but can also occur
> in practice if memory allocation fails in probe path or if the driver
> is incorrectly initialized by a faulty device descriptor.
No, this can't happen as probe would abort on allocation failures and
the malicious descriptor case was fixed 8 years ago by commit
ef079936d3cd ("USB: serial: ti_usb_3410_5052: fix NULL-deref at open").
Johan
Powered by blists - more mailing lists