From: David Miller <davem@davemloft.net>
To: anant.thazhemadam@gmail.com
Cc: petkan@nucleusys.com,
syzbot+abbc768b560c84d92fd3@syzkaller.appspotmail.com,
netdev@vger.kernel.org, linux-usb@vger.kernel.org,
linux-kernel@vger.kernel.org, joe@perches.com, kuba@kernel.org,
linux-kernel-mentees@lists.linuxfoundation.org
Subject: Re: [Linux-kernel-mentees] [PATCH v4] net: usb: rtl8150: set random MAC address when set_ethernet_addr() fails
Date: Tue, 06 Oct 2020 06:10:41 -0700 (PDT) [thread overview]
Message-ID: <20201006.061041.2224252569656609542.davem@davemloft.net> (raw)
In-Reply-To: <20201005132958.5712-1-anant.thazhemadam@gmail.com>
From: Anant Thazhemadam <anant.thazhemadam@gmail.com>
Date: Mon, 5 Oct 2020 18:59:58 +0530
> 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.
>
> Reported-by: syzbot+abbc768b560c84d92fd3@syzkaller.appspotmail.com
> Tested-by: syzbot+abbc768b560c84d92fd3@syzkaller.appspotmail.com
> Acked-by: Petko Manolov <petkan@nucleusys.com>
> Signed-off-by: Anant Thazhemadam <anant.thazhemadam@gmail.com>
Applied, thank you.
_______________________________________________
Linux-kernel-mentees mailing list
Linux-kernel-mentees@lists.linuxfoundation.org
https://lists.linuxfoundation.org/mailman/listinfo/linux-kernel-mentees
prev parent reply other threads:[~2020-10-06 13:10 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-10-05 13:29 [Linux-kernel-mentees] [PATCH v4] net: usb: rtl8150: set random MAC address when set_ethernet_addr() fails Anant Thazhemadam
2020-10-06 13:10 ` David Miller [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20201006.061041.2224252569656609542.davem@davemloft.net \
--to=davem@davemloft.net \
--cc=anant.thazhemadam@gmail.com \
--cc=joe@perches.com \
--cc=kuba@kernel.org \
--cc=linux-kernel-mentees@lists.linuxfoundation.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-usb@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=petkan@nucleusys.com \
--cc=syzbot+abbc768b560c84d92fd3@syzkaller.appspotmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).