From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=100.103.45.18 ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1796105216; b=kR6rg4tfj8Oo64xumQ8kyYsUS+mko9StQUql1c4F4KFmQmabicNpE70Em/3JMpq5/7he M3fFVSwIG3ZfymfOClqedu7WTLIbowvaFqR4K2GG557SmLsF92fRQ9g2KabLjicapbiMr 001PWKTaSX4Fpvnd9zSbtciB/qC6aIUgQ54nX9a/DEm2yCQzaPDdk3Mn60fzrLKvOEb7Z VAwEinRmBBqy0LY7VDtPIlPNHZ4M66PWp49NQ2ezN+W7WeRN4k/CoZBsfH5GPVo0J6cd1 Odv4Q7bzG5l6PairysUco3cKTqRYeL9z3bbsZx7FIw1WLbQV1cOKEifSO/cijd7zFfw== ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1796105216; h=Received:DKIM-Signature:Date:From:To:Cc:Subject:Message-ID: References:MIME-Version:Content-Type:Content-Disposition:In-Reply-To; bh=yLtACPMahxxH/rSP6aBv0O5hf53umDvrvQOExjiHKfc=; b=G+oq1ODs7v3wAAMKbLM9EFNa74WIULAZZChBvKQsXQaY0rQveGGHzoLD/AIbcpSKUk/p Jjp2274llLRoFaus0WkxjYq9Xa3brOJwzbNbAW8IpyPJoGw4meYta3ZLk2pFLxVoABmZT Or7EDh71eDzAQ+0zBw2TwQd1TlNeJkDFEDjVMLYFHg4kiCfaWIIzv5dvWg9lQz6WSv4vf 0xwRsID7QFpsWRPyNfF7Sn6VVpUEHhcozb9t16zDKYt95VKvfSWpkwSsJWkVYWPhoAuCl /3MtBLnx1jB1T1wuYH10NB1UkXgfPF13wpFnNF9UlT3SuxkcGkM42u2SUYnzSMMT/Yw== ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass header.d=linuxfoundation.org header.i=@linuxfoundation.org header.a=rsa-sha256 header.s=korg header.b=SNcDcvrX; arc=none smtp.remote-ip=100.103.45.18 Received: from smtp.kernel.org (quasi.space.kernel.org [100.103.45.18]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (prime256v1)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 995B6606A338; Tue, 1 Dec 2026 06:06:56 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.a=rsa-sha256 header.s=korg header.b=SNcDcvrX Received: by smtp.kernel.org (Postfix) with ESMTPSA id D7D151F00893; Tue, 1 Dec 2026 06:06:54 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linuxfoundation.org; s=korg; t=1796105215; bh=yLtACPMahxxH/rSP6aBv0O5hf53umDvrvQOExjiHKfc=; h=Date:From:To:Cc:Subject:References:In-Reply-To; b=SNcDcvrXtGTqahvg9vV8WLIrlTQcNVMhMpbI6bF4kolxUx4XQ/kHxyc6O2/oUIMJb 8m76GTwIJQAJeORH3Nliigms5J7iP5nULez3M0SrLeGE+xaJ8wc/MtpQHUEFtjTzSk aY2hPZYI+844qtJ7Ut2jejAIbUVCQudyaHqMO6XI= Date: Tue, 1 Dec 2026 07:06:52 +0100 From: Greg Kroah-Hartman To: Liu Chao Cc: Andrew Morton , Andy Shevchenko , "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Simon Horman , khtsai@google.com, fangxy@xiaopeng.com, Randy Dunlap , dbrownell@users.sourceforge.net, linux-usb@vger.kernel.org, linux-kernel@vger.kernel.org, netdev@vger.kernel.org Subject: Re: [PATCH v7 0/2] usb: gadget: u_ether: fix out-of-bounds read in get_ether_addr Message-ID: <2026120113-divinity-operate-e1b0@gregkh> References: <20261201024415.3340593-1-liuc63@xiaopeng.com> X-Mailing-List: linux-usb@vger.kernel.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20261201024415.3340593-1-liuc63@xiaopeng.com> On Tue, Dec 01, 2026 at 10:44:13AM +0800, Liu Chao wrote: > Rework of > > [PATCH v6] usb: gadget: u_ether: fix out-of-bounds read in get_ether_addr > https://lore.kernel.org/all/20261128080722.1469508-1-liuc63@xiaopeng.com/ > > following Andy's reply on the v6 2/2 thread: 1/2 prepares a parse_mac_pton() > helper in lib/net_utils.c, 2/2 uses it in get_ether_addr(). > > The two patches belong to different trees: 1/2 touches lib/ and should go via > netdev or -mm, 2/2 is for the USB tree. 2/2 depends on 1/2, so it can only be > applied once 1/2 has reached Linus' tree. That's not going to work well, are you sure this is the only way to resolve this? This feels like a crazy complex patch for an issue that is self-inflicted. Why not just resolve it in the gadget driver alone if it wants to handle such crazy inputs? greg k-h