Received: by 2002:a05:6358:1087:b0:cb:c9d3:cd90 with SMTP id j7csp2164609rwi; Fri, 28 Oct 2022 03:59:34 -0700 (PDT) X-Google-Smtp-Source: AMsMyM6lt+846Q+IMIf2Lek1ezpjKTyCLLkbX6v0O7OwqI9KQrHUQVNUHMmyIqZPeeCWPi/b2tSD X-Received: by 2002:a17:907:2d8a:b0:78d:4448:e96c with SMTP id gt10-20020a1709072d8a00b0078d4448e96cmr45851383ejc.199.1666954774105; Fri, 28 Oct 2022 03:59:34 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1666954774; cv=none; d=google.com; s=arc-20160816; b=J5HwiSXvrfI4bjZFv3jeDqE71mYDVLXDGhNHR5iSZzqqgUgbaT9w0iejp0TIowaDx1 WK7mh91xcJXdnZpN1GfxWi8ufb0N2Ppyz+skup2dacqVJaDc9ygRb4OLpFzVeDzwO3rT cIBFgTj4Z3Teno6GvOusm7wK2ZJR63w0arNVhNETqM4OaK9ViSxv+EmEFhw91sXYQQAW 0pW+ukS+kkTj4G75L7rglUfQTtRgEmubPmxEVYH43Hrm2ZVxUSvnHFvEsKuw5drU1xKL E5sAmEra1Xz3OjoXm1vlcQtUhA2+hGKFFUa2gT1A0NK1YlhO9pp10Knp5Dh58iMwGY5A rZKw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=iqFzedwunZwoZQ8Bs/bfDzBlRyg8dHQ4E9toPJtiFmI=; b=SW7NeU0NXxyIOMbwwMlxOtXM1KcwRcbYbYhyoirMvdnIwyLOPk/nLKpJ18sQOUuU8F VRfPXAoh5/Iojl12agE6i118cwwt9fVDK40w8Z4dbjVk3fUns1SaCPvNIP40WFHpJvo8 9yU2TUIkTrrn4bZfSeD1KZs0HjnQXGODNekaA9Ozp9M7ajg7UdPXBiiYgAcdmtaI+8qz Bu3nZgpIp8g4axOD00Do6eaMRJGGZtQ5kYcVu0qThNFmXXAdHLPqDRQj2zsax0rTdhvp swhMqsm3S6zHiCzzWnwFVCj8ZK6tarcr1VQI0e5SCjWq68KeyAwaxLxxFpHkojIq3mcP Gdhg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=Yj4rM9tk; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id rv7-20020a17090710c700b007330c08fe49si3070826ejb.206.2022.10.28.03.59.09; Fri, 28 Oct 2022 03:59:34 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=Yj4rM9tk; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230509AbiJ1Kpo (ORCPT + 99 others); Fri, 28 Oct 2022 06:45:44 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:34410 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230467AbiJ1KpQ (ORCPT ); Fri, 28 Oct 2022 06:45:16 -0400 Received: from ams.source.kernel.org (ams.source.kernel.org [145.40.68.75]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id BF09259EB0; Fri, 28 Oct 2022 03:45:11 -0700 (PDT) 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 ams.source.kernel.org (Postfix) with ESMTPS id 5ECC8B82949; Fri, 28 Oct 2022 10:45:10 +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-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-Spam-Status: No, score=-7.6 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI, SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.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