From: "Woo-kwang Lee" <wookwang.lee@samsung.com>
To: "'Greg KH'" <gregkh@linuxfoundation.org>
Cc: <linux-usb@vger.kernel.org>, <linux-kernel@vger.kernel.org>,
<stable@vger.kernel.org>, <sj1557.seo@samsung.com>
Subject: RE: [PATCH] usb: core: add bos NULL pointer checking condition
Date: Wed, 4 Oct 2023 16:06:17 +0900 [thread overview]
Message-ID: <000101d9f691$4513da00$cf3b8e00$@samsung.com> (raw)
In-Reply-To: <2023100439-king-salute-5cd5@gregkh>
Hello. I think I missed the patch.
Thank you for your quick feedback.
Woo-kwang Lee
> On Wed, Oct 04, 2023 at 03:26:42PM +0900, Woo-kwang Lee wrote:
> > This issue occurs when connecting Galaxy S22 and abnormal SEC Dex
> Adapter.
> > When the abnormal adapter is connected, kernel panic always occurs
> > after a few seconds.
> > This occurs due to unable to get BOS descriptor,
> > usb_release_bos_descriptor set dev->bos = NULL.
> >
> > - usb_reset_and_verify_device
> > - hub_port_init
> > - usb_release_bos_descriptor
> > - dev->bos = NULL;
> >
> > hub_port_connect_change() calls portspeed(), and portspeed() calls
> > hub_is_s uperspeedplus().
> > Finally, hub_is_superspeedplus() calls hdev->bos->ssp_cap.
> > It needs to check hdev->bos is NULL to prevent a kernel panic.
> >
> > usb 3-1: new SuperSpeed Gen 1 USB device number 16 using
> > xhci-hcd-exynos usb 3-1: unable to get BOS descriptor set usb 3-1:
> > Product: USB3.0 Hub Unable to handle kernel NULL pointer dereference
> > at virtual address 0000018
> >
> > Call trace:
> > hub_port_connect_change+0x8c/0x538
> > port_event+0x244/0x764
> > hub_event+0x158/0x474
> > process_one_work+0x204/0x550
> > worker_thread+0x28c/0x580
> > kthread+0x13c/0x178
> > ret_from_fork+0x10/0x30
> >
> > - hub_port_connect_change
> > - portspeed
> > - hub_is_superspeedplus
> >
> > Fixes: 0cdd49a1d1a4 ("usb: Support USB 3.1 extended port status
> > request")
> > Signed-off-by: Woo-kwang Lee <wookwang.lee@samsung.com>
> > ---
> > drivers/usb/core/hub.h | 2 ++
> > 1 file changed, 2 insertions(+)
>
> Are you sure this isn't already fixed by commit f74a7afc224a ("usb: hub:
> Guard against accesses to uninitialized BOS descriptors") in linux-next?
>
> thanks,
>
> greg k-h
next prev parent reply other threads:[~2023-10-04 7:06 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <CGME20231004062700epcas1p16fe36bf6b6a6e5d9d4adeaef32937480@epcas1p1.samsung.com>
2023-10-04 6:26 ` [PATCH] usb: core: add bos NULL pointer checking condition Woo-kwang Lee
2023-10-04 6:28 ` kernel test robot
2023-10-04 6:36 ` Greg KH
2023-10-04 7:06 ` Woo-kwang Lee [this message]
2023-10-04 7:21 ` 'Greg KH'
2023-10-04 7:34 ` Woo-kwang Lee
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='000101d9f691$4513da00$cf3b8e00$@samsung.com' \
--to=wookwang.lee@samsung.com \
--cc=gregkh@linuxfoundation.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-usb@vger.kernel.org \
--cc=sj1557.seo@samsung.com \
--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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox