Skip to content

net: stmmac: dwmac-nuvoton: fix NULL pointer dereference in nvt_set_phy_intf_sel()

Joey Lu linux-arm-kernel lkml netdev 1 version Applied

Status from this message: This patch was applied to netdev/net.git (main)

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest1 patch 0 repliesApplied 1/1

Patches in v1 All 1 applied

#Subject and filesSizeRepliesApplied
1/1net: stmmac: dwmac-nuvoton: fix NULL pointer dereference in nvt_set_phy_intf_sel()drivers/net/ethernet/stmicro/stmmac/dwmac-nuvoton.c+2 -00 repliesApplied

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.

Read the v1 thread

Cover letter [PATCH net 0/1] net: stmmac: dwmac-nuvoton: fix NULL pointer dereference in nvt_set_phy_intf_sel()

This series fixes a NULL pointer dereference bug introduced in the initial dwmac-nuvoton glue driver. The struct nvt_priv_data::dev field was never initialized after devm_kzalloc(), leaving it NULL. When phylink later calls nvt_set_phy_intf_sel() for interface selection, the callback dereferences priv->dev via nvt_gmac_get_delay(), triggering a NULL pointer dereference.

Joey Lu (1):
net: stmmac: dwmac-nuvoton: fix NULL pointer dereference in

    nvt_set_phy_intf_sel()
 drivers/net/ethernet/stmicro/stmmac/dwmac-nuvoton.c | 2 ++
 1 file changed, 2 insertions(+)
Signature · 1 line
2.43.0