Shigeru Yoshida
310f1c92f6
net: usb: smsc75xx: Fix uninit-value access in __smsc75xx_read_reg
[ Upstream commit e9c65989920f7c28775ec4e0c11b483910fb67b8 ]
syzbot reported the following uninit-value access issue:
=====================================================
BUG: KMSAN: uninit-value in smsc75xx_wait_ready drivers/net/usb/smsc75xx.c:975 [inline]
BUG: KMSAN: uninit-value in smsc75xx_bind+0x5c9/0x11e0 drivers/net/usb/smsc75xx.c:1482
CPU: 0 PID: 8696 Comm: kworker/0:3 Not tainted 5.8.0-rc5-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011
Workqueue: usb_hub_wq hub_event
Call Trace:
__dump_stack lib/dump_stack.c:77 [inline]
dump_stack+0x21c/0x280 lib/dump_stack.c:118
kmsan_report+0xf7/0x1e0 mm/kmsan/kmsan_report.c:121
__msan_warning+0x58/0xa0 mm/kmsan/kmsan_instr.c:215
smsc75xx_wait_ready drivers/net/usb/smsc75xx.c:975 [inline]
smsc75xx_bind+0x5c9/0x11e0 drivers/net/usb/smsc75xx.c:1482
usbnet_probe+0x1152/0x3f90 drivers/net/usb/usbnet.c:1737
usb_probe_interface+0xece/0x1550 drivers/usb/core/driver.c:374
really_probe+0xf20/0x20b0 drivers/base/dd.c:529
driver_probe_device+0x293/0x390 drivers/base/dd.c:701
__device_attach_driver+0x63f/0x830 drivers/base/dd.c:807
bus_for_each_drv+0x2ca/0x3f0 drivers/base/bus.c:431
__device_attach+0x4e2/0x7f0 drivers/base/dd.c:873
device_initial_probe+0x4a/0x60 drivers/base/dd.c:920
bus_probe_device+0x177/0x3d0 drivers/base/bus.c:491
device_add+0x3b0e/0x40d0 drivers/base/core.c:2680
usb_set_configuration+0x380f/0x3f10 drivers/usb/core/message.c:2032
usb_generic_driver_probe+0x138/0x300 drivers/usb/core/generic.c:241
usb_probe_device+0x311/0x490 drivers/usb/core/driver.c:272
really_probe+0xf20/0x20b0 drivers/base/dd.c:529
driver_probe_device+0x293/0x390 drivers/base/dd.c:701
__device_attach_driver+0x63f/0x830 drivers/base/dd.c:807
bus_for_each_drv+0x2ca/0x3f0 drivers/base/bus.c:431
__device_attach+0x4e2/0x7f0 drivers/base/dd.c:873
device_initial_probe+0x4a/0x60 drivers/base/dd.c:920
bus_probe_device+0x177/0x3d0 drivers/base/bus.c:491
device_add+0x3b0e/0x40d0 drivers/base/core.c:2680
usb_new_device+0x1bd4/0x2a30 drivers/usb/core/hub.c:2554
hub_port_connect drivers/usb/core/hub.c:5208 [inline]
hub_port_connect_change drivers/usb/core/hub.c:5348 [inline]
port_event drivers/usb/core/hub.c:5494 [inline]
hub_event+0x5e7b/0x8a70 drivers/usb/core/hub.c:5576
process_one_work+0x1688/0x2140 kernel/workqueue.c:2269
worker_thread+0x10bc/0x2730 kernel/workqueue.c:2415
kthread+0x551/0x590 kernel/kthread.c:292
ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:293
Local variable ----buf.i87@smsc75xx_bind created at:
__smsc75xx_read_reg drivers/net/usb/smsc75xx.c:83 [inline]
smsc75xx_wait_ready drivers/net/usb/smsc75xx.c:968 [inline]
smsc75xx_bind+0x485/0x11e0 drivers/net/usb/smsc75xx.c:1482
__smsc75xx_read_reg drivers/net/usb/smsc75xx.c:83 [inline]
smsc75xx_wait_ready drivers/net/usb/smsc75xx.c:968 [inline]
smsc75xx_bind+0x485/0x11e0 drivers/net/usb/smsc75xx.c:1482
This issue is caused because usbnet_read_cmd() reads less bytes than requested
(zero byte in the reproducer). In this case, 'buf' is not properly filled.
This patch fixes the issue by returning -ENODATA if usbnet_read_cmd() reads
less bytes than requested.
Fixes: d0cad87170 ("smsc75xx: SMSC LAN75xx USB gigabit ethernet adapter driver")
Reported-and-tested-by: [email protected]
Closes: https://syzkaller.appspot.com/bug?extid=6966546b78d050bb0b5d
Signed-off-by: Shigeru Yoshida <[email protected]>
Reviewed-by: Simon Horman <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Paolo Abeni <[email protected]>
Signed-off-by: Sasha Levin <[email protected]>
|
2023-10-10 21:46:44 +02:00 |
| .. |
|
accessibility
|
|
|
|
acpi
|
perf/smmuv3: Enable HiSilicon Erratum 162001900 quirk for HIP08/09
|
2023-09-23 11:00:03 +02:00 |
|
amba
|
amba: bus: fix refcount leak
|
2023-09-23 10:59:52 +02:00 |
|
android
|
binder: fix memory leak in binder_init()
|
2023-08-16 18:19:23 +02:00 |
|
ata
|
ata: libata-core: Do not register PM operations for SAS ports
|
2023-10-10 21:46:42 +02:00 |
|
atm
|
treewide: Remove uninitialized_var() usage
|
2023-06-09 10:29:01 +02:00 |
|
auxdisplay
|
|
|
|
base
|
regmap: rbtree: Fix wrong register marked as in-cache when creating new node
|
2023-10-10 21:46:43 +02:00 |
|
bcma
|
|
|
|
block
|
rbd: take header_rwsem in rbd_dev_refresh() only when updating
|
2023-10-10 21:46:42 +02:00 |
|
bluetooth
|
Bluetooth: nokia: fix value check in nokia_bluetooth_serdev_probe()
|
2023-09-23 10:59:42 +02:00 |
|
bus
|
bus: ti-sysc: Fix SYSC_QUIRK_SWSUP_SIDLE_ACT handling for uart wake-up
|
2023-10-10 21:46:39 +02:00 |
|
cdrom
|
|
|
|
char
|
parisc: sba: Fix compile warning wrt list of SBA devices
|
2023-10-10 21:46:39 +02:00 |
|
clk
|
clk: tegra: fix error return case for recalc_rate
|
2023-10-10 21:46:39 +02:00 |
|
clocksource
|
clocksource/drivers/cadence-ttc: Fix memory leak in ttc_timer_probe
|
2023-07-27 08:37:05 +02:00 |
|
connector
|
|
|
|
counter
|
counter: 104-quad-8: Fix race condition between FLAG and CNTR reads
|
2023-05-17 11:35:31 +02:00 |
|
cpufreq
|
cpufreq: brcmstb-avs-cpufreq: Fix -Warray-bounds bug
|
2023-09-23 10:59:56 +02:00 |
|
cpuidle
|
|
|
|
crypto
|
crypto: stm32 - fix loop iterating through scatterlist for DMA
|
2023-09-23 10:59:56 +02:00 |
|
dax
|
|
|
|
dca
|
|
|
|
devfreq
|
PM / devfreq: Fix leak in devfreq_dev_release()
|
2023-09-23 10:59:54 +02:00 |
|
dio
|
|
|
|
dma
|
dmaengine: ste_dma40: Add missing IRQ check in d40_probe
|
2023-09-23 10:59:53 +02:00 |
|
dma-buf
|
dma-buf/sw_sync: Avoid recursive lock during fence signal
|
2023-08-30 16:27:28 +02:00 |
|
edac
|
EDAC/skx: Fix overflows on the DRAM row address mapping arrays
|
2023-05-17 11:35:35 +02:00 |
|
eisa
|
|
|
|
extcon
|
extcon: Fix kernel doc of property capability fields to avoid warnings
|
2023-07-27 08:37:20 +02:00 |
|
firewire
|
treewide: Remove uninitialized_var() usage
|
2023-06-09 10:29:01 +02:00 |
|
firmware
|
firmware: stratix10-svc: Fix an NULL vs IS_ERR() bug in probe
|
2023-09-23 10:59:37 +02:00 |
|
fpga
|
fpga: bridge: fix kernel-doc parameter description
|
2023-05-17 11:35:46 +02:00 |
|
fsi
|
fsi: master-ast-cf: Add MODULE_FIRMWARE macro
|
2023-09-23 10:59:37 +02:00 |
|
gnss
|
|
|
|
gpio
|
gpio: pmic-eic-sprd: Add can_sleep flag for PMIC EIC chip
|
2023-10-10 21:46:39 +02:00 |
|
gpu
|
drm/amd/display: prevent potential division by zero errors
|
2023-10-10 21:46:38 +02:00 |
|
greybus
|
|
|
|
hid
|
HID: multitouch: Correct devm device reference for hidinput input_dev name
|
2023-09-23 10:59:52 +02:00 |
|
hsi
|
|
|
|
hv
|
Drivers: hv: vmbus: Fix vmbus_wait_for_unload() to scan present CPUs
|
2023-06-28 10:18:36 +02:00 |
|
hwmon
|
hwmon: (nct7802) Fix for temp6 (PECI1) processed even if PECI1 disabled
|
2023-08-11 11:53:52 +02:00 |
|
hwspinlock
|
|
|
|
hwtracing
|
coresight: tmc: Explicit type conversions to prevent integer overflow
|
2023-09-23 10:59:50 +02:00 |
|
i2c
|
i2c: i801: unregister tco_pdev in i801_probe() error path
|
2023-10-10 21:46:41 +02:00 |
|
i3c
|
|
|
|
ide
|
treewide: Remove uninitialized_var() usage
|
2023-06-09 10:29:01 +02:00 |
|
idle
|
|
|
|
iio
|
iio: addac: stx104: Fix race condition when converting analog-to-digital
|
2023-08-30 16:27:12 +02:00 |
|
infiniband
|
RDMA/siw: Correct wrong debug message
|
2023-09-23 10:59:52 +02:00 |
|
input
|
Input: i8042 - add quirk for TUXEDO Gemini 17 Gen1/Clevo PD70PN
|
2023-10-10 21:46:38 +02:00 |
|
interconnect
|
interconnect: Do not skip aggregation for disabled paths
|
2023-08-30 16:27:27 +02:00 |
|
iommu
|
iommu/vt-d: Fix to flush cache of PASID directory table
|
2023-09-23 10:59:50 +02:00 |
|
ipack
|
|
|
|
irqchip
|
irqchip/mips-gic: Don't touch vl_map if a local interrupt is not routable
|
2023-08-30 16:27:27 +02:00 |
|
isdn
|
mISDN: Update parameter type of dsp_cmx_send()
|
2023-08-16 18:19:23 +02:00 |
|
leds
|
leds: trigger: netdev: Recheck NETDEV_LED_MODE_LINKUP on dev rename
|
2023-08-30 16:27:14 +02:00 |
|
lightnvm
|
|
|
|
macintosh
|
macintosh: via-pmu-led: requires ATA to be set
|
2023-05-17 11:35:50 +02:00 |
|
mailbox
|
mailbox: ti-msgmgr: Fill non-message tx data fields with 0x0
|
2023-07-27 08:37:23 +02:00 |
|
mcb
|
mcb-pci: Reallocate memory region to avoid memory overlapping
|
2023-05-30 12:44:04 +01:00 |
|
md
|
md/raid1: fix error: ISO C90 forbids mixed declarations
|
2023-09-23 11:00:06 +02:00 |
|
media
|
media: pci: ipu3-cio2: Initialise timing struct to avoid a compiler warning
|
2023-09-23 11:00:05 +02:00 |
|
memory
|
memory: brcmstb_dpfe: fix testing array offset after use
|
2023-07-27 08:37:14 +02:00 |
|
memstick
|
memstick r592: make memstick_debug_get_tpc_name() static
|
2023-07-27 08:37:10 +02:00 |
|
message
|
scsi: message: mptlan: Fix use after free bug in mptlan_remove() due to race condition
|
2023-05-30 12:44:03 +01:00 |
|
mfd
|
mfd: stmpe: Only disable the regulators if they are enabled
|
2023-07-27 08:37:22 +02:00 |
|
misc
|
misc: pci_endpoint_test: Re-init completion for every test
|
2023-07-27 08:37:37 +02:00 |
|
mmc
|
mmc: sdhci-esdhc-imx: improve ESDHC_FLAG_ERR010450
|
2023-09-23 11:00:03 +02:00 |
|
mtd
|
ubi: Refuse attaching if mtd's erasesize is 0
|
2023-10-10 21:46:43 +02:00 |
|
mux
|
|
|
|
net
|
net: usb: smsc75xx: Fix uninit-value access in __smsc75xx_read_reg
|
2023-10-10 21:46:44 +02:00 |
|
nfc
|
nfcsim.c: Fix error checking for debugfs_create_dir
|
2023-06-28 10:18:41 +02:00 |
|
ntb
|
ntb: Fix calculation ntb_transport_tx_free_entry()
|
2023-09-23 10:59:55 +02:00 |
|
nubus
|
|
|
|
nvdimm
|
|
|
|
nvme
|
nvme-pci: do not set the NUMA node of device if it has none
|
2023-10-10 21:46:40 +02:00 |
|
nvmem
|
|
|
|
of
|
of: unittest: Fix overlay type in apply/revert check
|
2023-09-23 10:59:46 +02:00 |
|
opp
|
OPP: Fix passing 0 to PTR_ERR in _opp_attach_genpd()
|
2023-09-23 10:59:40 +02:00 |
|
oprofile
|
|
|
|
parisc
|
parisc: iosapic.c: Fix sparse warnings
|
2023-10-10 21:46:39 +02:00 |
|
parport
|
|
|
|
pci
|
Revert "PCI: qcom: Disable write access to read only registers for IP v2.3.3"
|
2023-10-10 21:46:42 +02:00 |
|
pcmcia
|
pcmcia: rsrc_nonstatic: Fix memory leak in nonstatic_release_resource_db()
|
2023-08-30 16:27:10 +02:00 |
|
perf
|
perf/smmuv3: Enable HiSilicon Erratum 162001900 quirk for HIP08/09
|
2023-09-23 11:00:03 +02:00 |
|
phy
|
phy/rockchip: inno-hdmi: do not power on rk3328 post pll on reg write
|
2023-09-23 10:59:53 +02:00 |
|
pinctrl
|
pinctrl: amd: Don't show Invalid config param errors
|
2023-09-23 10:59:37 +02:00 |
|
platform
|
platform/mellanox: mlxbf-tmfifo: Drop jumbo frames
|
2023-09-23 11:00:02 +02:00 |
|
pnp
|
|
|
|
power
|
power: supply: Fix logic checking if system is running from battery
|
2023-06-21 15:44:09 +02:00 |
|
powercap
|
powercap: RAPL: Fix CONFIG_IOSF_MBI dependency
|
2023-07-27 08:37:06 +02:00 |
|
pps
|
|
|
|
ps3
|
|
|
|
ptp
|
ptp_qoriq: fix memory leak in probe()
|
2023-04-05 11:16:43 +02:00 |
|
pwm
|
pwm: lpc32xx: Remove handling of PWM channels
|
2023-09-23 10:59:58 +02:00 |
|
rapidio
|
|
|
|
ras
|
|
|
|
regulator
|
regulator: core: Streamline debugfs operations
|
2023-07-27 08:37:07 +02:00 |
|
remoteproc
|
remoteproc: st: Call of_node_put() on iteration error
|
2023-05-17 11:36:01 +02:00 |
|
reset
|
|
|
|
rpmsg
|
rpmsg: glink: Add check for kstrdup
|
2023-09-23 10:59:53 +02:00 |
|
rtc
|
rtc: ds1685: use EXPORT_SYMBOL_GPL for ds1685_rtc_poweroff
|
2023-09-23 10:59:36 +02:00 |
|
s390
|
scsi: zfcp: Fix a double put in zfcp_port_enqueue()
|
2023-10-10 21:46:42 +02:00 |
|
sbus
|
|
|
|
scsi
|
scsi: qla2xxx: Fix deletion race condition
|
2023-10-10 21:46:38 +02:00 |
|
sfi
|
|
|
|
sh
|
|
|
|
siox
|
|
|
|
slimbus
|
|
|
|
soc
|
soc: qcom: qmi_encdec: Restrict string length in decode
|
2023-09-23 10:59:57 +02:00 |
|
soundwire
|
|
|
|
spi
|
spi: nxp-fspi: reset the FLSHxCR1 registers
|
2023-10-10 21:46:40 +02:00 |
|
spmi
|
spmi: Add a check for remove callback when removing a SPMI driver
|
2023-05-17 11:35:49 +02:00 |
|
ssb
|
treewide: Remove uninitialized_var() usage
|
2023-06-09 10:29:01 +02:00 |
|
staging
|
staging: rtl8712: fix race condition
|
2023-09-23 10:59:37 +02:00 |
|
target
|
scsi: target: core: Fix deadlock due to recursive locking
|
2023-10-10 21:46:43 +02:00 |
|
tc
|
|
|
|
tee
|
|
|
|
thermal
|
|
|
|
thunderbolt
|
thunderbolt: Use const qualifier for ring_interrupt_index
|
2023-04-05 11:16:39 +02:00 |
|
tty
|
serial: 8250_port: Check IRQ data before use
|
2023-10-10 21:46:41 +02:00 |
|
uio
|
|
|
|
usb
|
usb: gadget: fsl_qe_udc: validate endpoint index for ch9 udc
|
2023-09-23 11:00:05 +02:00 |
|
vfio
|
|
|
|
vhost
|
treewide: Remove uninitialized_var() usage
|
2023-06-09 10:29:01 +02:00 |
|
video
|
fbdev/sh7760fb: Depend on FB=y
|
2023-10-10 21:46:40 +02:00 |
|
virt
|
|
|
|
virtio
|
virtio_ring: fix avail_wrap_counter in virtqueue_add_packed
|
2023-09-23 10:59:53 +02:00 |
|
visorbus
|
|
|
|
vlynq
|
|
|
|
vme
|
|
|
|
w1
|
w1: fix loop in w1_fini()
|
2023-07-27 08:37:19 +02:00 |
|
watchdog
|
watchdog: iTCO_wdt: Set NO_REBOOT if the watchdog is not already running
|
2023-10-10 21:46:40 +02:00 |
|
xen
|
xen/pvcalls-back: fix double frees with pvcalls_new_active_socket()
|
2023-05-30 12:44:10 +01:00 |
|
zorro
|
|
|
|
Kconfig
|
|
|
|
Makefile
|
|
|