TencentOS-kernel/drivers
Anant Thazhemadam 708beaadfd 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>
2021-03-16 16:38:07 +08:00
..
accessibility Init Repo base on linux 5.4.32 long term, and add base tlinux kernel interfaces. 2021-03-16 11:01:34 +08:00
acpi ACPI: EC: Reference count query handlers under lock 2021-03-16 16:36:46 +08:00
amba Init Repo base on linux 5.4.32 long term, and add base tlinux kernel interfaces. 2021-03-16 11:01:34 +08:00
android binder: Prevent context manager from incrementing ref 0 2021-03-16 16:33:03 +08:00
ata ata: sata_mv, avoid trigerrable BUG_ON 2021-03-16 16:37:41 +08:00
atm atm: eni: fix the missed pci_disable_device() for eni_init_one() 2021-03-16 16:37:33 +08:00
auxdisplay Init Repo base on linux 5.4.32 long term, and add base tlinux kernel interfaces. 2021-03-16 11:01:34 +08:00
base driver core: Fix probe_count imbalance in really_probe() 2021-03-16 16:37:56 +08:00
bcma Init Repo base on linux 5.4.32 long term, and add base tlinux kernel interfaces. 2021-03-16 11:01:34 +08:00
block rbd: require global CAP_SYS_ADMIN for mapping and unmapping 2021-03-16 16:36:06 +08:00
bluetooth Bluetooth: btrtl: Use kvmalloc for FW allocations 2021-03-16 16:36:48 +08:00
bus bus: hisi_lpc: Fixup IO ports addresses to avoid use-after-free in host removal 2021-03-16 16:36:56 +08:00
cdrom Init Repo base on linux 5.4.32 long term, and add base tlinux kernel interfaces. 2021-03-16 11:01:34 +08:00
char ipmi:bt-bmc: Fix error handling and status check 2021-03-16 16:37:18 +08:00
clk clk: samsung: exynos4: mark 'chipid' clock as CLK_IGNORE_UNUSED 2021-03-16 16:37:48 +08:00
clocksource clocksource/drivers/timer-gx6605s: Fixup counter reload 2021-03-16 16:37:44 +08:00
connector Init Repo base on linux 5.4.32 long term, and add base tlinux kernel interfaces. 2021-03-16 11:01:34 +08:00
counter counter: 104-quad-8: Add lock guards - generic interface 2021-03-16 16:27:07 +08:00
cpufreq cpufreq: powernv: Fix frame-size-overflow in powernv_cpufreq_work_fn 2021-03-16 16:37:05 +08:00
cpuidle cpuidle: Fixup IRQ state 2021-03-16 16:35:25 +08:00
crypto crypto: chelsio - This fixes the kernel panic which occurs during a libkcapi test 2021-03-16 16:36:52 +08:00
dax dax: Fix alloc_dax_region() compile warning 2021-03-16 16:36:36 +08:00
dca Init Repo base on linux 5.4.32 long term, and add base tlinux kernel interfaces. 2021-03-16 11:01:34 +08:00
devfreq PM / devfreq: tegra30: Fix integer overflow on CPU's freq max out 2021-03-16 16:36:35 +08:00
dio Init Repo base on linux 5.4.32 long term, and add base tlinux kernel interfaces. 2021-03-16 11:01:34 +08:00
dma dmaengine: tegra-apb: Prevent race conditions on channel's freeing 2021-03-16 16:36:55 +08:00
dma-buf dmabuf: fix NULL pointer dereference in dma_buf_release() 2021-03-16 16:37:40 +08:00
edac EDAC/ghes: Check whether the driver is on the safe list correctly 2021-03-16 16:37:31 +08:00
eisa Init Repo base on linux 5.4.32 long term, and add base tlinux kernel interfaces. 2021-03-16 11:01:34 +08:00
extcon extcon: adc-jack: Fix an error handling path in 'adc_jack_probe()' 2021-03-16 16:30:26 +08:00
firewire Init Repo base on linux 5.4.32 long term, and add base tlinux kernel interfaces. 2021-03-16 11:01:34 +08:00
firmware firmware: arm_sdei: Use cpus_read_lock() to avoid races with cpuhp 2021-03-16 16:36:56 +08:00
fpga fpga: dfl: fix bug in port reset handshake 2021-03-16 16:32:23 +08:00
fsi Init Repo base on linux 5.4.32 long term, and add base tlinux kernel interfaces. 2021-03-16 11:01:34 +08:00
gnss gnss: sirf: fix error return code in sirf_probe() 2021-03-16 16:29:47 +08:00
gpio gpio: aspeed: fix ast2600 bank properties 2021-03-16 16:37:49 +08:00
gpu drm/amdgpu: prevent double kfree ttm->sg 2021-03-16 16:38:01 +08:00
greybus Init Repo base on linux 5.4.32 long term, and add base tlinux kernel interfaces. 2021-03-16 11:01:34 +08:00
hid HID: elan: Fix memleak in elan_input_configured 2021-03-16 16:35:58 +08:00
hsi Init Repo base on linux 5.4.32 long term, and add base tlinux kernel interfaces. 2021-03-16 11:01:34 +08:00
hv Drivers: hv: vmbus: Add timeout to vmbus_wait_for_unload 2021-03-16 16:36:17 +08:00
hwmon hwmon: (applesmc) check status earlier. 2021-03-16 16:35:24 +08:00
hwspinlock Init Repo base on linux 5.4.32 long term, and add base tlinux kernel interfaces. 2021-03-16 11:01:34 +08:00
hwtracing coresight: etm4x: Fix use-after-free of per-cpu etm drvdata 2021-03-16 16:37:19 +08:00
i2c i2c: owl: Clear NACK and BUS error bits 2021-03-16 16:38:00 +08:00
i3c Init Repo base on linux 5.4.32 long term, and add base tlinux kernel interfaces. 2021-03-16 11:01:34 +08:00
ide Init Repo base on linux 5.4.32 long term, and add base tlinux kernel interfaces. 2021-03-16 11:01:34 +08:00
idle Init Repo base on linux 5.4.32 long term, and add base tlinux kernel interfaces. 2021-03-16 11:01:34 +08:00
iio iio: adc: qcom-spmi-adc5: fix driver name 2021-03-16 16:37:43 +08:00
infiniband IB/iser: Always check sig MR before putting it to the free pool 2021-03-16 16:37:08 +08:00
input Input: ati_remote2 - add missing newlines when printing module parameters 2021-03-16 16:38:07 +08:00
interconnect Init Repo base on linux 5.4.32 long term, and add base tlinux kernel interfaces. 2021-03-16 11:01:34 +08:00
iommu iommu/vt-d: Fix lockdep splat in iommu_flush_dev_iotlb() 2021-03-16 16:38:01 +08:00
ipack ipack: tpci200: fix error return code in tpci200_register() 2021-03-16 16:28:19 +08:00
irqchip irqchip/stm32-exti: Avoid losing interrupts due to clearing pending bits by mistake 2021-03-16 16:35:14 +08:00
isdn Init Repo base on linux 5.4.32 long term, and add base tlinux kernel interfaces. 2021-03-16 11:01:34 +08:00
leds leds: mlxreg: Fix possible buffer overflow 2021-03-16 16:36:35 +08:00
lightnvm Init Repo base on linux 5.4.32 long term, and add base tlinux kernel interfaces. 2021-03-16 11:01:34 +08:00
macintosh macintosh/via-macii: Access autopoll_devs when inside lock 2021-03-16 16:33:39 +08:00
mailbox mailbox: zynqmp-ipi: Fix NULL vs IS_ERR() check in zynqmp_ipi_mbox_probe() 2021-03-16 16:30:27 +08:00
mcb Init Repo base on linux 5.4.32 long term, and add base tlinux kernel interfaces. 2021-03-16 11:01:34 +08:00
md dm: fix bio splitting and its bio completion order for regular IO 2021-03-16 16:37:41 +08:00
media media: venus: vdec: Init registered list unconditionally 2021-03-16 16:37:15 +08:00
memory Init Repo base on linux 5.4.32 long term, and add base tlinux kernel interfaces. 2021-03-16 11:01:34 +08:00
memstick memstick: Skip allocating card when removing host 2021-03-16 16:37:44 +08:00
message scsi: mptscsih: Fix read sense data size 2021-03-16 16:31:28 +08:00
mfd mfd: mfd-core: Protect against NULL call-back function pointer 2021-03-16 16:36:37 +08:00
misc habanalabs: check correct vmalloc return code 2021-03-16 16:35:25 +08:00
mmc mmc: core: don't set limits.discard_granularity as 0 2021-03-16 16:38:06 +08:00
mtd ubi: fastmap: Free unused fastmap anchor peb during detach 2021-03-16 16:37:28 +08:00
mux Init Repo base on linux 5.4.32 long term, and add base tlinux kernel interfaces. 2021-03-16 11:01:34 +08:00
net net: usb: rtl8150: set random MAC address when set_ethernet_addr() fails 2021-03-16 16:38:07 +08:00
nfc NFC: st95hf: Fix memleak in st95hf_in_send_cmd 2021-03-16 16:35:54 +08:00
ntb NTB: perf: Fix race condition when run with ntb_test 2021-03-16 16:30:32 +08:00
nubus Init Repo base on linux 5.4.32 long term, and add base tlinux kernel interfaces. 2021-03-16 11:01:34 +08:00
nvdimm libnvdimm/security: ensure sysfs poll thread woke up and fetch updated attr 2021-03-16 16:34:18 +08:00
nvme nvme-tcp: check page by sendpage_ok() before calling kernel_sendpage() 2021-03-16 16:37:59 +08:00
nvmem nvmem: qfprom: remove incorrect write support 2021-03-16 16:28:52 +08:00
of of: of_mdio: Correct loop scanning logic 2021-03-16 16:31:51 +08:00
opp opp: Increase parsed_static_opps in _of_add_opp_table_v1() 2021-03-16 16:37:28 +08:00
oprofile Init Repo base on linux 5.4.32 long term, and add base tlinux kernel interfaces. 2021-03-16 11:01:34 +08:00
parisc parisc: mask out enable and reserved bits from sba imask 2021-03-16 16:33:54 +08:00
parport Init Repo base on linux 5.4.32 long term, and add base tlinux kernel interfaces. 2021-03-16 11:01:34 +08:00
pci PCI: tegra: Fix runtime PM imbalance on error 2021-03-16 16:37:24 +08:00
pcmcia Init Repo base on linux 5.4.32 long term, and add base tlinux kernel interfaces. 2021-03-16 11:01:34 +08:00
perf drivers/perf: Prevent forced unbinding of PMU drivers 2021-03-16 16:32:34 +08:00
phy phy: ti: am654: Fix a leak in serdes_am654_probe() 2021-03-16 16:37:48 +08:00
pinctrl pinctrl: mvebu: Fix i2c sda definition for 98DX3236 2021-03-16 16:37:48 +08:00
platform platform/x86: fix kconfig dependency warning for FUJITSU_LAPTOP 2021-03-16 16:38:02 +08:00
pnp Init Repo base on linux 5.4.32 long term, and add base tlinux kernel interfaces. 2021-03-16 11:01:34 +08:00
power power: supply: max17040: Correct voltage reading 2021-03-16 16:37:16 +08:00
powercap Init Repo base on linux 5.4.32 long term, and add base tlinux kernel interfaces. 2021-03-16 11:01:34 +08:00
pps Init Repo base on linux 5.4.32 long term, and add base tlinux kernel interfaces. 2021-03-16 11:01:34 +08:00
ps3 Init Repo base on linux 5.4.32 long term, and add base tlinux kernel interfaces. 2021-03-16 11:01:34 +08:00
ptp Init Repo base on linux 5.4.32 long term, and add base tlinux kernel interfaces. 2021-03-16 11:01:34 +08:00
pwm pwm: bcm-iproc: handle clk_get_rate() return 2021-03-16 16:34:17 +08:00
rapidio rapidio: avoid data race between file operation callbacks and mport_cdev_add(). 2021-03-16 16:37:25 +08:00
ras Init Repo base on linux 5.4.32 long term, and add base tlinux kernel interfaces. 2021-03-16 11:01:34 +08:00
regulator regulator: axp20x: fix LDO2/4 description 2021-03-16 16:37:37 +08:00
remoteproc remoteproc: qcom_q6v5_mss: Validate modem blob firmware size before load 2021-03-16 16:34:10 +08:00
reset Init Repo base on linux 5.4.32 long term, and add base tlinux kernel interfaces. 2021-03-16 11:01:34 +08:00
rpmsg Init Repo base on linux 5.4.32 long term, and add base tlinux kernel interfaces. 2021-03-16 11:01:34 +08:00
rtc rtc: ds1374: fix possible race condition 2021-03-16 16:37:01 +08:00
s390 s390/zcrypt: Fix ZCRYPT_PERDEV_REQCNT ioctl 2021-03-16 16:37:40 +08:00
sbus Init Repo base on linux 5.4.32 long term, and add base tlinux kernel interfaces. 2021-03-16 11:01:34 +08:00
scsi scsi: lpfc: Fix initial FLOGI failure due to BBSCN not supported 2021-03-16 16:37:38 +08:00
sfi Init Repo base on linux 5.4.32 long term, and add base tlinux kernel interfaces. 2021-03-16 11:01:34 +08:00
sh Init Repo base on linux 5.4.32 long term, and add base tlinux kernel interfaces. 2021-03-16 11:01:34 +08:00
siox Init Repo base on linux 5.4.32 long term, and add base tlinux kernel interfaces. 2021-03-16 11:01:34 +08:00
slimbus slimbus: core: Fix mismatch in of_node_get/put 2021-03-16 16:32:05 +08:00
soc soc: qcom: rpmh-rsc: Set suppress_bind_attrs flag 2021-03-16 16:33:19 +08:00
soundwire soundwire: bus: disable pm_runtime in sdw_slave_delete 2021-03-16 16:36:55 +08:00
spi spi: fsl-espi: Only process interrupts for expected events 2021-03-16 16:37:47 +08:00
spmi Init Repo base on linux 5.4.32 long term, and add base tlinux kernel interfaces. 2021-03-16 11:01:34 +08:00
ssb Init Repo base on linux 5.4.32 long term, and add base tlinux kernel interfaces. 2021-03-16 11:01:34 +08:00
staging staging:r8188eu: avoid skb_clone for amsdu to msdu conversion 2021-03-16 16:37:14 +08:00
target scsi: target: iscsi: Fix hang in iscsit_access_np() when getting tpg->np_login_sem 2021-03-16 16:36:05 +08:00
tc Init Repo base on linux 5.4.32 long term, and add base tlinux kernel interfaces. 2021-03-16 11:01:34 +08:00
tee Init Repo base on linux 5.4.32 long term, and add base tlinux kernel interfaces. 2021-03-16 11:01:34 +08:00
thermal thermal: rcar_thermal: Handle probe error gracefully 2021-03-16 16:37:03 +08:00
thunderbolt Init Repo base on linux 5.4.32 long term, and add base tlinux kernel interfaces. 2021-03-16 11:01:34 +08:00
tty tty: serial: samsung: Correct clock selection logic 2021-03-16 16:37:17 +08:00
uio uio_pdrv_genirq: fix use without device tree and no interrupt 2021-03-16 16:32:12 +08:00
usb USB: gadget: f_ncm: Fix NDP16 datagram validation 2021-03-16 16:37:42 +08:00
vfio vfio/pci: fix racy on error and request eventfd ctx 2021-03-16 16:37:27 +08:00
vhost vhost: Use vhost_get_used_size() in vhost_vring_set_addr() 2021-03-16 16:37:54 +08:00
video fbcon: Fix global-out-of-bounds read in fbcon_get_font() 2021-03-16 16:37:52 +08:00
virt virt: vbox: Fix guest capabilities mask check 2021-03-16 16:32:09 +08:00
virtio virtio_ring: Avoid loop when vq is broken in virtqueue_poll 2021-03-16 16:34:34 +08:00
visorbus Init Repo base on linux 5.4.32 long term, and add base tlinux kernel interfaces. 2021-03-16 11:01:34 +08:00
vlynq Init Repo base on linux 5.4.32 long term, and add base tlinux kernel interfaces. 2021-03-16 11:01:34 +08:00
vme Init Repo base on linux 5.4.32 long term, and add base tlinux kernel interfaces. 2021-03-16 11:01:34 +08:00
w1 w1: omap-hdq: cleanup to add missing newline for some dev_dbg 2021-03-16 16:29:53 +08:00
watchdog watchdog: initialize device before misc_register 2021-03-16 16:34:19 +08:00
xen xen/xenbus: Fix granting of vmalloc'd memory 2021-03-16 16:35:26 +08:00
zorro Init Repo base on linux 5.4.32 long term, and add base tlinux kernel interfaces. 2021-03-16 11:01:34 +08:00
Kconfig Init Repo base on linux 5.4.32 long term, and add base tlinux kernel interfaces. 2021-03-16 11:01:34 +08:00
Makefile Init Repo base on linux 5.4.32 long term, and add base tlinux kernel interfaces. 2021-03-16 11:01:34 +08:00