Received: by 2002:a05:6358:1087:b0:cb:c9d3:cd90 with SMTP id j7csp2056074rwi; Fri, 28 Oct 2022 02:24:54 -0700 (PDT) X-Google-Smtp-Source: AMsMyM4aBS7yg25VPIe5YvadVox9hUoS/eX/XwpBZ03+AnAbWjX8zvfayzT8NoGYb/dLOphNukQM X-Received: by 2002:aa7:96c7:0:b0:56b:c569:99c with SMTP id h7-20020aa796c7000000b0056bc569099cmr26068035pfq.4.1666949094158; Fri, 28 Oct 2022 02:24:54 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1666949094; cv=none; d=google.com; s=arc-20160816; b=geX4hgN/0DafiYsRinXMvoJfDmLemvu266BuNM4vYr9FMOpqo+NnrvHLu5R9k9HYKd c82gYKJIf65mY5U5U6TSVqaS7tx2hyz9Y4wfO8PdUbRG8lhA+8FbmKBuZh70WTygRsWa oCGVGP0oIdef8SkSkIHcx2rnzIc1UYTPKhJUVMpoxIONXbBHS4N2K8ARL4mDRdrJEts1 UmTJ6yBsmux9AnwDgTBcY6gfiGkIIMf9ZMMmbRY7Og49oWlGs6i+adiCJ/jYz/G3mGbq x3UWLTqStNoNpAFqGXgUtRKVe3eZdoyaQzMFKtz+Jn5Tc9ezn3s4CykpzmpbXgI6Hvvg SSxQ== 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=kBlWLeS6mUuc2R7z7rUvACLCy0jR5a5hB3p6xcH63Jg=; b=GTo7eAwy7bVTsoH4yoCLx31y7JnP8fkSIbLeMleHFOxKJt6ZVhrn/VHby45dYFD355 oe4hovDk3GV8xtyWji6WEQ0QtxQQVcyYy+h5IldC6aUHm2BaxMY1sEw+Myw6FChbpSS4 8ttJbVSGmSVW5GsluUxntBV9LDaWPu5X5l+3uTwknzkW7RAU5lWXoJ9yFUq4/b6x+dXD wGoZg8Uo/LSrEle5WS1QU0p23E/M+58opNcebE1NbVWsp7uOtGW/o0/ZZ/CxLWpapt8Q vqPqIUR8D0pLTtwg+Tu2dx0DmxLBR4z++0GpYjMRQJ/sfACoO1P8JfkgQVZR8iN2hEhn uINA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=bLkFDgjT; 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 19-20020a630c53000000b0045eaa7cbecfsi4986953pgm.628.2022.10.28.02.24.42; Fri, 28 Oct 2022 02:24:54 -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=bLkFDgjT; 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 S230019AbiJ1JRM (ORCPT + 99 others); Fri, 28 Oct 2022 05:17:12 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:53350 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229456AbiJ1JRK (ORCPT ); Fri, 28 Oct 2022 05:17:10 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [IPv6:2604:1380:4641:c500::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 72ECE1C69EA; Fri, 28 Oct 2022 02:17:09 -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 dfw.source.kernel.org (Postfix) with ESMTPS id 12609626C2; Fri, 28 Oct 2022 09:17:09 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id E775CC433D7; Fri, 28 Oct 2022 09:17:07 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1666948628; bh=QYTUjeWCWVOv+PHsUUrYftAhlJD6Nl7P/CQ1gw9EUiM=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=bLkFDgjTqqK3a5hjfEQ2jY4cFnTqAIR/m35tcaC3BtLjQocfVUDRF0Vr0Z0N/328d 9N/YnKS0iZhIv6CxaxqqpSD6F7lXioCTkLHp/6nQW+SDxDfOgujODIt5Y3BNpkox5c 2wzUkYpxpd7QjuIiFZNDR9Yf0PiVZ8w0cqFw1uFs= Date: Fri, 28 Oct 2022 11:17:05 +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:04:52AM +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, greg k-h