kernel_samsung_a53x/drivers/net/usb
Javier Carrasco 19ca9a8b0f 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: d0374f4f9c35cdfbee0 ("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>
2024-11-08 11:25:47 +01:00
..
aqc111.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
aqc111.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
asix.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
asix_common.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
asix_devices.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
ax88172a.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
ax88179_178a.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
catc.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
cdc-phonet.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
cdc_eem.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
cdc_ether.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
cdc_mbim.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
cdc_ncm.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
cdc_subset.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
ch9200.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
cx82310_eth.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
dm9601.c net: usb: dm9601: fix uninitialized variable use in dm9601_mdio_read 2024-11-08 11:25:47 +01:00
gl620a.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
hso.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
huawei_cdc_ncm.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
int51x1.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
ipheth.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
kalmia.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
kaweth.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
Kconfig Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
lan78xx.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
lan78xx.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
lg-vl600.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
Makefile Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
mcs7830.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
net1080.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
pegasus.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
pegasus.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
plusb.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
qmi_wwan.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
r8152.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
rndis_host.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
rtl8150.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
sierra_net.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
smsc75xx.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
smsc75xx.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
smsc95xx.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
smsc95xx.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
sr9700.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
sr9700.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
sr9800.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
sr9800.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
usbnet.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
zaurus.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00