Received: by 2002:a05:6a10:6744:0:0:0:0 with SMTP id w4csp643741pxu; Wed, 14 Oct 2020 10:00:13 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwX2QKm9m7/JOoezoRs1RLcwCemSNzqWhNbu+gcjK+Tnhhv6eyJpn4uXa8sChrN5JocxCQN X-Received: by 2002:a05:6402:22b7:: with SMTP id cx23mr6503426edb.246.1602694813472; Wed, 14 Oct 2020 10:00:13 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1602694813; cv=none; d=google.com; s=arc-20160816; b=l6kc3Xteg/ymwf6sHb4NGtSsSPq8qGJSrw+8U6ITgsvWrGV6oUrbnItGIqbJIicXLY JT32VFHSYeIIJJ+8Zwrct7nPBCUIV9ywmGcDm5yBrRYGy+FmOPb0pgfLH01rMTOVfkhi cZwoWWEa8TjQhNGrhEgU/1guWn9WSDMy/pe1MYSU7TqjO0qfUTzddZjHaI7eDnanGJNb +TJ4hG35AOWG/i8oc1ls2H5REL4ywICgE8qEOthLMGPpEY3ignRC1jwhPvBXmmvv/Vsy U0ZpBasMvBBmWPEFJQG30IPVBCDCTMBoCTh8VDkU3fffuL020Cxs+x2rT7LAaBWbZvE9 U5Rg== 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=24vsJpPQTdM8H9EtlxuzucDd/htl82GYo9cCMM/3OqA=; b=Ev72+hIEXXl+UFqAOOJpFIMtHZr1UnBxd1Za/0SRcegd9OhGWe/ORNZWZBJXjnHFUI Dio6F6kPE8bud8BtzSNL8NlIdPdPXrzfuTsoGLbbdywdk36y/P5c2oMRPWs+iex8gwXX zD555Tdbel7fgW1T6PmM00XaejiIEZvgqz2k+s62Bjp5TbD9TN4MRSpfA6gV/vm7org5 foGZ2HfZmjgJD1rJRwv599niAoPeAavPRUDR2R2++Advw6SzNmeKpXHt858ukneFULo0 xvkq77XLPdr0kGv757BOtyZmiumiG+k9YAwoBdWoP55QK2VhsQS6Qrn0W6a7TDGrxlsn mxeg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=xmTnyTHR; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id d17si42589edj.42.2020.10.14.09.59.51; Wed, 14 Oct 2020 10:00:13 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=xmTnyTHR; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2388824AbgJNOEF (ORCPT + 99 others); Wed, 14 Oct 2020 10:04:05 -0400 Received: from mail.kernel.org ([198.145.29.99]:35538 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728086AbgJNOEE (ORCPT ); Wed, 14 Oct 2020 10:04:04 -0400 Received: from localhost (c-73-47-72-35.hsd1.nh.comcast.net [73.47.72.35]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 45F022072D; Wed, 14 Oct 2020 14:04:03 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1602684243; bh=heP+SDNFV0lDWgTbjCwam9BghiQiUU/MWiB+oQoekcs=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=xmTnyTHRF35IJL6H0DAj3zdOZuyRJuwMvSF63rcbq1EXGy/etny5iWdtXUcZCGejr uPkvAz8OXPBfzauto7XArjuiEgOEYgRnhdpW/UMJQIbTzrWYJYFdcdCpSKvBVrhfbg 4z5Hvbhb918Jr7eASeakCR4lOZJF/gUS9gx8IEHk= Date: Wed, 14 Oct 2020 10:04:01 -0400 From: Sasha Levin To: Petko Manolov Cc: Joe Perches , linux-kernel@vger.kernel.org, stable@vger.kernel.org, Anant Thazhemadam , syzbot+abbc768b560c84d92fd3@syzkaller.appspotmail.com, "David S . Miller" , linux-usb@vger.kernel.org, netdev@vger.kernel.org Subject: Re: [PATCH AUTOSEL 5.8 18/24] net: usb: rtl8150: set random MAC address when set_ethernet_addr() fails Message-ID: <20201014140401.GR2415204@sasha-vm> References: <20201012190239.3279198-1-sashal@kernel.org> <20201012190239.3279198-18-sashal@kernel.org> <20201012210105.GA26582@nucleusys.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii; format=flowed Content-Disposition: inline In-Reply-To: <20201012210105.GA26582@nucleusys.com> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Oct 13, 2020 at 12:01:06AM +0300, Petko Manolov wrote: >On 20-10-12 12:11:18, Joe Perches wrote: >> On Mon, 2020-10-12 at 15:02 -0400, Sasha Levin wrote: >> > From: Anant Thazhemadam >> > >> > [ Upstream commit f45a4248ea4cc13ed50618ff066849f9587226b2 ] >> > >> > When get_registers() fails in set_ethernet_addr(),the uninitialized >> > value of node_id gets copied over as the address. >> > So, check the return value of get_registers(). >> > >> > If get_registers() executed successfully (i.e., it returns >> > sizeof(node_id)), copy over the MAC address using ether_addr_copy() >> > (instead of using memcpy()). >> > >> > Else, if get_registers() failed instead, a randomly generated MAC >> > address is set as the MAC address instead. >> >> This autosel is premature. >> >> This patch always sets a random MAC. >> See the follow on patch: https://lkml.org/lkml/2020/10/11/131 >> To my knowledge, this follow-ob has yet to be applied: > >ACK, the follow-on patch has got the correct semantics. I'll hold off on this patch until the follow-on is merged, thanks! -- Thanks, Sasha