From: Neal Liu <neal_liu@aspeedtech.com>
To: Lei Yu <yulei.sh@bytedance.com>,
Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Cc: Felipe Balbi <balbi@kernel.org>, Joel Stanley <joel@jms.id.au>,
Andrew Jeffery <andrew@aj.id.au>,
Henry Tian <tianxiaofeng@bytedance.com>,
Jakob Koschel <jakobkoschel@gmail.com>,
"linux-usb@vger.kernel.org" <linux-usb@vger.kernel.org>,
"linux-arm-kernel@lists.infradead.org"
<linux-arm-kernel@lists.infradead.org>,
"linux-aspeed@lists.ozlabs.org" <linux-aspeed@lists.ozlabs.org>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
Ryan Chen <ryan_chen@aspeedtech.com>
Subject: RE: [PATCH] usb: gadget: aspeed: fix buffer overflow
Date: Wed, 21 Dec 2022 02:17:03 +0000 [thread overview]
Message-ID: <TY2PR06MB321303972156248AB08CAB2480EB9@TY2PR06MB3213.apcprd06.prod.outlook.com> (raw)
In-Reply-To: <CAGm54UGmp=kTKGLhEfENF4SqkvRt_GcpuGH_g5PjtQiBkwtOsA@mail.gmail.com>
> > On Fri, Oct 28, 2022 at 09:55:57AM +0000, Neal Liu wrote:
> > > > > > > Thanks for your feedback.
> > > > > > > I tried to reproduce it on my side, and it cannot be reproduce it.
> > > > > > > Here are my test sequences:
> > > > > > > 1. emulate one of the vhub port to usb ethernet through
> > > > > > > Linux gadget
> > > > > > > (ncm)
> > > > > >
> > > > > > We are using rndis instead of ncm.
> > > > > >
> > > > > > > 2. connect BMC vhub to Host
> > > > > > > 3. BMC & Host can ping each other (both usb eth dev default
> > > > > > > mtu is
> > > > > > > 1500) 4. Set BMC mtu to 1000 (Host OS cannot set usb eth dev
> > > > > > > mtu to 2000, it's maxmtu is 1500)
> > > > > >
> > > > > > Not sure if it's related, but in my case (USB rndis, Debian 10
> > > > > > OS) it should be able to set MTU to 2000.
> > > > >
> > > > > Using rndis is able to set MTU to 2000, and the issue can be
> reproduced.
>
> USB ecm is also tested and it is possible to set MTU to 2000, and could
> reproduce the issue.
> So I think this patch is needed anyway.
>
> @Neal Liu Could you kindly help to verify the USB ECM case?
How to set MTU to 2000 on USB ECM case? I remember last time I cannot set by using "ifconfig ..."
Regardless ECM or RNDIS, I agree this patch is still needed.
> > > >
> > > > Please NEVER use rndis anymore. I need to go just delete that
> > > > driver from the tree.
> > > >
> > > > It is insecure-by-design and will cause any system that runs it to
> > > > be instantly compromised and it can not be fixed. Never trust it.
> > > >
> > > > Even for data throughput tests, I wouldn't trust it as it does odd
> > > > things with packet sizes as you show here.
> > >
> > > Thanks for the info, Greg.
> > > If rndis will no longer be supported, how to use usb-ethernet on Windows
> OS?
> > > For my understanding, ncm/ecm cannot work on Windows OS.
> >
> > rndis should ONLY be there for Windows XP, which is long out-of-support.
> > Newer versions of windows have more sane usb protocols built into it
> > and this driver is not needed.
> >
> > As proof of this, Android devices removed this from their kernel
> > configuration a few years ago and no one has complained :)
> >
> > thanks,
> >
> > greg k-h
next prev parent reply other threads:[~2022-12-21 2:17 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-10-24 9:48 Lei YU
2022-10-24 21:59 ` Benjamin Herrenschmidt
2022-10-25 6:21 ` Lei Yu
2022-10-25 22:29 ` Benjamin Herrenschmidt
2022-10-28 6:59 ` Neal Liu
2022-10-28 7:41 ` Lei Yu
2022-10-28 9:04 ` Neal Liu
2022-10-28 9:17 ` Greg Kroah-Hartman
2022-10-28 9:55 ` Neal Liu
2022-10-28 10:45 ` Greg Kroah-Hartman
2022-12-20 10:51 ` Lei Yu
2022-12-21 2:17 ` Neal Liu [this message]
2022-12-21 2:26 ` Lei Yu
2023-06-21 12:02 ` Lei Yu
2023-06-21 15:59 ` Greg Kroah-Hartman
2023-06-25 3:07 ` [External] " Lei Yu
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=TY2PR06MB321303972156248AB08CAB2480EB9@TY2PR06MB3213.apcprd06.prod.outlook.com \
--to=neal_liu@aspeedtech.com \
--cc=andrew@aj.id.au \
--cc=balbi@kernel.org \
--cc=gregkh@linuxfoundation.org \
--cc=jakobkoschel@gmail.com \
--cc=joel@jms.id.au \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-aspeed@lists.ozlabs.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-usb@vger.kernel.org \
--cc=ryan_chen@aspeedtech.com \
--cc=tianxiaofeng@bytedance.com \
--cc=yulei.sh@bytedance.com \
/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
all inboxes | Powered by JetHome®