linux-stable/drivers/staging
Wang Cheng 76a964ad0e staging: rtl8712: fix uninit-value in r871xu_drv_init()
[ Upstream commit 0458e5428e ]

When 'tmpU1b' returns from r8712_read8(padapter, EE_9346CR) is 0,
'mac[6]' will not be initialized.

BUG: KMSAN: uninit-value in r871xu_drv_init+0x2d54/0x3070 drivers/staging/rtl8712/usb_intf.c:541
 r871xu_drv_init+0x2d54/0x3070 drivers/staging/rtl8712/usb_intf.c:541
 usb_probe_interface+0xf19/0x1600 drivers/usb/core/driver.c:396
 really_probe+0x653/0x14b0 drivers/base/dd.c:596
 __driver_probe_device+0x3e9/0x530 drivers/base/dd.c:752
 driver_probe_device drivers/base/dd.c:782 [inline]
 __device_attach_driver+0x79f/0x1120 drivers/base/dd.c:899
 bus_for_each_drv+0x2d6/0x3f0 drivers/base/bus.c:427
 __device_attach+0x593/0x8e0 drivers/base/dd.c:970
 device_initial_probe+0x4a/0x60 drivers/base/dd.c:1017
 bus_probe_device+0x17b/0x3e0 drivers/base/bus.c:487
 device_add+0x1fff/0x26e0 drivers/base/core.c:3405
 usb_set_configuration+0x37e9/0x3ed0 drivers/usb/core/message.c:2170
 usb_generic_driver_probe+0x13c/0x300 drivers/usb/core/generic.c:238
 usb_probe_device+0x309/0x570 drivers/usb/core/driver.c:293
 really_probe+0x653/0x14b0 drivers/base/dd.c:596
 __driver_probe_device+0x3e9/0x530 drivers/base/dd.c:752
 driver_probe_device drivers/base/dd.c:782 [inline]
 __device_attach_driver+0x79f/0x1120 drivers/base/dd.c:899
 bus_for_each_drv+0x2d6/0x3f0 drivers/base/bus.c:427
 __device_attach+0x593/0x8e0 drivers/base/dd.c:970
 device_initial_probe+0x4a/0x60 drivers/base/dd.c:1017
 bus_probe_device+0x17b/0x3e0 drivers/base/bus.c:487
 device_add+0x1fff/0x26e0 drivers/base/core.c:3405
 usb_new_device+0x1b8e/0x2950 drivers/usb/core/hub.c:2566
 hub_port_connect drivers/usb/core/hub.c:5358 [inline]
 hub_port_connect_change drivers/usb/core/hub.c:5502 [inline]
 port_event drivers/usb/core/hub.c:5660 [inline]
 hub_event+0x58e3/0x89e0 drivers/usb/core/hub.c:5742
 process_one_work+0xdb6/0x1820 kernel/workqueue.c:2307
 worker_thread+0x10b3/0x21e0 kernel/workqueue.c:2454
 kthread+0x3c7/0x500 kernel/kthread.c:377
 ret_from_fork+0x1f/0x30

Local variable mac created at:
 r871xu_drv_init+0x1771/0x3070 drivers/staging/rtl8712/usb_intf.c:394
 usb_probe_interface+0xf19/0x1600 drivers/usb/core/driver.c:396

KMSAN: uninit-value in r871xu_drv_init
https://syzkaller.appspot.com/bug?id=3cd92b1d85428b128503bfa7a250294c9ae00bd8

Reported-by: <syzbot+6f5ecd144854c0d8580b@syzkaller.appspotmail.com>
Tested-by: <syzbot+6f5ecd144854c0d8580b@syzkaller.appspotmail.com>
Reviewed-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Wang Cheng <wanngchenng@gmail.com>
Link: https://lore.kernel.org/r/14c3886173dfa4597f0704547c414cfdbcd11d16.1652618244.git.wanngchenng@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2022-06-14 18:41:35 +02:00
..
android
axis-fifo staging: axis-fifo: Use platform_get_irq() to get the interrupt 2021-12-30 11:54:56 +01:00
board
clocking-wizard
emxx_udc
fbtft staging: fbtft: fb_st7789v: reset display before initialization 2022-02-15 17:14:22 +01:00
fieldbus staging: fieldbus: Fix the error handling path in anybuss_host_common_probe() 2022-06-14 18:41:14 +02:00
fwserial
gdm724x staging: gdm724x: fix use after free in gdm_lte_rx() 2022-03-01 22:42:32 +01:00
greybus staging: greybus: codecs: fix type confusion of list iterator variable 2022-06-14 18:41:12 +02:00
gs_fpgaboot
iio staging:iio:adc:ad7280a: Fix handing of device address bit reversing. 2022-04-08 13:58:25 +02:00
ks7010
media media: rkvdec: h264: Fix bit depth wrap in pps packet 2022-06-09 10:25:54 +02:00
most staging: most: dim2: use consistent routine naming 2021-12-28 17:10:13 +01:00
mt7621-dts staging: mt7621-dts: fix pinctrl-0 items to be size-1 items on ethernet 2022-04-08 13:58:59 +02:00
nvec
octeon
octeon-usb
olpc_dcon
pi433 staging: pi433: add comment to rx_lock mutex definition 2022-01-06 15:00:29 +01:00
qlge staging: qlge: add unregister_netdev in qlge_probe 2022-04-08 13:58:24 +02:00
r8188eu staging: r8188eu: add check for kzalloc 2022-06-14 18:41:18 +02:00
rtl8192e drivers: staging: rtl8192e: Fix deadlock in rtllib_beacons_stop() 2022-06-14 18:41:34 +02:00
rtl8192u drivers: staging: rtl8192u: Fix deadlock in ieee80211_beacons_stop() 2022-06-14 18:41:34 +02:00
rtl8712 staging: rtl8712: fix uninit-value in r871xu_drv_init() 2022-06-14 18:41:35 +02:00
rtl8723bs drivers: staging: rtl8192bs: Fix deadlock in rtw_joinbss_event_prehandle() 2022-06-14 18:41:33 +02:00
rts5208 exit: Rename complete_and_exit to kthread_complete_and_exit 2021-12-13 12:04:45 -06:00
sm750fb
unisys staging: unisys: visornic: removed a blank line at the end of function 2021-11-25 17:38:53 +01:00
vc04_services staging: vchiq_core: handle NULL result of find_service_by_handle 2022-04-13 19:27:23 +02:00
vme
vt6655 staging: vt6655: drop off byRxMode var in device.h 2021-12-28 17:10:47 +01:00
vt6656
wfx staging: wfx: fix an error handling in wfx_init_common() 2022-04-13 19:27:24 +02:00
wlan-ng
Kconfig Merge 5.16-rc3 into staging-next 2021-11-29 08:03:05 +01:00
Makefile Merge 5.16-rc3 into staging-next 2021-11-29 08:03:05 +01:00