summaryrefslogtreecommitdiff
path: root/net/sched
diff options
context:
space:
mode:
authorAnant Thazhemadam <anant.thazhemadam@gmail.com>2020-10-05 18:59:58 +0530
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2020-10-14 10:33:06 +0200
commitdbb763107d3ee8ecfe1fc0e262158339e9875892 (patch)
tree4bad0cfd808492f6905207229b3c663e68055a50 /net/sched
parent6c9edf2d855a3456abce8ee1603a4114337ce3ee (diff)
net: usb: rtl8150: set random MAC address when set_ethernet_addr() fails
commit f45a4248ea4cc13ed50618ff066849f9587226b2 upstream. 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> Signed-off-by: David S. Miller <davem@davemloft.net> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'net/sched')
0 files changed, 0 insertions, 0 deletions