Gaosheng Cui
4954b5359e
net: mdio: fix undefined behavior in bit shift for __mdiobus_register
...
[ Upstream commit 40e4eb324c59e11fcb927aa46742d28aba6ecb8a ]
Shifting signed 32-bit value by 31 bits is undefined, so changing
significant bit to unsigned. The UBSAN warning calltrace like below:
UBSAN: shift-out-of-bounds in drivers/net/phy/mdio_bus.c:586:27
left shift of 1 by 31 places cannot be represented in type 'int'
Call Trace:
<TASK>
dump_stack_lvl+0x7d/0xa5
dump_stack+0x15/0x1b
ubsan_epilogue+0xe/0x4e
__ubsan_handle_shift_out_of_bounds+0x1e7/0x20c
__mdiobus_register+0x49d/0x4e0
fixed_mdio_bus_init+0xd8/0x12d
do_one_initcall+0x76/0x430
kernel_init_freeable+0x3b3/0x422
kernel_init+0x24/0x1e0
ret_from_fork+0x1f/0x30
</TASK>
Fixes: 4fd5f812c2 ("phylib: allow incremental scanning of an mii bus")
Signed-off-by: Gaosheng Cui <[email protected] >
Reviewed-by: Andrew Lunn <[email protected] >
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Jakub Kicinski <[email protected] >
Signed-off-by: Sasha Levin <[email protected] >
2022-11-10 17:57:52 +01:00
..
appletalk
arcnet
bonding
bonding: 802.3ad: fix no transmission of LACPDUs
2022-09-05 10:27:40 +02:00
caif
caif_virtio: fix race between virtio_device_ready() and ndo_open()
2022-07-07 17:36:49 +02:00
can
can: rcar_canfd: rcar_canfd_handle_global_receive(): fix IRQ storm on global FIFO receive
2022-11-03 23:56:56 +09:00
dsa
net: dsa: Fix possible memory leaks in dsa_loop_init()
2022-11-10 17:57:50 +01:00
ethernet
net: fec: fix improper use of NETDEV_TX_BUSY
2022-11-10 17:57:50 +01:00
fddi
fjes
hamradio
hamradio: remove needs_free_netdev to avoid UAF
2022-05-09 09:03:20 +02:00
hippi
drivers: net: hippi: Fix deadlock in rr_close()
2022-05-09 09:03:27 +02:00
hyperv
hv_netvsc: Fix race between VF offering and VF association message from host
2022-10-29 10:20:36 +02:00
ieee802154
ieee802154: cc2520: add rc code in cc2520_tx()
2022-09-20 12:27:59 +02:00
ipvlan
ipvlan: Fix out-of-bound bugs caused by unset skb->mac_header
2022-09-28 11:04:05 +02:00
netdevsim
netdevsim: Avoid allocation warnings triggered from user space
2022-08-25 11:17:49 +02:00
phy
net: mdio: fix undefined behavior in bit shift for __mdiobus_register
2022-11-10 17:57:52 +01:00
plip
plip: avoid rcu debug splat
2022-08-25 11:18:24 +02:00
ppp
slip
drivers: net: slip: fix NPD bug in sl_tx_timeout()
2022-04-20 09:19:37 +02:00
team
net: team: Unsync device addresses on ndo_stop
2022-09-28 11:04:05 +02:00
usb
r8152: add PID for the Lenovo OneLink+ Dock
2022-10-29 10:20:35 +02:00
vmxnet3
net: vmxnet3: fix possible NULL pointer dereference in vmxnet3_rq_cleanup()
2022-05-25 09:14:35 +02:00
wan
wimax
wireless
wifi: rt2x00: correctly set BBP register 86 for MT7620
2022-10-26 13:22:51 +02:00
xen-netback
xen/netback: avoid entering xenvif_rx_next_skb() with an empty rx queue
2022-07-21 20:59:16 +02:00
dummy.c
eql.c
geneve.c
geneve: do not use RT_TOS for IPv6 flowlabel
2022-08-25 11:18:24 +02:00
gtp.c
ifb.c
Kconfig
LICENSE.SRC
loopback.c
macsec.c
macvlan.c
macvtap.c
macvtap: advertise link netns via netlink
2022-04-15 14:18:34 +02:00
Makefile
mdio.c
mii.c
net_failover.c
netconsole.c
nlmon.c
ntb_netdev.c
rionet.c
sb1000.c
Space.c
sungem_phy.c
net: sungem_phy: Add of_node_put() for reference returned by of_get_parent()
2022-08-03 11:59:39 +02:00
tap.c
tuntap: add sanity checks about msg_controllen in sendmsg
2022-04-15 14:18:34 +02:00
thunderbolt.c
tun.c
net: tun: fix bugs for oversize packet when napi frags enabled
2022-11-10 17:57:50 +01:00
veth.c
veth: Ensure eth header is in skb's linear part
2022-04-20 09:19:34 +02:00
virtio_net.c
virtio-net: fix the race between refill work and close
2022-08-03 11:59:41 +02:00
vrf.c
vsockmon.c
vxlan.c
vxlan: fix error return code in vxlan_fdb_append
2022-04-27 13:50:47 +02:00
xen-netfront.c
xen/netfront: force data bouncing when backend is untrusted
2022-07-07 17:36:53 +02:00