[openwrt/openwrt] realtek: ethernet: avoid using unitialized memory
LEDE Commits
lede-commits at lists.infradead.org
Mon Jan 12 15:25:43 PST 2026
hauke pushed a commit to openwrt/openwrt.git, branch openwrt-25.12:
https://git.openwrt.org/d01aa41d40e1b6f9e9a034bcae5fda322d5d0624
commit d01aa41d40e1b6f9e9a034bcae5fda322d5d0624
Author: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006 at gmx.net>
AuthorDate: Mon Jan 12 12:02:24 2026 +0100
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 <c-d.hailfinger.devel.2006 at gmx.net>
Link: https://github.com/openwrt/openwrt/pull/21504
Signed-off-by: Stijn Tintel <stijn at linux-ipv6.be>
(cherry picked from commit 19b8d391a95d5a2fa038551a9498a9fd426dfc0e)
---
target/linux/realtek/files-6.12/drivers/net/ethernet/rtl838x_eth.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
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 59ae4fbb24..db53496488 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;
More information about the lede-commits
mailing list