linux/drivers/net/phy
Heiner Kallweit 867dbe784c net: mdio: validate parameter addr in mdiobus_get_phy()
The caller may pass any value as addr, what may result in an out-of-bounds
access to array mdio_map. One existing case is stmmac_init_phy() that
may pass -1 as addr. Therefore validate addr before using it.

Fixes: 7f854420fb ("phy: Add API for {un}registering an mdio device to a bus.")
Signed-off-by: Heiner Kallweit <hkallweit1@gmail.com>
Reviewed-by: Andrew Lunn <andrew@lunn.ch>
Link: https://lore.kernel.org/r/cdf664ea-3312-e915-73f8-021678d08887@gmail.com
Signed-off-by: Paolo Abeni <pabeni@redhat.com>
2023-01-17 12:43:23 +01:00
..
mscc net: phy: mscc: macsec: do not copy encryption keys 2022-11-18 09:17:42 +00:00
adin1100.c net: phy: adin1100: add PHY IDs of adin1110/adin2111 2022-09-20 15:00:30 +02:00
adin.c net: move from strlcpy with unused retval to strscpy 2022-08-31 14:11:07 -07:00
amd.c
aquantia_hwmon.c
aquantia_main.c net: phy: aquantia: add AQR112 and AQR412 PHY IDs 2022-11-15 20:34:27 -08:00
aquantia.h
at803x.c Random number generator updates for Linux 6.2-rc1. 2022-12-12 16:22:22 -08:00
ax88796b.c net: phy: ax88772a: fix lost pause advertisement configuration 2022-06-29 20:39:05 -07:00
bcm7xxx.c net: phy: bcm7xxx: Add EPHY entry for 7712 2021-10-24 13:42:28 +01:00
bcm63xx.c
bcm87xx.c net: phy: bcm87xx: Use mmd helpers 2022-05-02 13:21:38 +02:00
bcm54140.c
bcm84881.c
bcm-cygnus.c
bcm-phy-lib.c net: move from strlcpy with unused retval to strscpy 2022-08-31 14:11:07 -07:00
bcm-phy-lib.h net: phy: broadcom: Add Broadcom PTP hooks to bcm-phy-lib 2022-06-23 20:49:02 -07:00
bcm-phy-ptp.c net: phy: Add support for 1PPS out and external timestamps 2022-06-23 20:49:02 -07:00
broadcom.c net: phy: broadcom: Implement suspend/resume for AC131 and BCM5241 2022-08-17 11:49:23 +01:00
cicada.c
cortina.c
davicom.c
dp83tc811.c
dp83td510.c net: phy: dp83td510: add SQI support 2022-06-21 22:01:14 -07:00
dp83640_reg.h
dp83640.c dp83640: Use generic ptp_msg_is_sync() function 2022-03-07 11:31:34 +00:00
dp83822.c net: dp83822: Print the SOR1 strap status 2022-10-27 12:48:53 +02:00
dp83848.c
dp83867.c Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net 2022-11-17 18:30:39 -08:00
dp83869.c net: phy: add support for TI DP83561-SP phy 2021-11-19 20:13:07 -08:00
et1011c.c
fixed_phy.c net: phy: fixed_phy: set phy_mask before calling mdiobus_register() 2022-06-13 23:11:24 -07:00
icplus.c
intel-xway.c
Kconfig net: phy: remove redundant "depends on" lines 2022-12-08 20:01:21 -08:00
linkmode.c
lxt.c
Makefile net: phy: broadcom: Add PTP support for some Broadcom PHYs. 2022-06-23 20:49:02 -07:00
marvell10g.c net: phy: marvell10g: select host interface configuration 2022-10-03 11:08:32 +01:00
marvell-88x2222.c net: sfp: augment SFP parsing with phy_interface_t bitmap 2022-10-03 11:08:32 +01:00
marvell.c net: phy: marvell: add sleep time after enabling the loopback bit 2022-11-15 13:14:46 +01:00
mdio_bus.c net: mdio: validate parameter addr in mdiobus_get_phy() 2023-01-17 12:43:23 +01:00
mdio_device.c net: mdio: fix unbalanced fwnode reference count in mdio_device_release() 2022-12-06 12:50:00 +01:00
mdio_devres.c
mdio-boardinfo.c
mdio-boardinfo.h
mediatek-ge.c net: phy: mediatek: remove PHY mode check on MT7531 2022-02-15 14:21:01 +00:00
meson-gxl.c Revert "net: phy: meson-gxl: improve link-up behavior" 2022-09-01 20:55:12 -07:00
micrel.c net: phy: micrel: Add PHY Auto/MDI/MDI-X set driver for KSZ9131 2022-10-25 16:09:00 -07:00
microchip_t1.c net: phy: lan87xx: change interrupt src of link_up to comm_ready 2022-09-08 11:02:44 +02:00
microchip.c net: phy: microchip: add comments for the modified LAN88xx phy ID mask. 2022-05-10 18:57:14 -07:00
mii_timestamper.c
motorcomm.c net: phy: add Motorcomm YT8531S phy id. 2022-11-25 07:54:52 +00:00
mxl-gpy.c Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net 2022-12-08 18:19:59 -08:00
national.c
nxp-c45-tja11xx.c net: phy: Use netif_rx(). 2022-03-06 11:05:31 +00:00
nxp-tja11xx.c net: phy: tja11xx: add interface mode and RMII REF_CLK support 2022-08-23 17:43:28 -07:00
phy_device.c net: phy: Add link between phy dev and mac dev 2022-11-30 22:04:37 -08:00
phy_led_triggers.c
phy-c45.c net: phy: c45 baset1: do not skip aneg configuration if clock role is not specified 2022-08-08 20:54:28 -07:00
phy-core.c ethtool: Add support for 800Gbps link modes 2022-10-24 10:43:39 +01:00
phy.c ethtool: linkstate: add a statistic for PHY down events 2022-11-08 10:36:54 +01:00
phylink.c Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net 2022-11-29 13:04:52 -08:00
qsemi.c
realtek.c net: phy: realtek: add support for RTL8211F(D)(I)-VD-CG 2022-08-22 12:47:18 +01:00
rockchip.c
sfp-bus.c net: sfp: fill also 5gbase-r and 25gbase-r modes in sfp_parse_support() 2022-10-10 18:00:29 -07:00
sfp.c net: sfp: clean up i2c-bus property parsing 2022-12-06 18:54:14 -08:00
sfp.h net: sfp: augment SFP parsing with phy_interface_t bitmap 2022-10-03 11:08:32 +01:00
smsc.c net: phy: smsc: use device-managed clock API 2022-08-31 12:19:18 -07:00
spi_ks8995.c net: phy: spi_ks8895: switch to using gpiod API 2022-09-15 11:43:51 +02:00
ste10Xp.c
swphy.c
swphy.h
teranetics.c
uPD60620.c
vitesse.c
xilinx_gmii2rgmii.c net: phy: xgmiitorgmii: Fix refcount leak in xgmiitorgmii_probe 2022-12-30 07:46:10 +00:00