Re: [PATCH v4] net: usb: rtl8150: set random MAC address when set_ethernet_addr() fails

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



From: Anant Thazhemadam <anant.thazhemadam@xxxxxxxxx>
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@xxxxxxxxxxxxxxxxxxxxxxxxx
> Tested-by: syzbot+abbc768b560c84d92fd3@xxxxxxxxxxxxxxxxxxxxxxxxx
> Acked-by: Petko Manolov <petkan@xxxxxxxxxxxxx>
> Signed-off-by: Anant Thazhemadam <anant.thazhemadam@xxxxxxxxx>

Applied, thank you.



[Index of Archives]     [Linux Media]     [Linux Input]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Old Linux USB Devel Archive]

  Powered by Linux