android_kernel_msm-6.1_noth.../drivers
Javier Carrasco ea9ae69b0e net: usb: dm9601: fix uninitialized variable use in dm9601_mdio_read
commit 8f8abb863fa5a4cc18955c6a0e17af0ded3e4a76 upstream.

syzbot has found an uninit-value bug triggered by the dm9601 driver [1].

This error happens because the variable res is not updated if the call
to dm_read_shared_word returns an error. In this particular case -EPROTO
was returned and res stayed uninitialized.

This can be avoided by checking the return value of dm_read_shared_word
and propagating the error if the read operation failed.

[1] https://syzkaller.appspot.com/bug?extid=1f53a30781af65d2c955

Cc: stable@vger.kernel.org
Signed-off-by: Javier Carrasco <javier.carrasco.cruz@gmail.com>
Reported-and-tested-by: syzbot+1f53a30781af65d2c955@syzkaller.appspotmail.com
Acked-by: Peter Korsgaard <peter@korsgaard.com>
Fixes: d0374f4f9c ("USB: Davicom DM9601 usbnet driver")
Link: https://lore.kernel.org/r/20231009-topic-dm9601_uninit_mdio_read-v2-1-f2fe39739b6c@gmail.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2023-10-19 23:08:54 +02:00
..
accessibility
acpi ACPI: x86: s2idle: Catch multiple ACPI_TYPE_PACKAGE objects 2023-09-23 11:11:00 +02:00
amba amba: bus: fix refcount leak 2023-09-13 09:42:56 +02:00
android binder: fix memory leak in binder_init() 2023-08-16 18:27:24 +02:00
ata ata: libata-scsi: Disable scsi device manage_system_start_stop 2023-10-19 23:08:50 +02:00
atm
auxdisplay
base regmap: rbtree: Fix wrong register marked as in-cache when creating new node 2023-10-10 22:00:41 +02:00
bcma
block rbd: take header_rwsem in rbd_dev_refresh() only when updating 2023-10-10 22:00:37 +02:00
bluetooth Bluetooth: btusb: Do not call kfree_skb() under spin_lock_irqsave() 2023-09-13 09:42:34 +02:00
bus bus: ti-sysc: Fix SYSC_QUIRK_SWSUP_SIDLE_ACT handling for uart wake-up 2023-10-06 14:56:48 +02:00
cdrom
char parisc: sba: Fix compile warning wrt list of SBA devices 2023-10-06 14:56:51 +02:00
clk clk: tegra: fix error return case for recalc_rate 2023-10-06 14:56:47 +02:00
clocksource clocksource/drivers/arm_arch_timer: Disable timer before programming CVAL 2023-09-19 12:28:04 +02:00
comedi
connector
counter
cpufreq cpufreq: brcmstb-avs-cpufreq: Fix -Warray-bounds bug 2023-09-13 09:43:04 +02:00
cpuidle powerpc/pseries: Rework lppaca_shared_proc() to avoid DEBUG_PREEMPT 2023-09-13 09:42:48 +02:00
crypto crypto: stm32 - fix loop iterating through scatterlist for DMA 2023-09-13 09:43:04 +02:00
cxl cxl/acpi: Return 'rc' instead of '0' in cxl_parse_cfmws() 2023-08-03 10:24:04 +02:00
dax dax/kmem: Pass valid argument to memory_group_register_static 2023-07-19 16:21:43 +02:00
dca
devfreq PM / devfreq: Fix leak in devfreq_dev_release() 2023-09-13 09:42:59 +02:00
dio
dma dmaengine: stm32-mdma: set in_flight_bytes in case CRQA flag is set 2023-10-19 23:08:54 +02:00
dma-buf dma-buf: Add unlocked variant of attachment-mapping functions 2023-09-23 11:11:08 +02:00
edac EDAC/igen6: Fix the issue of no error events 2023-09-13 09:42:45 +02:00
eisa
extcon extcon: cht_wc: add POWER_SUPPLY dependency 2023-09-13 09:42:53 +02:00
firewire scsi: sd: Differentiate system and runtime start/stop management 2023-10-10 22:00:34 +02:00
firmware firmware: cirrus: cs_dsp: Only log list of algorithms in debug build 2023-10-06 14:56:56 +02:00
fpga
fsi fsi: aspeed: Reset master errors after CFAM reset 2023-09-13 09:42:54 +02:00
gnss
gpio gpio: pxa: disable pinctrl calls for MMP_GPIO 2023-10-10 22:00:45 +02:00
gpu drm/vmwgfx: fix typo of sizeof argument 2023-10-19 23:08:53 +02:00
greybus
hid HID: logitech-hidpp: Fix kernel crash on receiver USB disconnect 2023-10-19 23:08:50 +02:00
hsi
hte
hv Drivers: hv: vmbus: Don't dereference ACPI root object handle 2023-09-13 09:42:59 +02:00
hwmon hwmon: (nzxt-smart2) add another USB ID 2023-10-10 22:00:37 +02:00
hwspinlock hwspinlock: qcom: add missing regmap config for SFPB MMIO implementation 2023-09-19 12:28:05 +02:00
hwtracing coresight: trbe: Fix TRBE potential sleep in atomic context 2023-09-13 09:42:56 +02:00
i2c i2c: i801: unregister tco_pdev in i801_probe() error path 2023-10-06 14:57:02 +02:00
i3c i3c: master: svc: fix probe failure when no i3c device exist 2023-09-13 09:43:01 +02:00
idle intel_idle: add Emerald Rapids Xeon support 2023-10-10 22:00:44 +02:00
iio iio: accel: adxl313: Fix adxl313_i2c_id[] table 2023-09-13 09:42:52 +02:00
infiniband RDMA/cxgb4: Check skb value for failure to allocate 2023-10-19 23:08:49 +02:00
input Input: tca6416-keypad - fix interrupt enable disbalance 2023-09-19 12:27:59 +02:00
interconnect interconnect: Teach lockdep about icc_bw_lock order 2023-09-23 11:11:13 +02:00
iommu iommu/mediatek: Fix share pgtable for iova over 4GB 2023-10-10 22:00:41 +02:00
ipack
irqchip irqchip: renesas-rzg2l: Fix logic to clear TINT interrupt source 2023-10-19 23:08:50 +02:00
isdn mISDN: Update parameter type of dsp_cmx_send() 2023-08-16 18:27:26 +02:00
leds leds: Drop BUG_ON check for LED_COLOR_ID_MULTI 2023-10-10 22:00:40 +02:00
macintosh
mailbox mailbox: qcom-ipcc: fix incorrect num_chans counting 2023-09-19 12:27:58 +02:00
mcb
md dm zoned: free dmz->ddev array in dmz_put_zoned_devices 2023-10-10 22:00:44 +02:00
media media: uvcvideo: Fix OOB read 2023-10-06 14:57:04 +02:00
memory memory: brcmstb_dpfe: fix testing array offset after use 2023-07-19 16:21:24 +02:00
memstick memstick r592: make memstick_debug_get_tpc_name() static 2023-07-19 16:21:08 +02:00
message
mfd mfd: pm8008: Fix module autoloading 2023-07-23 13:49:37 +02:00
misc misc: rtsx: Fix some platforms can not boot and move the l1ss judgment to probe 2023-10-06 14:57:00 +02:00
mmc mmc: sdhci-esdhc-imx: improve ESDHC_FLAG_ERR010450 2023-09-23 11:11:02 +02:00
most
mtd ubi: Refuse attaching if mtd's erasesize is 0 2023-10-10 22:00:39 +02:00
mux
net net: usb: dm9601: fix uninitialized variable use in dm9601_mdio_read 2023-10-19 23:08:54 +02:00
nfc nfcsim.c: Fix error checking for debugfs_create_dir 2023-06-28 11:12:36 +02:00
ntb ntb: Fix calculation ntb_transport_tx_free_entry() 2023-09-13 09:43:02 +02:00
nubus nubus: Partially revert proc_create_single_data() conversion 2023-07-05 18:27:37 +01:00
nvdimm nvdimm: Fix dereference after free in register_nvdimm_pmu() 2023-09-13 09:42:47 +02:00
nvme nvme-pci: always return an ERR_PTR from nvme_pci_alloc_dev 2023-10-06 14:56:59 +02:00
nvmem nvmem: rmem: Use NVMEM_DEVID_AUTO 2023-07-19 16:21:57 +02:00
of of: dynamic: Fix potential memory leak in of_changeset_action() 2023-10-10 22:00:44 +02:00
opp OPP: Fix passing 0 to PTR_ERR in _opp_attach_genpd() 2023-09-13 09:42:28 +02:00
parisc parisc: iosapic.c: Fix sparse warnings 2023-10-06 14:56:51 +02:00
parport
pci PCI: qcom: Fix IPQ8074 enumeration 2023-10-10 22:00:38 +02:00
pcmcia pcmcia: rsrc_nonstatic: Fix memory leak in nonstatic_release_resource_db() 2023-08-23 17:52:24 +02:00
peci
perf perf/arm-cmn: Fix the unhandled overflow status of counter 4 to 7 2023-10-19 23:08:50 +02:00
phy phy: lynx-28g: serialize concurrent phy_set_mode_ext() calls to shared registers 2023-10-19 23:08:52 +02:00
pinctrl pinctrl: renesas: rzn1: Enable missing PINMUX 2023-10-19 23:08:54 +02:00
platform platform/x86: hp-wmi:: Mark driver struct with __refdata to prevent section mismatch warning 2023-10-19 23:08:50 +02:00
pnp
power power: supply: ab8500: Set typing and props 2023-10-06 14:57:06 +02:00
powercap powercap: RAPL: Fix CONFIG_IOSF_MBI dependency 2023-07-19 16:21:00 +02:00
pps
ps3
ptp ptp: ocp: Fix error handling in ptp_ocp_device_init 2023-10-10 22:00:42 +02:00
pwm pwm: lpc32xx: Remove handling of PWM channels 2023-09-19 12:28:00 +02:00
rapidio
ras
regulator regulator/core: regulator_register: set device->class earlier 2023-10-10 22:00:41 +02:00
remoteproc
reset
rpmsg rpmsg: glink: Add check for kstrdup 2023-09-13 09:42:58 +02:00
rtc rtc: ds1685: use EXPORT_SYMBOL_GPL for ds1685_rtc_poweroff 2023-09-06 21:27:00 +01:00
s390 scsi: zfcp: Fix a double put in zfcp_port_enqueue() 2023-10-10 22:00:38 +02:00
sbus
scsi scsi: Do not rescan devices with a suspended queue 2023-10-19 23:08:50 +02:00
sh
siox
slimbus
soc soc: imx8m: Enable OCOTP clock for imx8mm before reading registers 2023-10-06 14:56:49 +02:00
soundwire soundwire: fix enumeration completion 2023-08-03 10:24:15 +02:00
spi spi: zynqmp-gqspi: fix clock imbalance on probe failure 2023-10-10 22:00:34 +02:00
spmi
ssb
staging media: rkvdec: increase max supported height for H.264 2023-09-13 09:42:50 +02:00
target scsi: target: core: Fix deadlock due to recursive locking 2023-10-10 22:00:41 +02:00
tc
tee
thermal thermal/of: add missing of_node_put() 2023-10-06 14:56:53 +02:00
thunderbolt thunderbolt: Fix a backport error for display flickering issue 2023-09-02 09:16:20 +02:00
tty serial: 8250_port: Check IRQ data before use 2023-10-06 14:57:01 +02:00
ufs scsi: ufs: core: Poll HCS.UCRDY before issuing a UIC command 2023-10-06 14:56:52 +02:00
uio
usb usb: xhci: xhci-ring: Use sysdev for mapping bounce buffer 2023-10-19 23:08:54 +02:00
vdpa vdpa: Enable strict validation for netlinks ops 2023-08-23 17:52:31 +02:00
vfio vfio/mdev: Fix a null-ptr-deref bug for mdev_unregister_parent() 2023-10-06 14:56:45 +02:00
vhost vringh: don't use vringh_kiov_advance() in vringh_iov_xfer() 2023-10-10 22:00:38 +02:00
video fbdev/sh7760fb: Depend on FB=y 2023-10-06 14:56:58 +02:00
virt virt: sevguest: Add CONFIG_CRYPTO dependency 2023-07-19 16:20:55 +02:00
virtio virtio_ring: fix avail_wrap_counter in virtqueue_add_packed 2023-09-13 09:42:59 +02:00
vlynq
w1 w1: fix loop in w1_fini() 2023-07-19 16:21:48 +02:00
watchdog watchdog: intel-mid_wdt: add MODULE_ALIAS() to allow auto-load 2023-09-19 12:28:00 +02:00
xen xen/events: replace evtchn_rwlock with RCU 2023-10-10 22:00:46 +02:00
zorro
Kconfig
Makefile