Files
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 <[email protected]>
Reviewed-by: Andrew Lunn <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Paolo Abeni <[email protected]>
2023-01-17 12:43:23 +01:00
..
…
…
…
2022-05-02 13:21:38 +02:00
…
…
…
…
…
…
…
…
2022-03-06 11:05:31 +00:00
…
…
…
…
…