From: Carl-Daniel Hailfinger Date: Mon, 12 Jan 2026 11:02:24 +0000 (+0100) Subject: realtek: ethernet: avoid using unitialized memory X-Git-Tag: v25.12.0-rc3~36 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=d01aa41d40e1b6f9e9a034bcae5fda322d5d0624;p=thirdparty%2Fopenwrt.git realtek: ethernet: avoid using unitialized memory The mac_addr variable was not zero-initialized, causing weird side effects when the memory contents were a valid MAC address. Signed-off-by: Carl-Daniel Hailfinger Link: https://github.com/openwrt/openwrt/pull/21504 Signed-off-by: Stijn Tintel (cherry picked from commit 19b8d391a95d5a2fa038551a9498a9fd426dfc0e) --- diff --git a/target/linux/realtek/files-6.12/drivers/net/ethernet/rtl838x_eth.c b/target/linux/realtek/files-6.12/drivers/net/ethernet/rtl838x_eth.c index 59ae4fbb240..db534964884 100644 --- a/target/linux/realtek/files-6.12/drivers/net/ethernet/rtl838x_eth.c +++ b/target/linux/realtek/files-6.12/drivers/net/ethernet/rtl838x_eth.c @@ -1650,7 +1650,7 @@ static int __init rtl838x_eth_probe(struct platform_device *pdev) struct resource *res, *mem; phy_interface_t phy_mode; struct phylink *phylink; - u8 mac_addr[ETH_ALEN]; + u8 mac_addr[ETH_ALEN] = {0}; int err = 0, rxrings, rxringlen; struct ring_b *ring;