Article View: linux.kernel.netdev
Article #25155Re: [PATCH v7 0/2] usb: gadget: u_ether: fix out-of-bounds read in get_ether_addr
From: Andy Shevchenko
Date: Tue, 01 Dec 2026 10:14
Date: Tue, 01 Dec 2026 10:14
27 lines
10534 bytes
10534 bytes
On Tue, Dec 01, 2026 at 07:06:52AM +0100, Greg Kroah-Hartman wrote: > 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? lib patch may easily go via USB tree. There is a made-up issue. -- With Best Regards, Andy Shevchenko
Technical Details
Message-ID:
<aw6eFlBM8dJmJvCi@ashevche-desk.local>Path:
mbox-mo1.pugleaf.net!srl.newsdeef.eu!news.mb-net.net!open-news-network.org!news.nntp4.net!nntp.xenet.de!news.neodome.net!usenet.network!.POSTED!vger.kernel.org!netdev+bounces-374931-linux-kernel-netdev=dewy.ruReferences:
<20261201024415.3340593-1-liuc63@xiaopeng.com> <2026120113-divinity-operate-e1b0@gregkh>Show Full Headers
Complete Article Headers
Path: mbox-mo1.pugleaf.net!srl.newsdeef.eu!news.mb-net.net!open-news-network.org!news.nntp4.net!nntp.xenet.de!news.neodome.net!usenet.network!.POSTED!vger.kernel.org!netdev+bounces-374931-linux-kernel-netdev=dewy.ru From: andriy.shevchenko@intel.com (Andy Shevchenko) Newsgroups: linux.kernel.netdev Subject: Re: [PATCH v7 0/2] usb: gadget: u_ether: fix out-of-bounds read in get_ether_addr Date: Tue, 1 Dec 2026 12:14:46 +0200 Organization: Usenet Network Message-ID: <aw6eFlBM8dJmJvCi@ashevche-desk.local> References: <20261201024415.3340593-1-liuc63@xiaopeng.com> <2026120113-divinity-operate-e1b0@gregkh> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Injection-Info: usenet.network; logging-data="1682951"; mail-complaints-to="abuse@usenet.network" Cancel-Lock: sha1:9prO30Q4brOmYNLifiLmIQSrdds= sha256:JD4yGXDJC0HUjm36QvV4DQGvgI9ErNaPKVyWyJDQuUg= sha1:pkpBTbgtNOp/URd/bucCuxujlLw= sha256:i99ZsWpi+bKtM2l+2P8gDSeXwzQJiWlxfXwEzW6cO0c= Content-Disposition: inline List-ID: <netdev.vger.kernel.org> X-Mailpost-Empty-Hdrs: X-Spam-Level X-Received: from localhost (localhost [127.0.0.1]) by mail.dewy.ru (Postfix) with ESMTP id 5FA8611731F; Tue, 1 Dec 2026 13:15:08 +0300 (MSK) X-Virus-Scanned: Debian amavisd-new at usenet.network X-Spam-Flag: NO X-Spam-Score: -3.051 X-Spam-Status: No, score=-3.051 tagged_above=-9999 required=6.31 tests=[DCC_REPUT_70_89=0.1, DKIMWL_WL_HIGH=-0.001, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, HEADER_FROM_DIFFERENT_DOMAINS=0.249, MAILING_LIST_MULTI=-1, RCVD_IN_DNSWL_MED=-2.3, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, URIBL_BLOCKED=0.001] autolearn=ham autolearn_force=no X-Authentication-Results: mail.dewy.ru (amavisd-new); dkim=pass (2048-bit key) header.d=intel.com X-Received: from mail.dewy.ru ([127.0.0.1]) by localhost (mail.dewy.ru [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id R_1s1NRtOPB3; Tue, 1 Dec 2026 13:15:04 +0300 (MSK) X-Received-SPF: Pass (mailfrom) identity=mailfrom; client-ip=172.234.253.10; helo=sea.lore.kernel.org; envelope-from=netdev+bounces-374931-linux-kernel-netdev=dewy.ru@vger.kernel.org; receiver=<UNKNOWN> X-Authentication-Results: OpenDMARC; dmarc=fail (p=none dis=none) header.from=intel.com X-Received: from sea.lore.kernel.org (sea.lore.kernel.org [172.234.253.10]) by mail.dewy.ru (Postfix) with ESMTPS id 2622D1172D9; Tue, 1 Dec 2026 13:14:56 +0300 (MSK) X-Received: from smtp.subspace.kernel.org (conduit.subspace.kernel.org [100.77.114.92]) by sea.lore.kernel.org (Postfix) with ESMTP id 79ACF324A6; Tue, 1 Dec 2026 10:14:54 +0000 (UTC) X-Authentication-Results: smtp.subspace.kernel.org; arc=pass header.oldest-pass=0 smtp.remote-ip=127.0.0.1 X-ARC-Seal: i=2; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=pass; t=1796120094; b=f3Xp/poDPqApHaImh5O7SzyjS4CPLpVS5cjeRFLUmfS2ZiFnT2gidRKsEWvt70Y+ApJw 2RevOJ65YkQU07nCgFEIwGsTUMdpbCwEkIc/PgY3+afiHUImCqdH/OBCNE2BOtjiqmvEB OugHt3wwdj4TWLIWkKYXm/TWQbBqV7nQc0h7BoPlQ5L3IHJX/qhia2fOR57rp0o7Uzlwl eYjk/6XnwU2+cqPQ8/NU/o5ULlQsyWG88G20HEnGtZu+oVoqBepkBE8e6HvwEZ9aWxQCc 9MQSobmAn9ow2rdz0opjcgsBG6s0v8KQM0pluUU9xrh/q07m/4TJLXefobbn7BPkhHg== X-ARC-Message-Signature: i=2; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1796120094; h=X-Original-To:Received:DMARC-Filter:DKIM-Signature: X-CSE-ConnectionGUID:X-CSE-MsgGUID:X-IronPort-AV:X-IronPort-AV: Received:X-CSE-ConnectionGUID:X-CSE-MsgGUID:X-ExtLoop1:X-IronPort-AV: Received:Date:From:To:Cc:Subject:Message-ID:References:X-Mailing-List: List-Id:List-Post:List-Help:List-Subscribe:List-Unsubscribe: List-Owner:Precedence:MIME-Version:Content-Type:Content-Disposition: In-Reply-To:Organization; bh=KPZWB2y1dLNih8QBqxS/8jucPK2HI3sokVi1pNb9Vos=; b=OSArqzhrjaeZN6DRe/Po5qv3h0tVIbJby2uHEeZtHSzuLK7OaDp5HoeFJ2h/Fid80iEw biP+jiai7qLFDYv5Lo9jVq5F3IPQ/08zjN6sA7j4Xyecm2hbp4FtKTf2mNDFyDLIe8Tv3 2LzzxSiCzY3A7NcGwyuWSvUynPFPwzLC3r0mpWwZrnCrQ+ytfV+2mUb2Q0JcH/Ucyf1SE MZaZFr7IfVz7fE+6wzLYs06SvWCCkhnfFJ8v3ZcViMbN36VmpacYNRhhabLUTYz62FTjO jNRhDfFgS31GC+vs1LdQDVwPvyWS/6D5z5ptCDuVD0ArCx0WIeKglLglVTc3AiVMsbw== X-ARC-Authentication-Results: i=2; smtp.subspace.kernel.org; dkim=pass header.d=intel.com header.i=@intel.com header.a=rsa-sha256 header.s=Intel header.b=jytpKehD; dmarc=pass header.from=intel.com; spf=pass smtp.mailfrom=intel.com; arc=pass header.oldest-pass=0 smtp.remote-ip=127.0.0.1 X-Received: from localhost.localdomain (localhost [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 2BFB8606A337; Tue, 1 Dec 2026 10:14:54 +0000 (UTC) X-Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.a=rsa-sha256 header.s=Intel header.b=jytpKehD X-Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=198.175.65.10 X-ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1796120093; b=kQ0biclvOgx7iDptrCR/Dnh31hcgaeZP4lcf1vDtcYhIW9MDHduuypeOvbozxmodPB5m J06dGI2+v7Ls8wIFqz6wj5NkveIIpuEuaisN7VRwM+k1JbdYaMNrAsXH4U0jqQy3Egy8E EMjhyK2KAig+Cz83V72cL0vFMZ7EwR2/R1tz9vxbNJ7+RKgnjdkoDAMcuV5gdyp7R1AHB o91slc7qDVGhnoqXKMPKPCngrKtGYVZMF7OBYdQ/nKLEIKkFz2qI0JdKs1Ud3myCqfhE/ 9iSoKEEliOWoG/G1UAUmT2h+mpeMlxDgtIkMmalF30BjnOOchm9bRCNptQmsqjCI7Vw== X-ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1796120093; h=DMARC-Filter:DKIM-Signature:X-CSE-ConnectionGUID:X-CSE-MsgGUID: X-IronPort-AV:X-IronPort-AV:Received:X-CSE-ConnectionGUID: X-CSE-MsgGUID:X-ExtLoop1:X-IronPort-AV:Received:Date:From:To:Cc: Subject:Message-ID:References:MIME-Version:Content-Type: Content-Disposition:In-Reply-To:Organization; bh=KPZWB2y1dLNih8QBqxS/8jucPK2HI3sokVi1pNb9Vos=; b=Hv76hSGELpJtelvvn1+ijLucX+8zGCC5miLN+eIRuFWIJNoOBFqFFRWYVvGFEu+twn7v +1fb30Hr76FVqrZwdByCgNwbwXF6+8CWtEB0L4vWcKGQibPw2QafilihlaUyPD1/+ziuz e15mMpHh8YrtztsCb862NlK4R+D7jRkAcfTOuvS/2RsjGOLAdVhWRP5TxEbehs895oUNi 5i7hXYDhzAQUoTHInSFMfnokweQn0dCVa8rMsyrp8JfpchWpYDLH1G/ja6pl4z88fWXdi eRQSqXA8T8JbOO7H+dU2z35n2dqFa5kVFJ2xbQhNcDHM4hAPNTvXuW/I73o2vJqZjnQ== X-ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass header.from=intel.com; spf=pass smtp.mailfrom=intel.com; dkim=pass header.d=intel.com header.i=@intel.com header.a=rsa-sha256 header.s=Intel header.b=jytpKehD; arc=none smtp.remote-ip=198.175.65.10 X-Received: from mgamail.intel.com (mgamail.intel.com [198.175.65.10]) (using TLSv1.2 with cipher ECDHE-ECDSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 5F190606A31A; Tue, 1 Dec 2026 10:14:52 +0000 (UTC) X-DMARC-Filter: OpenDMARC Filter v1.4.2 smtp.subspace.kernel.org 5F190606A31A X-Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=intel.com X-Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=intel.com X-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1796120092; x=1827656092; h=date:from:to:cc:subject:message-id:references: mime-version:in-reply-to; bh=KPZWB2y1dLNih8QBqxS/8jucPK2HI3sokVi1pNb9Vos=; b=jytpKehDGjNGoN3shcwhhQIWu00OyeQMESctpzjdnTXXs7uQ5ThmCll4 53uidOi2Vcdvjsy7sG8D5fXLFOgmxb4ZcqaQWFpSt7Tmgbz1c9/X6o22C 74AS0FnIr5umx5MtVHWtptwsQcs49BMeZqfPabKnDUQy0XYQal4x5q6TC oo14nufGe7ohuCLbyCYvJHRWQaIzFh3bqMd+lNZq5nXsYAbewJSGnVD+J 3QyFHKaLQ96ROQe3H9PJVSDZvGaaNgBhZvz+HVFnRT9kZvvBxo5MZHden WIXhmZUDVTD3XOd79hFTNM9GOHWHVJ1AC3f2gNT9PLaCpalZhWdpBdsLC w==; X-CSE-ConnectionGUID: 9j/B+qu3SzqSWRV9ngNXXg== X-CSE-MsgGUID: lu5PPJKPSa20MO3oZ81KoQ== X-IronPort-AV: E=McAfee;i="6800,10657,11982"; a="4926939" X-IronPort-AV: E=Sophos;i="6.27,244,1787036400"; d="scan'208";a="4926939" X-Received: from fmviesa008.fm.intel.com ([10.60.135.148]) by orvoesa102.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 01 Dec 2026 02:14:52 -0800 X-CSE-ConnectionGUID: FaWrmgJ2Q9G48NIA/D/jCw== X-CSE-MsgGUID: k/VfyE/2TzmZfUAPjDLaBA== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.27,244,1787036400"; d="scan'208";a="13510794" X-Received: from conormcd-mobl2.ger.corp.intel.com (HELO localhost) ([10.245.245.17]) by smtpauth.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 01 Dec 2026 02:14:49 -0800 X-Cc: Liu Chao <liuc63@xiaopeng.com>, Andrew Morton <akpm@linux-foundation.org>, "David S. Miller" <davem@davemloft.net>, Eric Dumazet <edumazet@kernel.org>, Jakub Kicinski <kuba@kernel.org>, Paolo Abeni <pabeni@redhat.com>, Simon Horman <horms@kernel.org>, khtsai@google.com, fangxy@xiaopeng.com, Randy Dunlap <rdunlap@infradead.org>, dbrownell@users.sourceforge.net, linux-usb@vger.kernel.org, linux-kernel@vger.kernel.org, netdev@vger.kernel.org X-Mailing-List: netdev@vger.kernel.org X-List-Post: <mailto:netdev@vger.kernel.org> X-List-Help: <mailto:netdev+help@vger.kernel.org> X-List-Subscribe: <mailto:netdev+subscribe@vger.kernel.org> X-List-Unsubscribe: <mailto:netdev+unsubscribe@vger.kernel.org> X-List-Owner: <mailto:netdev+owner@vger.kernel.org> X-Precedence: list X-In-Reply-To: <2026120113-divinity-operate-e1b0@gregkh> X-Organization: Intel Finland Oy - BIC 0357606-4 - c/o Alberga Business Park, 6 krs, Bertel Jungin Aukio 5, 02600 Espoo