From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 15C60C38A02 for ; Fri, 28 Oct 2022 10:46:08 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:References: Message-ID:Subject:Cc:To:From:Date:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=PsvVSNnvCftO0ORYAj59N2EraUGuJ+skeQfeDNy+iEs=; b=3Bzh76JdnwW2UH w/6Pjd2JD6XimDIXNFJ2NuSxpjCJUuXI7p884zeCKRFbylqyOWeQpSiFRDmz8qLmaf7ptajznTy9K 24G/D4jCqIRhyrHkr7+VOEbPFKWpmKP8jxqmTMzCksbFlIHFwEnT36NLJ+g+3fIYcP9rjDRW44RvM hfka4EiIY6/2hqTwkpzGWYlGc0EqH0dGZt6FWYJv2nCsH66bBNY6mEHwQVnIN8lc61n+u4GasfXFv c2QTtG7Jv5Em+fLhzVUovUxp1BOW32J7f9jveoJFR/N4MFdabWLI30jKniWsWEgrMarhNfyTNnfmn 5NmS1LiBQjvhzdas2gCA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1ooMrQ-00GkZg-PL; Fri, 28 Oct 2022 10:45:12 +0000 Received: from dfw.source.kernel.org ([139.178.84.217]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1ooMrO-00GkYk-3C for linux-arm-kernel@lists.infradead.org; Fri, 28 Oct 2022 10:45:11 +0000 Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 9FC2162793; Fri, 28 Oct 2022 10:45:09 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 862DAC433D6; Fri, 28 Oct 2022 10:45:08 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1666953909; bh=jKcdal1eAeH548wTNr8DKucNg4vasE8ekmVm8y7XImA=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=Yj4rM9tk42hh+CVR/IUQmzjUBjxPas+HXIlaEYElR28cd9q8zhAlIGsAKUZPbAnWj IiLLZMdbiBtghSWFCGIT1oFeRr1tG9nRmi/uEt5pxCgoXTXkQHBsN3AEXd5GtYW8WV pB3iHBjQtZqj1JDNwL+yV00dTSsob0fez4TMySg8= Date: Fri, 28 Oct 2022 12:45:06 +0200 From: Greg Kroah-Hartman To: Neal Liu Cc: Lei Yu , Felipe Balbi , Joel Stanley , Andrew Jeffery , Henry Tian , Jakob Koschel , "linux-usb@vger.kernel.org" , "linux-arm-kernel@lists.infradead.org" , "linux-aspeed@lists.ozlabs.org" , "linux-kernel@vger.kernel.org" , Ryan Chen Subject: Re: [PATCH] usb: gadget: aspeed: fix buffer overflow Message-ID: References: <20221024094853.2877441-1-yulei.sh@bytedance.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20221028_034510_206481_8DAF2761 X-CRM114-Status: GOOD ( 27.47 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org 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. > > > > 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 _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel