From: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
To: Danila Chernetsov <listdansp@mail.ru>
Cc: stable@vger.kernel.org, Dinghao Liu <dinghao.liu@zju.edu.cn>,
linux-staging@lists.linux.dev, linux-kernel@vger.kernel.org,
lvc-project@linuxtesting.org
Subject: Re: [PATCH 5.10 1/1] staging: rtl8192u: Add null check in rtl8192_usb_initendpoints
Date: Thu, 30 Mar 2023 22:52:56 +0200 [thread overview]
Message-ID: <ZCX2qLN1g6bmeKS7@kroah.com> (raw)
In-Reply-To: <20230330201107.17647-2-listdansp@mail.ru>
On Thu, Mar 30, 2023 at 08:11:07PM +0000, Danila Chernetsov wrote:
> From: Dinghao Liu <dinghao.liu@zju.edu.cn>
>
> commit 4d5f81506835f7c1e5c71787bed84984faf05884 upstream.
>
> There is an allocation for priv->rx_urb[16] has no null check,
> which may lead to a null pointer dereference.
>
> Signed-off-by: Dinghao Liu <dinghao.liu@zju.edu.cn>
> Link: https://lore.kernel.org/r/20201226080258.6576-1-dinghao.liu@zju.edu.cn
> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
> Signed-off-by: Danila Chernetsov <listdansp@mail.ru>
> ---
> drivers/staging/rtl8192u/r8192U_core.c | 2 ++
> 1 file changed, 2 insertions(+)
>
> diff --git a/drivers/staging/rtl8192u/r8192U_core.c b/drivers/staging/rtl8192u/r8192U_core.c
> index 7f90af8a7c7c..e0fec7d172da 100644
> --- a/drivers/staging/rtl8192u/r8192U_core.c
> +++ b/drivers/staging/rtl8192u/r8192U_core.c
> @@ -1608,6 +1608,8 @@ static short rtl8192_usb_initendpoints(struct net_device *dev)
> void *oldaddr, *newaddr;
>
> priv->rx_urb[16] = usb_alloc_urb(0, GFP_KERNEL);
> + if (!priv->rx_urb[16])
> + return -ENOMEM;
This was not marked for stable as it's impossible to hit in real-life.
So absent that, it's not needed in any stable kernel tree, unless you
can prove otherwise?
thanks,
greg k-h
prev parent reply other threads:[~2023-03-30 20:52 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-03-30 20:11 [PATCH 5.10 0/1] staging: rtl8192u: Add null check in rtl8192_usb_initendpoints Danila Chernetsov
2023-03-30 20:11 ` [PATCH 5.10 1/1] " Danila Chernetsov
2023-03-30 20:52 ` Greg Kroah-Hartman [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=ZCX2qLN1g6bmeKS7@kroah.com \
--to=gregkh@linuxfoundation.org \
--cc=dinghao.liu@zju.edu.cn \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-staging@lists.linux.dev \
--cc=listdansp@mail.ru \
--cc=lvc-project@linuxtesting.org \
--cc=stable@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.